Пример #1
0
 private void MainCalendar_OnDateClicked(object sender, WPControls.SelectionChangedEventArgs e)
 {
     selectedDate = e.SelectedDate;
     if (selectedDate.IsFuture() && !UpgradeAccountControl.EnsureAccountType(ApplicationStrings.Feature_Premium_AddEntriesInFuture, this))
     {
         return;
     }
     if (ApplicationState.Current.CurrentBrowsingTrainingDays.IsMine || ApplicationState.Current.CurrentBrowsingTrainingDays.TrainingDays.ContainsKey(selectedDate))
     {
         this.Navigate("/Pages/TrainingDayEntrySelectorPage.xaml");
     }
 }
Пример #2
0
        private void ZCalendar_SelectionChanged_1(object sender, WPControls.SelectionChangedEventArgs e)
        {
            try
            {
                DateTime           dt     = e.SelectedDate;
                List <SpaceObject> spaces = new List <SpaceObject>();
                foreach (var x in App.MasterSpaceObjects.SpaceItems)
                {
                    foreach (var y in x.occurences)
                    {
                        DateTime comp = DateTime.Parse(y.date);
                        if (comp.Date == dt.Date)
                        {
                            spaces.Add(x);
                            break;
                        }
                    }
                }

                lbSpaceObj.ItemsSource = spaces;
            }
            catch {
            }
        }