private void Load() { _mouseWheelAction = MouseWheelActionOriginal; var keys = _settingsProvider.Get(SettingsConstants.KeyMap, DefaultSettings.KeyMap); _keys = new List <KeyCombinationItem>(); foreach (var pair in keys) { _keys.Add(new KeyCombinationItem { Key = pair.Key, KeyCombination = pair.Value }); } _defaultKeys = new List <KeyCombinationItem>(); foreach (var pair in DefaultSettings.KeyMap) { _defaultKeys.Add(new KeyCombinationItem { Key = pair.Key, KeyCombination = pair.Value }); } _originalKeys = keys; }
private void ReadSettings() { _topMost = _settingsProvider.Get(SettingsConstants.TopMost, DefaultSettings.TopMost); _centerWindow = _settingsProvider.Get(SettingsConstants.CenterWindow, DefaultSettings.CenterWindow); ReadKeyCombinations(); _mouseWheelAction = _settingsProvider.Get(SettingsConstants.MouseWheelAction, DefaultSettings.MouseWheekAction); }
/// <summary> /// Initialize a new instance of the <see cref="MouseHookEventArgs"/> class. /// </summary> /// <param name="coords">the coordonates of the mouse.</param> /// <param name="deltaCoords">the delta coordonates of the mouse.</param> /// <param name="mouseAction">which button has been pressed.</param> /// <param name="mouseWheelAction">whether the wheel is going up or down.</param> /// <param name="time">the date time of the event.</param> internal MouseHookEventArgs(Point coords, Point deltaCoords, MouseAction mouseAction, MouseWheelAction mouseWheelAction, long time) { Coords = coords; DeltaCoords = deltaCoords; Action = mouseAction; WheelAction = mouseWheelAction; Time = time; }
public InstantBind(MouseWheelAction wheel, MouseWheelAction alternativeWheel) : this() { Wheel = wheel; Type = InstantControlType.MouseWheel; AlternativeWheel = alternativeWheel; AlternativeType = InstantControlType.MouseWheel; }
public InstantBind(MouseWheelAction wheel, Key alternativeKey) : this() { Wheel = wheel; Type = InstantControlType.MouseWheel; AlternativeKey = alternativeKey; AlternativeType = InstantControlType.Key; }
public InstantBind(MouseButton button, MouseWheelAction alternativeWheel) : this() { Button = button; Type = InstantControlType.MouseButton; AlternativeWheel = alternativeWheel; AlternativeType = InstantControlType.MouseWheel; }
public InstantBind(Key key, MouseWheelAction wheelAction) : this() { Key = key; Type = InstantControlType.Key; AlternativeWheel = wheelAction; AlternativeType = InstantControlType.MouseWheel; }
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 override void WriteXml(XmlWriter writer) { base.WriteXml(writer); writer.WriteElementString("KnobImage", KnobImage); writer.WriteElementString("RotationStep", RotationStep.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("StepValue", StepValue.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("InitialRotation", InitialRotation.ToString(CultureInfo.InvariantCulture)); writer.WriteStartElement("ClickType"); writer.WriteElementString("Type", ClickType.ToString()); if (ClickType == Controls.ClickType.Swipe) { writer.WriteElementString("Sensitivity", SwipeSensitivity.ToString(CultureInfo.InvariantCulture)); } writer.WriteEndElement(); writer.WriteElementString("MouseWheel", MouseWheelAction.ToString(CultureInfo.InvariantCulture)); }
private void _settingsProvider_SettingChanged(object sender, SettingChangeEventArgs e) { if (e.SettingName.Equals(SettingsConstants.TopMost, StringComparison.InvariantCultureIgnoreCase)) { TopMost = _settingsProvider.Get(SettingsConstants.TopMost, DefaultSettings.TopMost); } else if (e.SettingName.Equals(SettingsConstants.CenterWindow, StringComparison.InvariantCultureIgnoreCase)) { CenterWindow = _settingsProvider.Get(SettingsConstants.CenterWindow, DefaultSettings.CenterWindow); } else if (e.SettingName.Equals(SettingsConstants.KeyMap, StringComparison.InvariantCultureIgnoreCase)) { ReadKeyCombinations(); } else if (e.SettingName.Equals(SettingsConstants.MouseWheelAction, StringComparison.InvariantCultureIgnoreCase)) { _mouseWheelAction = _settingsProvider.Get(SettingsConstants.MouseWheelAction, DefaultSettings.MouseWheekAction); } }
public override void WriteXml(XmlWriter writer) { TypeConverter colorConverter = TypeDescriptor.GetConverter(typeof(Color)); base.WriteXml(writer); writer.WriteElementString("KnobImage", KnobImage); writer.WriteStartElement("Positions"); foreach (RotarySwitchPosition position in Positions) { writer.WriteStartElement("Position"); writer.WriteAttributeString("Name", position.Name); writer.WriteAttributeString("Rotation", position.Rotation.ToString(CultureInfo.InvariantCulture)); writer.WriteEndElement(); } writer.WriteEndElement(); writer.WriteElementString("DefaultPosition", DefaultPosition.ToString(CultureInfo.InvariantCulture)); if (DrawLines) { writer.WriteStartElement("Lines"); writer.WriteElementString("Thickness", LineThickness.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("Length", LineLength.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("Color", colorConverter.ConvertToInvariantString(LineColor)); writer.WriteEndElement(); } if (DrawLabels) { writer.WriteStartElement("Labels"); writer.WriteElementString("Color", colorConverter.ConvertToInvariantString(LabelColor)); writer.WriteElementString("MaxWidth", MaxLabelWidth.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("MaxHeight", MaxLabelHeight.ToString(CultureInfo.InvariantCulture)); writer.WriteElementString("Distance", LabelDistance.ToString(CultureInfo.InvariantCulture)); LabelFormat.WriteXml(writer); writer.WriteEndElement(); } writer.WriteStartElement("ClickType"); writer.WriteElementString("Type", ClickType.ToString()); if (ClickType == Controls.ClickType.Swipe) { writer.WriteElementString("Sensitivity", SwipeSensitivity.ToString(CultureInfo.InvariantCulture)); } writer.WriteEndElement(); writer.WriteElementString("MouseWheel", MouseWheelAction.ToString(CultureInfo.InvariantCulture)); }
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(); }
public MouseWheelGesture() : base(MouseAction.WheelClick) { mouseWheelAction = MouseWheelAction.AllMovement; }
public static string GetName(MouseWheelAction wheelAction) { return(mouseWheel[wheelAction]); }
public InstantBind(MouseWheelAction wheelAction) : this() { Wheel = wheelAction; Type = InstantControlType.MouseWheel; }
/// <summary> /// Initializes a new instance of the MouseWheelGesture class /// </summary> /// <param name="mouseWheelAction">The action associated with this gesture</param> /// <param name="modifiers">The modifiers associated with this gesture</param> public MouseWheelGesture(MouseWheelAction mouseWheelAction, ModifierKeys modifiers) : base(MouseAction.WheelClick, modifiers) { MouseWheelAction = mouseWheelAction; }
/// <summary> /// Initializes a new instance of the MouseWheelGesture class /// </summary> /// <param name="mouseWheelAction">The action associated with this gesture</param> public MouseWheelGesture(MouseWheelAction mouseWheelAction) : base(MouseAction.WheelClick) { MouseWheelAction = mouseWheelAction; }
private void Control_MouseWheel(object sender, MouseEventArgs e) { MouseWheelAction?.Invoke(sender, e); }
public MouseWheelGesture(MouseWheelAction action) : base(MouseAction.WheelClick) { this.mouseWheelAction = action; }