/* 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; } }
private void ButtonChanged(object sender, ButtonChangeEventArgs e) { if (e.Button == 0) { Calibrate(); } }
/* 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; } }
/* 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; } }
private void lhClient_ButtonChanged(object sender, ButtonChangeEventArgs e) { if (e.Button == masterKinectSettings.lhChannel) { lastSkeleton.leftHandClosed = e.IsPressed; } }
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; } }
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; } }
/* 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."); } }
/* 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); } }
private static void WandButtonsChanged(object sender, ButtonChangeEventArgs e) { }
static void ButtonChanged(object sender, ButtonChangeEventArgs e) { Console.WriteLine("{0} {1} {2}", e.Time, e.Button, e.IsPressed ? "pressed" : "released"); }
void o_RegexFinished(object sender, EventArgs e) { //button1.Enabled = true; ButtonChangeEventArgs be = new ButtonChangeEventArgs(); be.Enabled = true; button1_setenabled(button1, be); }
/* 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; } }
private void ButtonChanged(object sender, ButtonChangeEventArgs e) { if (e.Button == 0) Calibrate(); }
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; } } }