Esempio n. 1
0
        internal ButtonManager(KeyboardControl parent, ButtonBase button)
        {
            _parent = parent;
            Button  = button;

            button.Command = this;
        }
Esempio n. 2
0
        internal static PredictionButtonManager CreateInstance(KeyboardControl parent, PredictionKey key)
        {
            var button  = new KeyboardButton();
            var manager = new PredictionButtonManager(parent, key, button);

            return(manager);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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;
         }
     }
 }
Esempio n. 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);
 }
Esempio n. 9
0
 internal KeyboardGrid(KeyboardControl parent)
 {
     _parent = parent;
 }
Esempio n. 10
0
 public PredictionButtonManager(KeyboardControl parent, PredictionKey key, ButtonBase button)
     : base(parent, key, button)
 {
 }
Esempio n. 11
0
 public TextButtonManager(KeyboardControl parent, TextKey key, Button button)
     : base(parent, key, button)
 {
 }