Esempio n. 1
0
 private void RadCalendar_ItemTap(object sender, CalendarItemTapEventArgs e)
 {
     if (e.Item.Date.HasValue)
     {
         PhoneApplicationService.Current.State["SelectedDate"] = DateTime.SpecifyKind(e.Item.Date.Value.Date, DateTimeKind.Utc);
         KernelService.Kernel.Get <INavigationService>().NavigateTo(new Uri("/DateEdit.xaml", UriKind.Relative));
     }
 }
Esempio n. 2
0
        private async void RadCalendar_ItemTap(object sender, CalendarItemTapEventArgs e)
        {
            App.Lista = await FileStorageOperations.LoadFromLocalFolderAsync();

            List <LogData> today = App.Lista.Where(x => x.DateTime.Date == e.Item.Date).ToList();

            if (today.Count == 0)
            {
                MessageBox.Show("You haven't visited your castle today :D");
            }
            else
            {
                string combined = App.Lista.Select(x => x.Log + " (" + x.DateTime.ToString() + ")").Aggregate((first, second) => first + ", " + second);
                MessageBox.Show(combined);
            }
        }