コード例 #1
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     (new LoadingWindow()).Show();
     CoreClass.TryLogin(UsernameBox.Text, PasswordBox.Password);
     if (CoreClass.isLogin == true)
     {
         CoreClass.shouldCloseLoading = true;
         MessageBox.Show("Connected successfully!");
     }
     else if (CoreClass.isLogin == false)
     {
         CoreClass.shouldCloseLoading = true;
         MessageBox.Show("Error, could not connect!");
     }
 }
コード例 #2
0
 public static async void TryLoginAsync(string username, string password)
 {
     CoreClass.TryLogin(username, password);
 }