コード例 #1
0
ファイル: HomeViewModel.cs プロジェクト: ziyauddin/LACare
        private void SelectedDate(object obj)
        {
            DateTime _date = (DateTime)(obj);
            var      Index = ListofDates.IndexOf(_date.Date);

            Date = ListofDates[Index].Date;
        }
コード例 #2
0
ファイル: HomeViewModel.cs プロジェクト: ziyauddin/LACare
 /// <summary>
 /// Get Next date
 /// </summary>
 public async void NextDateExecute()
 {
     if (ListofDates.IndexOf(Date) < ListofDates.Count - 1)
     {
         Date = ListofDates[ListofDates.IndexOf(Date) + 1].Date;
     }
     else
     {
         await Application.Current.MainPage.DisplayAlert("Alert!", "Maximum date", "Ok");
     }
 }
コード例 #3
0
ファイル: HomeViewModel.cs プロジェクト: ziyauddin/LACare
 /// <summary>
 /// Get Previous date
 /// </summary>
 public async void PreviousDateExecute()
 {
     if (ListofDates.IndexOf(Date) != 0)
     {
         Date = ListofDates[ListofDates.IndexOf(Date) - 1].Date;
     }
     else
     {
         await Application.Current.MainPage.DisplayAlert("Alert!", "Minimum date", "Ok");
     }
 }