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; }
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(); } }
private void searchTextBox_KeyUp(object sender, KeyRoutedEventArgs e) { this.Events = CollectionExtensions.ToObservableCollection(man.SearchEvents(searchTextBox.Text)); this.eventsTable.ItemsSource = this.Events; }
private void filterInMonthOnSelectedDateChanged(object sender, SelectedDateChangedEventArgs selectedDateChangedEventArgs) { this.Events = CollectionExtensions.ToObservableCollection(man.GetEventsInMonth(selectedDateChangedEventArgs.NewDate)); this.eventsTable.ItemsSource = this.Events; }