Пример #1
0
        public SystemButtonEntryCombined([LocalizationRequired(false)] string id, string displayName,
                                         bool shiftToInvert = false, bool customCommand         = false, Func <Keys?, IEnumerable <Keys> > fixedValueCallback = null,
                                         SystemButtonEntry buttonReference = null, bool delayed = false, string toolTip = null, string displayModifiers = "Ctrl+",
                                         Keys?defaultKey = null)
        {
            _fixedValueCallback                = fixedValueCallback;
            WheelButton                        = new WheelButtonEntry(id, displayName, true);
            WheelButtonModifier                = new WheelButtonEntry(id, displayName, false, true);
            WheelButton.ModifierButton         = WheelButtonModifier;
            WheelButtonModifier.ModifierButton = WheelButton;
            SystemButton                       = fixedValueCallback == null ? new SystemButtonEntry(id, displayName, defaultKey) : null;
            ShiftToInvert                      = shiftToInvert;
            CustomCommand                      = customCommand;
            Delayed          = delayed;
            ToolTip          = toolTip;
            DisplayModifiers = displayModifiers;

            _systemButtonReference = buttonReference ?? SystemButton;
            if (_systemButtonReference != null)
            {
                _systemButtonReference.PropertyChanged += OnSystemButtonPropertyChanged;
            }

            UpdateDisplayFixedValue();
        }
Пример #2
0
 public CustomButtonEntryCombined([LocalizationRequired(false)] string id, string displayName,
                                  string toolTip = null, Keys?defaultKey = null, Keys?defaultModifierKey = null)
 {
     WheelButton              = new WheelButtonEntry(id, displayName, true);
     Button                   = new CustomButtonEntry(id, displayName, defaultKey, false);
     ButtonModifier           = new CustomButtonEntry(id, displayName, defaultModifierKey, true);
     Button.ModifierReference = ButtonModifier;
     ToolTip                  = toolTip;
 }
Пример #3
0
 public CustomButtonEntryCombined([LocalizationRequired(false)] string id, string displayName,
                                  string toolTip, Keys?defaultKey, [CanBeNull] List <Keys> modifiers)
 {
     WheelButton                        = new WheelButtonEntry(id, displayName, true);
     WheelButtonModifier                = new WheelButtonEntry(id, displayName, false, true);
     WheelButton.ModifierButton         = WheelButtonModifier;
     WheelButtonModifier.ModifierButton = WheelButton;
     Button  = new CustomButtonEntry(id, displayName, defaultKey, modifiers);
     ToolTip = toolTip;
 }
Пример #4
0
 public WheelButtonCombined([LocalizationRequired(false)] string id, string displayName, bool isNew = false)
 {
     IsNew          = isNew;
     WheelButton    = new WheelButtonEntry(id, displayName);
     KeyboardButton = new KeyboardButtonEntry(id, displayName);
 }