예제 #1
0
        private async void SaveLogEntry()
        {
            LogData added = new LogData();

            added.DateTime = this.radTimePicker.Value.Value;
            added.Log      = this.loginfo.Text;

            App.Lista.Add(added);
            await FileStorageOperations.SaveToLocalFolderAsync(App.Lista);

            //MessageBox.Show("done");
        }
예제 #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);
            }
        }