示例#1
0
 public static void SerializeColor(XmlElement node, string name, Color color)
 {
     if (!color.IsEmpty)
     {
         ST.WriteTextNode(node, name, ST.ToString(color));
     }
 }
示例#2
0
        public ShortcutKeysEditor()
        {
            InitializeComponent();

            // init keys
            foreach (Keys keys in KeyMap.ValidKeys)
            {
                this.cmbKey.Items.Add(ST.ToString(keys));
            }

            LanguageManage.CurrentChanged += new EventHandler(LanguageManage_CurrentChanged);
            OnCurrentLanguageChanged();
        }
示例#3
0
        protected virtual void OnValueChanged()
        {
            chkCtrl.Checked  = (Value & Keys.Control) != Keys.None;
            chkAlt.Checked   = (Value & Keys.Alt) != Keys.None;
            chkShift.Checked = (Value & Keys.Shift) != Keys.None;

            Keys keyCode = Value & Keys.KeyCode;

            if (keyCode == Keys.None)
            {
                cmbKey.SelectedIndex = -1;
            }
            else if (KeyMap.IsValidKey(keyCode))
            {
                cmbKey.SelectedItem = ST.ToString(keyCode);
            }
            else
            {
                cmbKey.SelectedIndex = -1;
            }
            this.updateCurrentValue = true;
        }
示例#4
0
 public override string ToString()
 {
     return(ST.ToString(Keys));
 }
示例#5
0
 public string KeysToString()
 {
     return(ST.ToString(Keys, "+"));
 }