Ejemplo n.º 1
0
        /// <summary>
        /// Show hotKey setting
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void hotKeySetup_Click(object sender, EventArgs e)
        {
            FormKeySetup keySetup;

            if (sender.Equals(buttonA))
            {
                keySetup = new FormKeySetup(Properties.Settings.Default.ButtonA);
                keySetup.ShowDialog();
                Properties.Settings.Default.ButtonA = keySetup.HotKeys;
            }
            else if (sender.Equals(buttonB))
            {
                keySetup = new FormKeySetup(Properties.Settings.Default.ButtonB);
                keySetup.ShowDialog();
                Properties.Settings.Default.ButtonB = keySetup.HotKeys;
            }
            else if (sender.Equals(buttonC))
            {
                keySetup = new FormKeySetup(Properties.Settings.Default.ButtonC);
                keySetup.ShowDialog();
                Properties.Settings.Default.ButtonC = keySetup.HotKeys;
            }
            else if (sender.Equals(buttonD))
            {
                keySetup = new FormKeySetup(Properties.Settings.Default.ButtonD);
                keySetup.ShowDialog();
                Properties.Settings.Default.ButtonD = keySetup.HotKeys;
            }
            else if (sender.Equals(buttonLeft))
            {
                keySetup = new FormKeySetup(Properties.Settings.Default.JoyLeft);
                keySetup.ShowDialog();
                Properties.Settings.Default.JoyLeft = keySetup.HotKeys;
            }
            else if (sender.Equals(buttonRight))
            {
                keySetup = new FormKeySetup(Properties.Settings.Default.JoyRight);
                keySetup.ShowDialog();
                Properties.Settings.Default.JoyRight = keySetup.HotKeys;
            }
            else if (sender.Equals(buttonUp))
            {
                keySetup = new FormKeySetup(Properties.Settings.Default.JoyUp);
                keySetup.ShowDialog();
                Properties.Settings.Default.JoyUp = keySetup.HotKeys;
            }
            else if (sender.Equals(buttonDown))
            {
                keySetup = new FormKeySetup(Properties.Settings.Default.JoyDown);
                keySetup.ShowDialog();
                Properties.Settings.Default.JoyDown = keySetup.HotKeys;
            }
            Properties.Settings.Default.Save();
            LoadButtonsSettings();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Show hotKey setting
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void hotKeySetup_Click(object sender, EventArgs e)
        {
            FormKeySetup keySetup;

            if (sender.Equals(buttonA))
            {
                keySetup = new FormKeySetup(Properties.Settings.Default.ButtonA);
                keySetup.ShowDialog();
                Properties.Settings.Default.ButtonA = keySetup.HotKeys;
            }
            else if (sender.Equals(buttonB))
            {
                keySetup = new FormKeySetup(Properties.Settings.Default.ButtonB);
                keySetup.ShowDialog();
                Properties.Settings.Default.ButtonB = keySetup.HotKeys;
            }
            else if (sender.Equals(buttonC))
            {
                keySetup = new FormKeySetup(Properties.Settings.Default.ButtonC);
                keySetup.ShowDialog();
                Properties.Settings.Default.ButtonC = keySetup.HotKeys;
            }
            else if (sender.Equals(buttonD))
            {
                keySetup = new FormKeySetup(Properties.Settings.Default.ButtonD);
                keySetup.ShowDialog();
                Properties.Settings.Default.ButtonD = keySetup.HotKeys;
            }
            else if (sender.Equals(buttonLeft))
            {
                keySetup = new FormKeySetup(Properties.Settings.Default.JoyLeft);
                keySetup.ShowDialog();
                Properties.Settings.Default.JoyLeft = keySetup.HotKeys;
            }
            else if (sender.Equals(buttonRight))
            {
                keySetup = new FormKeySetup(Properties.Settings.Default.JoyRight);
                keySetup.ShowDialog();
                Properties.Settings.Default.JoyRight = keySetup.HotKeys;
            }
            else if (sender.Equals(buttonUp))
            {
                keySetup = new FormKeySetup(Properties.Settings.Default.JoyUp);
                keySetup.ShowDialog();
                Properties.Settings.Default.JoyUp = keySetup.HotKeys;
            }
            else if (sender.Equals(buttonDown))
            {
                keySetup = new FormKeySetup(Properties.Settings.Default.JoyDown);
                keySetup.ShowDialog();
                Properties.Settings.Default.JoyDown = keySetup.HotKeys;
            }
            Properties.Settings.Default.Save();
            LoadButtonsSettings();
        }