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; }
public NewHabitTrackerViewModel(HabitsTrackerLogic habitsTrackerLogic) { this.habitsTrackerLogic = habitsTrackerLogic; EditHabit = new RelayCommand <int>(Edit); DeleteHabit = new RelayCommand <int>(Delete); Condition = "Visible"; ListOfHabits = new ObservableCollection <DataHabit>(); SearchingHabits(); Count = ListOfHabits.Count; dispatcher = Dispatcher.CurrentDispatcher; }
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()); }); }
public AllHabitsTrackerViewModel(HabitsTrackerLogic habitsTrackerLogic) { this.habitsTrackerLogic = habitsTrackerLogic; workOfDay = new Day(); Condition = "Visible"; day = Convert.ToInt32(DateTime.Now.ToString("dd")); month = Convert.ToInt32(DateTime.Now.ToString("MM")); year = Convert.ToInt32(DateTime.Now.ToString("yyyy")); WeekHabits = new ObservableCollection <WeekHabit>(); WeekHabit.ListDays.Clear(); WeekHabit.SetWeek(DateTime.Now.ToString("dd"), DateTime.Now.ToString("MM"), year); DayMonth = WeekHabit.Week; Completion(); MondayCheck = new RelayCommand <string>(MonCheck); TuesdayCheck = new RelayCommand <string>(TueCheck); WednesdayCheck = new RelayCommand <string>(WedCheck); ThursdayCheck = new RelayCommand <string>(ThuCheck); FridayCheck = new RelayCommand <string>(FriCheck); SaturdayCheck = new RelayCommand <string>(SatCheck); SundayCheck = new RelayCommand <string>(SunCheck); IsVisible = false; nowWeek = DayMonth; dispatcher = Dispatcher.CurrentDispatcher; }