예제 #1
0
        private void Exit(object sender, RoutedEventArgs e)
        {
            UserWindow x = new UserWindow();

            x.liste.ItemsSource = App.CurrentUser.Logs;
            x.Show();
            this.Close();
        }
예제 #2
0
        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();
        }
예제 #3
0
        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!!!");
            }
        }