예제 #1
0
 private void updateDisplay()
 {
     for (var i = 0; i < NUMBER_OF_KEY; i++)
     {
         keyBoxs[i].Text = KeyBinding.GetKeyChar(KeyBinding.GetNoteToKey(i + 48)).ToString();
     }
 }
예제 #2
0
        private void KeyBindForm_Load(object sender, EventArgs e)
        {
            KeyBinding.LoadConfig();
            for (var i = 0; i < 13; i++)
            {
                keyBoxs[i].Text = KeyBinding.GetKeyChar(KeyBinding.GetNoteToKey(i + 72)).ToString();
            }
            //keyBoxs[12].Text = KeyBinding.GetKeyChar(KeyBinding.GetNoteToKey(84)).ToString();
            var settingLower  = KeyBinding.GetNoteToCtrlKey(OCTAVE_KEY_LOW);
            var settingHigher = KeyBinding.GetNoteToCtrlKey(OCTAVE_KEY_HIGH);

            switch (settingLower)
            {
            case Keys.ControlKey: cbOctaveLower.Text = "Ctrl";
                break;

            case Keys.Menu: cbOctaveLower.Text = "Alt";
                break;

            case Keys.ShiftKey: cbOctaveLower.Text = "Shift";
                break;
            }

            switch (settingHigher)
            {
            case Keys.ControlKey:
                cbOctaveHigher.Text = "Ctrl";
                break;

            case Keys.Menu:
                cbOctaveHigher.Text = "Alt";
                break;

            case Keys.ShiftKey:
                cbOctaveHigher.Text = "Shift";
                break;
            }
        }