Exemple #1
0
 public PlannerViewModel(TimetableForTheDaysLogic timetableForTheDaysLogic, HabitsTrackerLogic habitsTrackerLogic, GoalsLogic goalsLogic)
 {
     this.timetableForTheDaysLogic = timetableForTheDaysLogic;
     TimetableForTheDaysLogic      = this.timetableForTheDaysLogic;
     this.habitsTrackerLogic       = habitsTrackerLogic;
     HabitsTrackerLogic            = this.habitsTrackerLogic;
     this.goalsLogic = goalsLogic;
     GoalsLogic      = this.goalsLogic;
 }
Exemple #2
0
 private async void CreateLogicAsync()
 {
     await Task.Run(() =>
     {
         notesLogic               = new NotesLogic(diaryLogic.GetDataBase());
         importantDatesLogic      = new ImportantDatesLogic(diaryLogic.GetDataBase());
         timetableForTheDaysLogic = new TimetableForTheDaysLogic(diaryLogic.GetDataBase());
         habitsTrackerLogic       = new HabitsTrackerLogic();
         goalsLogic               = new GoalsLogic(diaryLogic.GetDataBase());
         basketLogic              = new BasketLogic(diaryLogic.GetDataBase());
     });
 }
Exemple #3
0
 public NewTimetableViewModel(TimetableForTheDaysLogic timetableForTheDaysLogic, int numberOfDay, string month, int year)
 {
     this.timetableForTheDaysLogic = timetableForTheDaysLogic;
     Condition      = "Visible";
     ListOfTasks    = new ObservableCollection <TaskForTheDay>();
     AddDescription = new RelayCommand <int>(DescriptionInThisIndex);
     DeleteTask     = new RelayCommand <int>(DeleteAtThisIndex);
     day            = new Day();
     Months         = new ObservableCollection <string>()
     {
         "Января",
         "Февраля",
         "Марта",
         "Апреля",
         "Мая",
         "Июня",
         "Июля",
         "Августа",
         "Сентября",
         "Октября",
         "Ноября",
         "Декабря"
     };
     selectedMonth = month;
     ClippingMonths();
     selectedYear = year;
     Years        = new LinkedList <int>();
     for (int i = Convert.ToInt32(DateTime.Now.ToString("yyyy")); i <= 2328; i++)
     {
         Years.AddLast(i);
     }
     selectedDay = numberOfDay;
     Days        = new ObservableCollection <int>();
     ClippingDays(selectedDay);
     counter = 0;
     SearchingExistingCases();
     Count          = ListOfTasks.Count;
     dispatcher     = Dispatcher.CurrentDispatcher;
     dispatcherHelp = 0;
 }
 public AllTimetablesViewModel(TimetableForTheDaysLogic timetableForTheDaysLogic)
 {
     this.timetableForTheDaysLogic = timetableForTheDaysLogic;
     Condition      = "Visible";
     ListOfTasks    = new ObservableCollection <TaskForTheDay>();
     calendar       = new Calendar();
     SelectedDay    = new RelayCommand <int>(ViewTasks);
     SeeDescription = new RelayCommand <int>(See);
     Check          = new RelayCommand <int>(Done);
     DeleteTask     = new RelayCommand <int>(Delete);
     Months         = new List <string>()
     {
         "Январь",
         "Февраль",
         "Март",
         "Апрель",
         "Май",
         "Июнь",
         "Июль",
         "Август",
         "Сентябрь",
         "Октябрь",
         "Ноябрь",
         "Декабрь"
     };
     Years = new LinkedList <int>();
     for (int i = 1900; i <= 2328; i++)
     {
         Years.AddLast(i);
     }
     selectedMonth = calendar.GetMonthNow();
     selectedYear  = Convert.ToInt32(DateTime.Now.ToString("yyyy"));
     pastSelect    = 0;
     StandardActions(Convert.ToInt32(DateTime.Now.ToString("dd")));
     dispatcher = Dispatcher.CurrentDispatcher;
     pastIndex  = -1;
     IsClose    = false;
 }