Esempio n. 1
0
        private void btn_ok_Click(object sender, RoutedEventArgs e)
        {
            if (IsErrorHappens)
            {
                Close();
                return;
            }

            if (!IsRequiredSecPage)
            {
                if (CB_Player.SelectedIndex == -1)
                {
                    MessageBox.Show(Properties.Resources.SelectAPlayerFirst);
                }
                else
                {
                    string[] SPLT = CB_Player.SelectedItem.ToString().Split(' ');
                    switch (CC)
                    {
                    case 0:
                        CommandParser.CommandRead("/ban " + SPLT[2]);
                        Close(); break;

                    case 4:
                        CommandParser.CommandRead("/unban " + SPLT[2]);
                        Close(); break;

                    case 8:
                        CommandParser.CommandRead("/kick " + SPLT[2]);
                        Close(); break;
                    }
                }
            }
        }
Esempio n. 2
0
 private void SenderCommand()
 {
     if (!string.IsNullOrWhiteSpace(this.CommandLine.Text))
     {
         CommandParser.CommandRead(this.CommandLine.Text);
         this.CommandLine.Clear();
     }
 }
Esempio n. 3
0
 private void UC_Restart_Click(object sender, RoutedEventArgs e)
 {
     CommandParser.CommandRead("/restart");
 }