Exemplo n.º 1
0
        private void setButton_Click(object sender, EventArgs e)
        {
            Global.saveColor(device,
                             colorChooserButton.BackColor.R,
                             colorChooserButton.BackColor.G,
                             colorChooserButton.BackColor.B);
            Global.saveLowColor(device,
                                lowColorChooserButton.BackColor.R,
                                lowColorChooserButton.BackColor.G,
                                lowColorChooserButton.BackColor.B);
            double middle;

            if (Double.TryParse(leftTriggerMiddlePoint.Text, out middle))
            {
                Global.setLeftTriggerMiddle(device, middle);
            }
            if (Double.TryParse(rightTriggerMiddlePoint.Text, out middle))
            {
                Global.setRightTriggerMiddle(device, middle);
            }
            scpDevice.setRumble(device, (byte)rumbleBoostBar.Value, (byte)leftMotorBar.Value, (byte)rightMotorBar.Value);
            Global.setTouchSensitivity(device, (byte)touchSensitivityBar.Value);
            Global.setTouchpadJitterCompensation(device, touchpadJitterCompensation.Checked);
            Global.setLowerRCOff(device, lowerRCOffCheckBox.Checked);
            Global.setTapSensitivity(device, (byte)tapSensitivityBar.Value);
            Global.setScrollSensitivity(device, (byte)scrollSensitivityBar.Value);
        }