Esempio n. 1
0
 protected virtual void OnReleased(ActionEventArgs e)
 {
     if (this.Released != null)
     {
         this.Released(this, e);
     }
 }
Esempio n. 2
0
 protected virtual void OnPressed(ActionEventArgs e)
 {
     if (this.Pressed != null)
     {
         this.Pressed(this, e);
     }
 }
 protected virtual void OnGamepadAction(ActionEventArgs e)
 {
     EventHandler<ActionEventArgs> handler = GamepadAction;
     if (handler != null)
     {
         handler(this, e);
     }
 }
 public virtual void OnAction(ActionEventArgs e)
 {
     EventHandler<ActionEventArgs> handler = this.Action;
     if (handler != null)
     {
         handler(this, e);
     }
 }
 private void checkGamePads(Object sender, EventArgs e)
 {
     ActionEventArgs args = new ActionEventArgs(this.ActiveDevice);
     if (this.Gamepad.Changed())
     {
         this.Gamepad.Poll();
         this.Gamepad.Update();
         
     }
     if (this.Joystick.Changed())
     {
         this.Joystick.Poll();
         this.Joystick.Update();
     }
 }
 private void controller_Button19Released(object sender, ActionEventArgs e)
 {
     txtLastButton.Text = "Button Released";
     cbButton19.IsChecked = false;
 }
 private void A_Pressed(object sender, ActionEventArgs e)
 {
     cbButtonA.IsChecked = true;
     txtGamePadLastAction.Text = "A button released";
 }
 void B_Pressed(object sender, ActionEventArgs e)
 {
     cbButtonB.IsChecked = true;
     txtGamePadLastAction.Text = "B button pressed";
 }
 void B_Released(object sender, ActionEventArgs e)
 {
     cbButtonB.IsChecked = false;
     txtGamePadLastAction.Text = "B button released";
 }
 void Start_Pressed(object sender, ActionEventArgs e)
 {
     cbButtonStart.IsChecked = true;
     txtGamePadLastAction.Text = "start button pressed";
 }
 private void LeftAxis_Moved(object sender, ActionEventArgs e)
 {
     txtGamePadLastAction.Text = "Left Joystick Moved X: " + controller.Gamepad.LeftAxis.X.ToString() + " Y: "+ controller.Gamepad.LeftAxis.Y.ToString();
 }
 private void controller_JoystickAction(object sender, ActionEventArgs e)
 {
     txtJoystickStateDebug.Text = e.JoystickState.ToString();
 }
 void RightStick_Released(object sender, ActionEventArgs e)
 {
     cbButtonRightStick.IsChecked = false;
     txtGamePadLastAction.Text = "Right Stick button released";
 }
 void LeftStick_Pressed(object sender, ActionEventArgs e)
 {
     cbButtonLeftStick.IsChecked = true;
     txtGamePadLastAction.Text = "Left Stick button pressed";
 }
 void LeftTrigger_Pressed(object sender, ActionEventArgs e)
 {
     cbButtonLeftTrigger.IsChecked = true;
     txtGamePadLastAction.Text = "Left TRigger button pressed";
 }
 private void RightTrigger_Pressed(object sender, ActionEventArgs e)
 {
     cbButtonRightTrigger.IsChecked = true;
     txtGamePadLastAction.Text = "Right Trigger button pressed";
 }
 private void RightTrigger_Released(object sender, ActionEventArgs e)
 {
     cbButtonRightTrigger.IsChecked = false;
     txtGamePadLastAction.Text = "Right Trigger button released";
 }
 private void controller_Button19Pressed(object sender, ActionEventArgs e)
 {
     txtLastButton.Text = "Button Pressed";
     cbButton19.IsChecked = true;
 }
 void LeftShoulder_Pressed(object sender, ActionEventArgs e)
 {
     cbButtonLeftShoulder.IsChecked = true;
     txtGamePadLastAction.Text = "Big Button pressed";
 }
 private void controller_GamePadAction(object sender, ActionEventArgs e)
 {
     txtGamePadStateDebug.Text = e.GamepadState.ToString();
 }
 void Start_Released(object sender, ActionEventArgs e)
 {
     cbButtonStart.IsChecked = false;
     txtGamePadLastAction.Text = "Start button released";
 }
 void LeftShoulder_Released(object sender, ActionEventArgs e)
 {
     cbButtonLeftShoulder.IsChecked = false;
     txtGamePadLastAction.Text = "Left Shoulder button released";
 }
Esempio n. 23
0
        public virtual void OnAction(ActionEventArgs e)
        {

            EventHandler<ActionEventArgs> handler = this.Action;
        }