private void LoadConfig() { Data data = new Data(); LabelUpLeft.Text =data.UpLeft; LabelUpRight.Text = data.UpRight; LabelCenter.Text = data.Center; LabelDownLeft.Text = data.DownLeft; LabelDownRight.Text = data.DownRight; }
private Joystick.Buttons calibrarDownRight() { var buttonDownRight = Joystick.Buttons.Button12; data = new Data(); switch (Int32.Parse(data.DownRight)) { case 1: buttonDownRight = Joystick.Buttons.Button1; break; case 2: buttonDownRight = Joystick.Buttons.Button2; break; case 3: buttonDownRight = Joystick.Buttons.Button3; break; case 4: buttonDownRight = Joystick.Buttons.Button4; break; case 5: buttonDownRight = Joystick.Buttons.Button5; break; case 6: buttonDownRight = Joystick.Buttons.Button6; break; case 7: buttonDownRight = Joystick.Buttons.Button7; break; case 8: buttonDownRight = Joystick.Buttons.Button8; break; case 9: buttonDownRight = Joystick.Buttons.Button9; break; case 10: buttonDownRight = Joystick.Buttons.Button10; break; case 11: buttonDownRight = Joystick.Buttons.Button11; break; } return buttonDownRight; }