コード例 #1
0
        /* Button event handler */
        private void FusionButtonChanged(object sender, ButtonChangeEventArgs e)
        {
            buttTimeStamp = e.Time.ToLocalTime();
            switch (e.Button)
            {
            case 0:     // Left button
                if (e.IsPressed)
                {
                    buttA = true;
                }
                else
                {
                    buttA = false;
                }
                break;

            case 1:     // Right button
                if (e.IsPressed)
                {
                    buttB = true;
                }
                else
                {
                    buttB = false;
                }
                break;

            default:
                break;
            }
        }
コード例 #2
0
 private void ButtonChanged(object sender, ButtonChangeEventArgs e)
 {
     if (e.Button == 0)
     {
         Calibrate();
     }
 }
コード例 #3
0
        /* Button event handler */
        private void EpocButtonChanged(object sender, ButtonChangeEventArgs e)
        {
            buttTimeStamp = e.Time.ToLocalTime();
            switch (e.Button)
            {
            case 0:     // A
                if (e.IsPressed)
                {
                    buttA = true;
                }
                else
                {
                    buttA = false;
                }
                break;

            case 1:     // B
                if (e.IsPressed)
                {
                    buttZ = true;
                }
                else
                {
                    buttZ = false;
                }
                break;

            default:
                break;
            }
        }
コード例 #4
0
ファイル: UIVA.cs プロジェクト: AhnBCILab/Openvibe2Unity
        /* Button event handler */
        private void OpenvibeButtonChanged(object sender, ButtonChangeEventArgs e)
        {
            buttTimeStamp = e.Time.ToLocalTime();
            switch (e.Button)
            {
            case 0:     // 0 means that the first input of 'VRPN Button Server' in OpenViBE
                if (e.IsPressed)
                {
                    buttA = true;
                }
                else
                {
                    buttA = false;
                }
                break;

            case 1:     // 1 means that the second input of 'VRPN Button Server' in OpenViBE
                if (e.IsPressed)
                {
                    buttZ = true;
                }
                else
                {
                    buttZ = false;
                }
                break;

            default:
                break;
            }
        }
コード例 #5
0
 private void lhClient_ButtonChanged(object sender, ButtonChangeEventArgs e)
 {
     if (e.Button == masterKinectSettings.lhChannel)
     {
         lastSkeleton.leftHandClosed = e.IsPressed;
     }
 }
コード例 #6
0
        private void EpocButtonChanged(object sender, ButtonChangeEventArgs e)
        {
            switch (e.Button)
            {
            case 0:     // Up arrow
                if (e.IsPressed)
                {
                    b_up = true;
                }
                else
                {
                    b_up = false;
                }
                break;

            case 1:     // Down arrow
                if (e.IsPressed)
                {
                    b_down = true;
                }
                else
                {
                    b_down = false;
                }
                break;

            case 2:     // Left arrow
                if (e.IsPressed)
                {
                    b_left = true;
                }
                else
                {
                    b_left = false;
                }
                break;

            case 3:     // Right arrow
                if (e.IsPressed)
                {
                    b_right = true;
                }
                else
                {
                    b_right = false;
                }
                break;

            default:
                break;
            }
        }
コード例 #7
0
 private void rhClient_ButtonChanged(object sender, ButtonChangeEventArgs e)
 {
     //If both hands are on this server, check the left hand channel
     if (lhName != null && rhName == lhName)
     {
         if (e.Button == masterKinectSettings.lhChannel)
         {
             lastSkeleton.leftHandClosed = e.IsPressed;
         }
     }
     //Always check the right hand channel
     if (e.Button == masterKinectSettings.rhChannel)
     {
         lastSkeleton.rightHandClosed = e.IsPressed;
     }
 }
コード例 #8
0
        /* Button event handler */
        private void MouseButtonChanged(object sender, ButtonChangeEventArgs e)
        {
            buttTimeStamp = e.Time.ToLocalTime();
            switch (e.Button)
            {
            case 0:
                if (e.IsPressed)
                {
                    buttLeft = true;
                }
                else
                {
                    buttLeft = false;
                }
                break;

            case 1:
                if (e.IsPressed)
                {
                    buttMiddle = true;
                }
                else
                {
                    buttMiddle = false;
                }
                break;

            case 2:
                if (e.IsPressed)
                {
                    buttRight = true;
                }
                else
                {
                    buttRight = true;
                }
                break;

            default:
                throw new Exception("ERROR: UIVA_Mouse: MouseButtonChanged: Mouse button unsupported.");
            }
        }
コード例 #9
0
 /* Button event handler */
 private void ButtonChanged(object sender, ButtonChangeEventArgs e)
 {
     Vrpn.ButtonRemote buttonSender = (Vrpn.ButtonRemote) sender;
     if (this.remotes.isPresent(buttonSender))
     {
         ButtonEvent buttonEvent = new ButtonEvent(this.remotes[buttonSender].Name);
         buttonEvent.Button = e.Button;
         buttonEvent.State = e.IsPressed;
         buttonEvent.Time = e.Time;
         Console.WriteLine("Button: " + buttonEvent);
         this.SendEvent(buttonSender, buttonEvent);
     }
     else
     {
         buttonSender.ButtonChanged -= new Vrpn.ButtonChangeEventHandler(this.ButtonChanged);
     }
 }
