示例#1
0
 private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     if (!(listBox1.SelectedIndex < 0))
     {
         if (listBox1.SelectedItem != null && listBox1.SelectedItem.ToString() != "")
         {
             bool can = true;
             if (Utils.currentChannel != "" && Utils.currentChannel != null)
             {
                 if (listBox1.SelectedItem.ToString().EndsWith(Utils.currentChannel))
                 {
                     can = false;
                     if (!Utils.roomFormOpened)
                     {
                         Utils.roomFormOpened = true;
                         RoomForm roomForm = new RoomForm();
                         roomForm.Text  = "Rebel Client - " + Utils.currentChannel;
                         Utils.roomForm = roomForm;
                         roomForm.Show();
                     }
                 }
             }
             if (can)
             {
                 Utils.sendString("5" + listBox1.SelectedItem.ToString().Substring(1));
             }
         }
     }
 }
示例#2
0
文件: MainForm.cs 项目: Envy-rb/Obsh
        private void RoomButton_Click(object sender, EventArgs e)
        {
            var form = new RoomForm();

            form.Show(this);
        }