예제 #1
0
 private void button3_Click(object sender, EventArgs e)
 {
     if (button1.Text == "Start Engine")
     {
         MessageBox.Show("You need to start Emo Engine first");
     }
     else if (button1.Text == "Stop Engine")
     {
         My_Program.Do_license();
     }
 }
예제 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (button1.Text == "Start Engine")
     {
         button1.Text = "Stop Engine";
         My_Program.Start_me();
     }
     else if (button1.Text == "Stop Engine")
     {
         button1.Text = "Start Engine";
         My_Program.Stop_me();
     }
 }
예제 #3
0
        //private void Form1_Load(object sender, EventArgs e)
        //{

        //}

        private void button2_Click(object sender, EventArgs e)
        {
            if (My_Program.myForm.textBox9.Text != "" && My_Program.myForm.textBox10.Text != "")
            {
                if (button2.Text == "Connect")
                {
                    button2.Text = "Disconnect";
                    My_Program.Start_Server();
                }
                else if (button2.Text == "Disconnect")
                {
                    button2.Text = "Connect";
                    My_Program.Stop_Server();
                }
            }
            else
            {
                MessageBox.Show("You need Log address and Record Number");
            }
        }
예제 #4
0
        public MyWebSocket() //string[] args)
        {
            //string[] myStr = { Program.myForm.URLtoSend.Text };
            string myStr = My_Program.myForm.textBox10.Text;

            ws         = new WebSocket(myStr);
            allSockets = new List <WebSocket>();
            ws.OnOpen += (sender, e) => {
                allSockets.Add(ws);
                My_Program.SRV = true;
                My_Program.myForm.textBox11.Text = "Open";
            };
            ws.OnClose += (sender, e) => {
                My_Program.SRV = false;
                My_Program.myForm.textBox11.Text = "Closed";
            };

            ws.OnMessage += (sender, e) =>
            {
                My_Program.UpdateMsgBox(e.Data);
            };
            ws.Connect();
        }
예제 #5
0
 private void button4_Click(object sender, EventArgs e)
 {
     My_Program.StartStim();
 }
예제 #6
0
        private void timer2_Tick(object sender, EventArgs e)
        {
            bool flag = false;

            My_Program.StimFlip(flag);
        }