Пример #1
0
        internal ButtonManager(KeyboardControl parent, ButtonBase button)
        {
            _parent = parent;
            Button  = button;

            button.Command = this;
        }
Пример #2
0
        internal static PredictionButtonManager CreateInstance(KeyboardControl parent, PredictionKey key)
        {
            var button  = new KeyboardButton();
            var manager = new PredictionButtonManager(parent, key, button);

            return(manager);
        }
Пример #3
0
        internal static CustomCommandButtonManager CreateInstance(KeyboardControl parent, CommandKey key)
        {
            Debug.Assert(!key.Toggles);
            ButtonBase button  = new KeyboardButton();
            var        manager = new CustomCommandButtonManager(parent, key, button);

            return(manager);
        }
Пример #4
0
        internal static TextButtonManager CreateInstance(KeyboardControl parent, TextKey key)
        {
            var button  = new KeyboardButton();
            var manager = new TextButtonManager(parent, key, button);

            manager.UpdateStateModifiers();
            return(manager);
        }
        internal static ModifierCommandButtonManager CreateInstance(KeyboardControl parent, CommandKey key)
        {
            Debug.Assert(key.Toggles);
            ButtonBase button  = new KeyboardToggleButton();
            var        manager = new ModifierCommandButtonManager(parent, key, button);

            manager.UpdateStateModifiers();
            return(manager);
        }
Пример #6
0
 internal CommandButtonManager(KeyboardControl parent, CommandKey key, ButtonBase button)
     : base(parent, key, button)
 {
     if (key.Label != null)
     {
         button.Content = key.Label;
     }
     else
     {
         var template = parent.Resources[key.Icon];
         if (template != null)
         {
             button.ContentTemplate = (DataTemplate)template;
         }
         else
         {
             Debug.Fail($"No template for {key.Icon}");
             button.Content = key.Icon;
         }
     }
 }
Пример #7
0
 private CustomCommandButtonManager(KeyboardControl parent, CommandKey key, ButtonBase button)
     : base(parent, key, button)
 {
 }
 private FunctionCommandButtonManager(KeyboardControl parent, CommandKey key, ButtonBase button)
     : base(parent, key, button)
 {
     _keyName = (KeyName)Enum.Parse(typeof(KeyName), _key.CommandParameter);
 }
Пример #9
0
 internal KeyboardGrid(KeyboardControl parent)
 {
     _parent = parent;
 }
Пример #10
0
 public PredictionButtonManager(KeyboardControl parent, PredictionKey key, ButtonBase button)
     : base(parent, key, button)
 {
 }
Пример #11
0
 public TextButtonManager(KeyboardControl parent, TextKey key, Button button)
     : base(parent, key, button)
 {
 }