コード例 #1
0
ファイル: MainPage.xaml.cs プロジェクト: slavab4/todo-list
 private void orderEndDate_PointerPressed(object sender, PointerRoutedEventArgs e)
 {
     if (isAscending["endDate"])
     {
         this.Events            = CollectionExtensions.ToObservableCollection(this.Events.OrderByDescending(eve => eve.EndDate));
         isAscending["endDate"] = false;
     }
     else
     {
         this.Events            = CollectionExtensions.ToObservableCollection(this.Events.OrderBy(eve => eve.EndDate));
         isAscending["endDate"] = true;
     }
     this.eventsTable.ItemsSource = this.Events;
 }
コード例 #2
0
ファイル: MainPage.xaml.cs プロジェクト: slavab4/todo-list
        private async void LoadEvents()
        {
            try
            {
                Windows.Storage.StorageFolder localFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
                StorageFile file = await localFolder.GetFileAsync(filename);

                string result = await FileIO.ReadTextAsync(file);

                this.Events             = CollectionExtensions.ToObservableCollection(man.GetAllEvents(result));
                eventsTable.ItemsSource = this.Events;
            }
            catch (Exception)
            {
                CreateEventFile();
            }
        }
コード例 #3
0
ファイル: MainPage.xaml.cs プロジェクト: slavab4/todo-list
 private void searchTextBox_KeyUp(object sender, KeyRoutedEventArgs e)
 {
     this.Events = CollectionExtensions.ToObservableCollection(man.SearchEvents(searchTextBox.Text));
     this.eventsTable.ItemsSource = this.Events;
 }
コード例 #4
0
ファイル: MainPage.xaml.cs プロジェクト: slavab4/todo-list
 private void filterInMonthOnSelectedDateChanged(object sender, SelectedDateChangedEventArgs selectedDateChangedEventArgs)
 {
     this.Events = CollectionExtensions.ToObservableCollection(man.GetEventsInMonth(selectedDateChangedEventArgs.NewDate));
     this.eventsTable.ItemsSource = this.Events;
 }