public Home() { this.InitializeComponent(); Logger.InitLogger(); this._userService = new UserService(); this._drunkDrinksService = new DrunkDrinkService(); this._statisticService = new StatisticService(); if (Application.Current.Properties["userId"] != null) { int id = (int)Application.Current.Properties["userId"]; try { this.GoalLabel.Content = this._userService.GetUserInfo(id).Goal; this.WaterNormLabel.Content = this._userService.GetUserData(id).WaterNorm; } catch (Exception e) { Logger.Log.Error(e.Message); this.GoalLabel.Content = 2000; } } ShowHistory(); int percent = _drunkDrinksService.CurrentlyPercent(); DailyInTake2.Text = percent + "%"; }
public MenuOfDrinks() { this.InitializeComponent(); this._home = new Home(); this._bevarage = null; this._volume = 0; this._drunkDrinkService = new DrunkDrinkService(); Logger.InitLogger(); }