public static void LoadDefaultSettings()
 {
     if (!alwaysKey.IsSet)
     {
         alwaysKey = new HotKeys.Key(Keys.F1);
     }
     if (!autoKey.IsSet)
     {
         autoKey = new HotKeys.Key(Keys.F2);
     }
     if (!neverKey.IsSet)
     {
         neverKey = new HotKeys.Key(Keys.F3);
     }
 }
        public ChangeModeRow(string name, HotKeys.Key key, KeySelectionButton.SelectedKeyChange onChange)
        {
            FlowDirection = FlowDirection.LeftToRight;
            Size          = UI.Layout.MainControl.SkillContainer.SkillBar.Rect.Size;

            nameLabel = new Label()
            {
                Text = name,
                Font = Theme.Fonts.H4
            };
            Controls.Add(nameLabel);

            ksb = new KeySelectionButton(key, onChange)
            {
                Size = UI.Layout.MainControl.SkillContainer.SkillBar.KeySelect.Rect.Size
            };
            Controls.Add(ksb);
        }
 public static void LoadSettings(XmlNode n)
 {
     foreach (XmlElement e in n.ChildNodes)
     {
         var key = int.Parse(e.GetAttribute("key"));
         if (e.GetAttribute("id") == "active-mode-never")
         {
             neverKey = new HotKeys.Key((Keys)key);
         }
         if (e.GetAttribute("id") == "active-mode-auto")
         {
             autoKey = new HotKeys.Key((Keys)key);
         }
         if (e.GetAttribute("id") == "active-mode-always")
         {
             alwaysKey = new HotKeys.Key((Keys)key);
         }
     }
 }
 public static void ChangeNeverKey(HotKeys.Key key)
 {
     neverKey = key;
     ShowRestartInfo();
 }
 public static void ChangeAutoKey(HotKeys.Key key)
 {
     autoKey = key;
     ShowRestartInfo();
 }
 public static void ChangeAlwaysKey(HotKeys.Key key)
 {
     alwaysKey = key;
     ShowRestartInfo();
 }