Beispiel #1
0
        void CustomizeControls()
        {
            ActionKeybindEditor editor = new ActionKeybindEditor(actionList.ActionKeyMappings.ToArray());

            editor.ShowDialog();

            // copy all our mappings back
            actionList.ActionKeyMappings.Clear();

            ActionKeyMapping[] newMappings = editor.GetActionkeyMappings();
            foreach (ActionKeyMapping mapping in newMappings)
            {
                actionList.ActionKeyMappings.Add(mapping);
            }

            actionInputCollector.SetActions(newMappings);

            // save our controls
            string saveControlsPath = Path.Combine(Application.StartupPath, "keybinds.ini");

            actionList.Save(saveControlsPath);

            this.BringToFront();
            optionsEditor.BringToFront();
            optionsEditor.Focus();
            //this.panel1.Focus();
        }
Beispiel #2
0
 private void preferencesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     optionsEditor.Show();
     optionsEditor.BringToFront();
     optionsEditor.Focus();
 }