private void Exit(object sender, RoutedEventArgs e) { UserWindow x = new UserWindow(); x.liste.ItemsSource = App.CurrentUser.Logs; x.Show(); this.Close(); }
private void Save(object sender, RoutedEventArgs e) { var a = Diary.Text; App.CurrentLog.logs = a; App.Repo.SaveChanges(); UserWindow x = new UserWindow(); x.liste.ItemsSource = App.CurrentUser.Logs; x.Show(); this.Close(); }
private void Login(object sender, RoutedEventArgs e) { var user = App.Repo.Users.FirstOrDefault(f => f.name == tbxUserName.Text && f.password == pbxPassword.Password); if (user != null) { App.CurrentUser = user; UserWindow a = new UserWindow(); a.liste.ItemsSource = user.Logs; a.Show(); } else { MessageBox.Show("INVALID!!!"); } }