Пример #1
0
 private void bannsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (!mangosProcess.HasExited)
         {
             Form showServerBans = new serverBans();
             showServerBans.Show();
         }
         else
         {
             MessageBox.Show(hcStringResources.ManguiMain_MangosNotRunning);
         }
     }
     catch
     {
         MessageBox.Show(hcStringResources.ManguiMain_MangosNotRunning);
     }
 }
Пример #2
0
        private void LoadBanIpWithData()
        {
            int row = dataOnlineInfo.CurrentRow.Index;
            try
            {
                if (!mangosProcess.HasExited)
                {
                    serverBans frmShowBanIp = new serverBans();
                    frmShowBanIp.Show();

                    frmShowBanIp.radioBan.Checked = true;

                    frmShowBanIp.comboBanType.SelectedIndex = 2;

                    frmShowBanIp.Controls["textChosenType"].Text =
                        dataOnlineInfo.Rows[row].Cells["Ip"].Value.ToString();
                }
                else
                {
                    MessageBox.Show(hcStringResources.ManguiMain_MangosNotRunning);
                }
            }
            catch
            {
                MessageBox.Show(hcStringResources.ManguiMain_MangosNotRunning);
            }
        }