コード例 #10
0
ファイル: NetworkKinectCore.cs プロジェクト: vancegroup/KVR
 private void rhClient_ButtonChanged(object sender, ButtonChangeEventArgs e)
 {
     //If both hands are on this server, check the left hand channel
     if (lhName != null && rhName == lhName)
     {
         if (e.Button == masterKinectSettings.lhChannel)
         {
             lastSkeleton.leftHandClosed = e.IsPressed;
         }
     }
     //Always check the right hand channel
     if (e.Button == masterKinectSettings.rhChannel)
     {
         lastSkeleton.rightHandClosed = e.IsPressed;
     }
 }
コード例 #11
0
ファイル: NetworkKinectCore.cs プロジェクト: vancegroup/KVR
 private void lhClient_ButtonChanged(object sender, ButtonChangeEventArgs e)
 {
     if (e.Button == masterKinectSettings.lhChannel)
     {
         lastSkeleton.leftHandClosed = e.IsPressed;
     }
 }
コード例 #12
0
 private static void WandButtonsChanged(object sender, ButtonChangeEventArgs e)
 {
 }
コード例 #13
0
 static void ButtonChanged(object sender, ButtonChangeEventArgs e)
 {
     Console.WriteLine("{0} {1} {2}", e.Time, e.Button, e.IsPressed ? "pressed" : "released");
 }
コード例 #14
0
ファイル: Form1.cs プロジェクト: hova0/RegexRunner
 void o_RegexFinished(object sender, EventArgs e)
 {
     //button1.Enabled = true;
     ButtonChangeEventArgs be = new ButtonChangeEventArgs();
     be.Enabled = true;
     button1_setenabled(button1, be);
 }
コード例 #15
0
 private static void WandButtonsChanged(object sender, ButtonChangeEventArgs e)
 {
 }
コード例 #16
0
        /* Button event handler */
        private void WiimoteButtonChanged(object sender, ButtonChangeEventArgs e)
        {
            buttTimeStamp = e.Time.ToLocalTime();
            switch (e.Button)
            {
            case 0:     // Home or A (if paratisized by WiiFit)
                if (e.IsPressed)
                {
                    buttHome = true;
                }
                else
                {
                    buttHome = false;
                }
                break;

            case 1:     // One
                if (e.IsPressed)
                {
                    buttOne = true;
                }
                else
                {
                    buttOne = false;
                }
                break;

            case 2:     // Two
                if (e.IsPressed)
                {
                    buttTwo = true;
                }
                else
                {
                    buttTwo = false;
                }
                break;

            case 3:     // A
                if (e.IsPressed)
                {
                    buttA = true;
                }
                else
                {
                    buttA = false;
                }
                break;

            case 4:     // B
                if (e.IsPressed)
                {
                    buttB = true;
                }
                else
                {
                    buttB = false;
                }
                break;

            case 11:     // Minus
                if (e.IsPressed)
                {
                    buttMinus = true;
                }
                else
                {
                    buttMinus = false;
                }
                break;

            case 6:     // Plus
                if (e.IsPressed)
                {
                    buttPlus = true;
                }
                else
                {
                    buttPlus = false;
                }
                break;

            case 7:     // Left
                if (e.IsPressed)
                {
                    buttLeft = true;
                }
                else
                {
                    buttLeft = false;
                }
                break;

            case 8:     // Right
                if (e.IsPressed)
                {
                    buttRight = true;
                }
                else
                {
                    buttRight = false;
                }
                break;

            case 9:     // Down
                if (e.IsPressed)
                {
                    buttDown = true;
                }
                else
                {
                    buttDown = false;
                }
                break;

            case 10:     // Up
                if (e.IsPressed)
                {
                    buttUp = true;
                }
                else
                {
                    buttUp = false;
                }
                break;

            default:
                break;
            }
        }
コード例 #17
0
ファイル: Program.cs プロジェクト: semihguresci/VrpnNet
 static void ButtonChanged(object sender, ButtonChangeEventArgs e)
 {
     Console.WriteLine("{0} {1} {2}", e.Time, e.Button, e.IsPressed ? "pressed" : "released");
 }
コード例 #18
0
ファイル: VrpnTracker.cs プロジェクト: Inner-room/VrPlayer
 private void ButtonChanged(object sender, ButtonChangeEventArgs e)
 {
     if (e.Button == 0)
         Calibrate();
 }
コード例 #19
0
ファイル: Form1.cs プロジェクト: hova0/RegexRunner
        void button1_setenabled(object sender, ButtonChangeEventArgs e)
        {
            Button c = sender as Button;
            if(c != null)
            {
                if(c.InvokeRequired)
                {
                    c.Invoke(new ButtonChangeEventhandler(button1_setenabled), sender, e);
                } else
                {
                    c.Enabled = e.Enabled;
                }

            }
        }