コード例 #1
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (!disableDefaultClose) { 
         var window = new ThreadsWindow(user);
         window.Show();
     }
 }
コード例 #2
0
 private void loginButton_Click(object sender, RoutedEventArgs e)
 {
     ForumAuth auth = ForumAuth.Singleton;
     User user = auth.login(usernameTextBox.Text, passwordTextBox.Password);
     if (user == null)
     {
         MessageBox.Show("Nieprawidłowe dane logowania!", "Błąd", MessageBoxButton.OK);
     }
     else
     {
         ThreadsWindow window = new ThreadsWindow(user);
         window.Show();
         Close();
     }
 }