public UserControlFoodPlan(MainAppWindow main) { this.user1 = main.user; InitializeComponent(); if (DataBaseSolution.FoodPlanExist(user1) == true) { foodplan = DataBaseSolution.GetFoodPlan(user1); if (user1.UserMealNumber == 3) { GridFoodPlan.Children.Clear(); usc = new UserControlFoodPlanGenerated(foodplan); GridFoodPlan.Children.Add(usc); } if (user1.UserMealNumber == 4) { GridFoodPlan.Children.Clear(); usc = new UserControlFoodPlanGenerated4M(foodplan); GridFoodPlan.Children.Add(usc); } if (user1.UserMealNumber == 5) { GridFoodPlan.Children.Clear(); usc = new UserControlFoodPlanGenerated5M(foodplan); GridFoodPlan.Children.Add(usc); } } }
public UserControlNotebook(MainAppWindow main) { this.user1 = main.user; this.mainApp = main; InitializeComponent(); ShowChart(); }
private void LoginButton_Click(object sender, RoutedEventArgs e) { if (!(DataBaseSolution.FindUser(LoginBox.Text))) { MessageBox.Show("Wskazany użytkownik nie istnieje"); } else { if ((DataBaseSolution.CheckPassword(LoginBox.Text, PasswordBox.Password)) == true) { MessageBox.Show("Podane hasło jest nieprawidłowe"); } else { User user = new User(); user.Username = LoginBox.Text; user.Password = PasswordBox.Password; MainAppWindow mainAppWindow = new MainAppWindow(user); this.Visibility = Visibility.Hidden; mainAppWindow.Show(); } } }
public UserControlAccount(MainAppWindow main) { this.user1 = main.user; InitializeComponent(); }
public UserProductsRecipes(MainAppWindow main) { this.user = main.user; InitializeComponent(); }