private void BindProfile(ProfileConfiguration cfg) { if (cfg == null) { return; } cfg.RightTrigger.Trigger = Program.Simulator.Controller.RightTrigger; cfg.LeftTrigger.Trigger = Program.Simulator.Controller.LeftTrigger; cfg.RightThumb.Thumb = Program.Simulator.Controller.RightThumb; cfg.LeftThumb.Thumb = Program.Simulator.Controller.LeftThumb; cfg.RightTrigger.Bind( () => cfgTrgRightEnabled.Checked, (a) => cfgTrgRightEnabled.Checked = a, () => cfgTrgRightVal.Value, (a) => cfgTrgRightVal.Value = a ); cfg.LeftTrigger.Bind( () => cfgTrgLeftEnabled.Checked, (a) => cfgTrgLeftEnabled.Checked = a, () => cfgTrgLeftVal.Value, (a) => cfgTrgLeftVal.Value = a ); cfg.RightThumb.Bind( () => cfgDZRightX.Value, (a) => cfgDZRightX.Value = a, () => cfgDZRightY.Value, (a) => cfgDZRightY.Value = a ); cfg.LeftThumb.Bind( () => cfgDZLeftX.Value, (a) => cfgDZLeftX.Value = a, () => cfgDZLeftY.Value, (a) => cfgDZLeftY.Value = a ); cfg.BindCursorSpeed( () => cfgCursorSpeed.Value, (a) => cfgCursorSpeed.Value = a ); cfgBtnA.Config = cfg.Buttons[(int)SmartController.GamepadButtons.A]; cfgBtnB.Config = cfg.Buttons[(int)SmartController.GamepadButtons.B]; cfgBtnX.Config = cfg.Buttons[(int)SmartController.GamepadButtons.X]; cfgBtnY.Config = cfg.Buttons[(int)SmartController.GamepadButtons.Y]; cfgBtnBack.Config = cfg.Buttons[(int)SmartController.GamepadButtons.Back]; cfgBtnStart.Config = cfg.Buttons[(int)SmartController.GamepadButtons.Start]; cfgBtnRT.Config = cfg.Buttons[(int)SmartController.GamepadButtons.RightThumb]; cfgBtnLT.Config = cfg.Buttons[(int)SmartController.GamepadButtons.LeftThumb]; cfgBtnRS.Config = cfg.Buttons[(int)SmartController.GamepadButtons.RightShoulder]; cfgBtnLS.Config = cfg.Buttons[(int)SmartController.GamepadButtons.LeftShoulder]; cfgBtnDPUp.Config = cfg.Buttons[(int)SmartController.GamepadButtons.DPadUp]; cfgBtnDPDown.Config = cfg.Buttons[(int)SmartController.GamepadButtons.DPadDown]; cfgBtnDPLeft.Config = cfg.Buttons[(int)SmartController.GamepadButtons.DPadLeft]; cfgBtnDPRight.Config = cfg.Buttons[(int)SmartController.GamepadButtons.DPadRight]; }