コード例 #1
0
        private void BtnStartStop_Click(object sender, EventArgs e)
        {
            graphics.Clear(this.BackColor);

            if (Start)
            {
                tmr.Enabled       = false;
                Start             = false;
                BtnStartStop.Text = "Start";
            }
            else
            {
                try
                {
                    first = true;
                    /*controller = new Controller();*/
                    monleap = new LeapMotion();
                    monleap.StartDrawing += monleap_StartDrawing;
                    monleap.StopDrawing  += monleap_StopDrawing;
                    Start             = true;
                    BtnStartStop.Text = "Stop";
                    tmr.Enabled       = true;
                    first             = true;
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: Araxor/mouvtor
        private void BtnStartStop_Click(object sender, EventArgs e)
        {
            graphics.Clear(this.BackColor);

            if (Start)
            {
                tmr.Enabled = false;
                Start = false;
                BtnStartStop.Text = "Start";
            }
            else
            {
                try
                {
                    first = true;
                    /*controller = new Controller();*/
                    monleap = new LeapMotion();
                    monleap.StartDrawing += monleap_StartDrawing;
                    monleap.StopDrawing += monleap_StopDrawing;
                    Start = true;
                    BtnStartStop.Text = "Stop";
                    tmr.Enabled = true;
                    first = true;
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }