private void Exit_Click(object sender, RoutedEventArgs e)
 {
     if (MessageBox.Show("真的要退出么?", "PBO", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
     {
         PBOClient.Exit();
     }
 }
 private void button_Click(object sender, RoutedEventArgs e)
 {
     if (!string.IsNullOrWhiteSpace(servers.Text) && !string.IsNullOrWhiteSpace(name.Text))
     {
         var na = name.Text.Trim();
         var av = 0;
         PBOClient.Login(servers.Text.Trim(), na, (ushort)av);
         Config.Name = na;
         IsEnabled   = false;
     }
 }
Esempio n. 3
0
 public bool Window_Closing()
 {
     if (PBOClient.Current != null)
     {
         if (ShowMessageBox.ExitLobby() == MessageBoxResult.Yes)
         {
             PBOClient.Exit();
         }
         else
         {
             return(true);
         }
     }
     return(false);
 }