public NewGoalViewModel(GoalsLogic goalsLogic) { this.goalsLogic = goalsLogic; Condition = "Visible"; TitleGoal = ""; DescriptionGoal = ""; BackgroundTitle = (Brush) new BrushConverter().ConvertFromString("White"); }
void AddGoal() { GoalsLogic goalsLogic = new GoalsLogic(); goalsLogic.AddGoal(User, Goals); (App.Current as App).NavigationCommand.Execute("Dashboard"); }
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 AllGoalsViewModel(GoalsLogic goalsLogic) { this.goalsLogic = goalsLogic; Condition = "Visible"; Goals = new ObservableCollection <Goal>(this.goalsLogic.GetAllGoals()); EditAndViewGoal = new RelayCommand <int>(EditViewGoal); GoalCheck = new RelayCommand <int>(Check); DeleteGoal = new RelayCommand <int>(Delete); Count = Goals.Count; }
public EditGoalViewModel(GoalsLogic goalsLogic, int id, string text, string description) { this.goalsLogic = goalsLogic; GoalsLogic = this.goalsLogic; Condition = "Visible"; TitleGoal = text; DescriptionGoal = description; this.id = id; BackgroundTitle = (Brush) new BrushConverter().ConvertFromString("White"); Status = "Закрытие"; }
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 void Refresh() { GoalsLogic goalsLogic = new GoalsLogic(); Goals = goalsLogic.GetGoals(User, DateTime.Today); if (Goals != null) { FoodLogic foodLogic = new FoodLogic(); var meals = foodLogic.GetMeals(User, Goals.GoalStartDate, Goals.GoalEndDate); Weekly = foodLogic.GetTotals(meals); } }
private async void WaitingEdit() { await Task.Run(() => { while (IsClose != true && editGoalViewModel.Condition != "Collapsed") { } if (editGoalViewModel.Status == "Сохранение и закрытие") { goalsLogic = editGoalViewModel.GoalsLogic; Goals = new ObservableCollection <Goal>(this.goalsLogic.GetAllGoals()); } }); }