public MapMouseWheelForm(PadTieForm mainForm, Controller cc, MouseWheelAction editing) : this(mainForm, cc) { this.editing = editing; motion.Text = editing.Value.ToString(); continuous.Checked = editing.Continuous; useIntensity.Checked = editing.UseIntensity; slotCapture.SetInput(editing.SlotDescription, true); }
public static MouseWheelAction Parse(InputCore core, string parseable) { string[] parts = parseable.Split(','); var mwa = new MouseWheelAction(core, short.Parse(parts[0])); if (parts.Length > 1) { mwa.Continuous = bool.Parse(parts[1]); mwa.UseIntensity = bool.Parse(parts[2]); } return mwa; }
public static MouseWheelAction Parse(InputCore core, string parseable) { string[] parts = parseable.Split(','); var mwa = new MouseWheelAction(core, short.Parse(parts[0])); if (parts.Length > 1) { mwa.Continuous = bool.Parse(parts[1]); mwa.UseIntensity = bool.Parse(parts[2]); } return(mwa); }
private void okBtn_Click(object sender, EventArgs e) { short w; try { w = short.Parse(motion.Text); } catch (Exception) { MessageBox.Show("The wheel motion value must be a positive or negative whole number."); return; } if (slotCapture.Value == null) { MessageBox.Show("Please click Capture and press a button or axis direction on the gamepad."); return; } var input = slotCapture.Value; MouseWheelAction action; if (editing == null) { action = new MouseWheelAction(Controller.Core, w); } else { action = editing; action.Value = w; if (action.SlotDescription != input) MapUtil.Map(MainForm, Controller.Virtual, action.SlotDescription, null); } action.UseIntensity = useIntensity.Checked; action.Continuous = continuous.Checked; MapUtil.Map(MainForm, Controller.Virtual, input, action); DialogResult = System.Windows.Forms.DialogResult.OK; this.Close(); }