public static ShortcutEntry get(ShortcutId _id) { ShortcutEntry e = null; m_entrys.TryGetValue(_id.ToString(), out e); return(e); }
public KeybindModal(Launcher _mainForm, ShortcutId _id) { InitializeComponent(); //progressBar1.Maximum = MOD_CHOICE_TIME; m_mainForm = _mainForm; this.FormClosing += KeybindModal_FormClosing; m_shortcut = _id; labelTitle.Text = string.Format(TITLE_RECORD, _id); btnAccept.Enabled = false; btnAgain.Enabled = false; startRecording(); }
public static void setShortcut(ShortcutId _id, Key[] _modifiers, Key?_key) { if (m_entrys.ContainsKey(_id.ToString())) { m_entrys[_id.ToString()].key = _key?.ToString(); m_entrys[_id.ToString()].OpentTkKey = _key != null ? (Key)_key : Key.Unknown; string[] _mods = new string[_modifiers.Length]; for (int i = 0; i < _modifiers.Length; i++) { _mods[i] = _modifiers[i].ToString(); } m_entrys[_id.ToString()].modifiers = _mods; m_entrys[_id.ToString()].OpenTkModifiers = _modifiers; } }