Exemple #1
0
        private void selectedKeybinding_SelectedIndexChanged(object sender, EventArgs e)
        {
            current = bindings.bindings[selectedKeybinding.SelectedItem.ToString()];

            Keybindings.Set(bindings);

            modifierShift.Checked = current.SHIFT;
            modifierCtrl.Checked  = current.CTRL;
            modifierAlt.Checked   = current.ALT;
            modifierSuper.Checked = current.SUPER;

            key.Text = current.Key.ToString();
        }
Exemple #2
0
        public AdjustKeybindings(ref Keybindings keybindings)
        {
            InitializeComponent();

            this.bindings = keybindings;

            foreach (string binding in keybindings.bindings.Keys)
            {
                selectedKeybinding.Items.Add(binding);
            }

            selectedKeybinding.SelectedIndex = 0;

            FormClosed += (a, b) => {
                Keybindings.Set(bindings);
            };
        }