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