private void LstMedicationWithDosage_ItemSelected(object sender, SelectedItemChangedEventArgs e)
{
lstMedicationWithDosage.ItemsSource = null;
var item = e.SelectedItem as MedicationWithDosage;
if (item.ImgPic == "med_select.png")
{
item.ImgPic = "med_deselect.png";
}
else
{
item.ImgPic = "med_select.png";
}
var selectedItems = (from s in objMEdicationWithDosage where s.ImgPic == "med_select.png"
&& s.MedicationName!= "None" select s).ToList();
if (selectedItems.Count > 0)
{
objMEdicationWithDosage[0].ImgPic = "med_deselect.png";
}
else
{
objMEdicationWithDosage[0].ImgPic = "med_select.png";
}
lstMedicationWithDosage.ItemsSource = objMEdicationWithDosage;
}
------------------------------
btnMedicationNext.Clicked += delegate
{
string strMedicationName = "";
foreach (var eachItem in objMEdicationWithDosage)
{
if (eachItem.ImgPic == "med_select.png" && eachItem.MedicationName != "None")
{
strMedicationName = strMedicationName + eachItem.MedicationName + ",";
}
}
//strMedicationName = strMedicationName.Substring(0, strMedicationName.Length - 1);
App.strMedicationName = strMedicationName;
Navigation.PushModalAsync(new NotePage());
};
---------------------------------
var strtap = new TapGestureRecognizer();
strtap.Tapped += Strtap_Tapped;
sl30Mints.GestureRecognizers.Add(strtap);
}
private void Strtap_Tapped(object sender, EventArgs e)
{
DateTime oDate = Convert.ToDateTime(App.strDateTime);
var ms = (oDate - DateTime.MinValue).TotalMilliseconds;
var ss = ms;
}
No comments:
Post a Comment