コード例 #1
0
ファイル: GUImain.cs プロジェクト: DomiStyle/DaRT
        private void banOffline_click(object sender, EventArgs args)
        {
            try
            {
                ListViewItem item = dbCache[playerDBList.SelectedIndices[0]];
                String guid = item.SubItems[3].Text;
                String name = item.SubItems[4].Text;

                GUIban gui = new GUIban(rcon, 0, name, guid, "", false);
                gui.ShowDialog();
            }
            catch(Exception e)
            {
                this.Log("An error occurred, please try again.", LogType.Console, false);
                this.Log(e.Message, LogType.Debug, false);
                this.Log(e.StackTrace, LogType.Debug, false);
            }
        }
コード例 #2
0
ファイル: GUImain.cs プロジェクト: DomiStyle/DaRT
 private void ban_click(object sender, EventArgs args)
 {
     try
     {
         ListViewItem item = playerList.SelectedItems[0];
         int id = Int32.Parse(item.SubItems[1].Text);
         String ip = item.SubItems[2].Text;
         String guid = item.SubItems[4].Text;
         String name = item.SubItems[5].Text;
         GUIban gui = new GUIban(rcon, id, name, guid, ip, true);
         rcon.Pending = name;
         gui.ShowDialog();
     }
     catch(Exception e)
     {
         this.Log("An error occurred, please try again.", LogType.Console, false);
         this.Log(e.Message, LogType.Debug, false);
         this.Log(e.StackTrace, LogType.Debug, false);
     }
 }