Exemple #1
0
        private void tbMapName_TextChanged(object sender, EventArgs e)
        {
            KeyMap map = (KeyMap)cmbKeyMapList.Items[cmbKeyMapList.SelectedIndex];

            map.Name = tbMapName.Text;
            cmbKeyMapList.Items[cmbKeyMapList.SelectedIndex] = map;
        }
Exemple #2
0
        private void cmbKeyMapList_SelectedValueChanged(object sender, EventArgs e)
        {
            UpdateButtons();
            KeyMap km = (KeyMap)cmbKeyMapList.SelectedItem;

            tbMapName.Text = km.Name;
            btnDel.Enabled = !km.IsPermanent;
        }
Exemple #3
0
        private void AddKeyList()
        {
            if (MapList.Count >= 7)
            {
                return;
            }
            KeyMap map = new KeyMap("New Map", false, controller.addNewMap());

            MapList.Add(map);
            cmbKeyMapList.Items.Add(map);
            cmbKeyMapList.SelectedIndex = cmbKeyMapList.Items.Count - 1;
        }
Exemple #4
0
        private void UpdateButtons()
        {
            KeyMap maps = (KeyMap)cmbKeyMapList.SelectedItem;

            foreach (KeyValuePair <ushort, IKeyProcess> map in maps.Map)
            {
                if (!buttons.ContainsKey(map.Key))
                {
                    continue;
                }
                buttons[map.Key].Text      = map.Value.Name;
                buttons[map.Key].BackColor = map.Value.InterfaceColor;
            }
        }