예제 #1
0
 private InputAction(InputActionTypeEnum actionType, bool shift, bool control, bool alt)
     : this()
 {
     this.ActionType = actionType;
     this.Shift      = shift;
     this.Control    = control;
     this.Alt        = alt;
 }
예제 #2
0
 private InputActionModel(InputActionTypeEnum actionType, bool shift, bool control, bool alt)
     : base(ActionTypeEnum.Input)
 {
     this.ActionType = actionType;
     this.Shift      = shift;
     this.Control    = control;
     this.Alt        = alt;
 }
 public override ActionBase GetAction()
 {
     if (this.KeyButtonActionComboBox.SelectedIndex >= 0)
     {
         InputActionTypeEnum actionType = (InputActionTypeEnum)this.KeyButtonActionComboBox.SelectedItem;
         if (this.InputTypeComboBox.SelectedIndex == 0 && this.KeyboardKeyComboBox.SelectedIndex >= 0)
         {
             return(new InputAction(EnumHelper.GetEnumValueFromString <InputKeyEnum>((string)this.KeyboardKeyComboBox.SelectedItem), actionType,
                                    this.ShiftCheckBox.IsChecked.GetValueOrDefault(), this.ControlCheckBox.IsChecked.GetValueOrDefault(), this.AltCheckBox.IsChecked.GetValueOrDefault()));
         }
         else if (this.InputTypeComboBox.SelectedIndex == 1 && this.MouseButtonComboBox.SelectedIndex >= 0)
         {
             return(new InputAction((SimpleInputMouseEnum)this.MouseButtonComboBox.SelectedItem, actionType,
                                    this.ShiftCheckBox.IsChecked.GetValueOrDefault(), this.ControlCheckBox.IsChecked.GetValueOrDefault(), this.AltCheckBox.IsChecked.GetValueOrDefault()));
         }
     }
     return(null);
 }
예제 #4
0
 public InputAction(SimpleInputMouseEnum mouse, InputActionTypeEnum actionType, bool shift, bool control, bool alt)
     : this(actionType, shift, control, alt)
 {
     this.Mouse = mouse;
 }
예제 #5
0
 public InputAction(InputKeyEnum key, InputActionTypeEnum actionType, bool shift, bool control, bool alt)
     : this(actionType, shift, control, alt)
 {
     this.Key = key;
 }