public static void SerializeColor(XmlElement node, string name, Color color) { if (!color.IsEmpty) { ST.WriteTextNode(node, name, ST.ToString(color)); } }
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(); }
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; }
public override string ToString() { return(ST.ToString(Keys)); }
public string KeysToString() { return(ST.ToString(Keys, "+")); }