/// <summary> /// Instance of the soundboard numberpad /// </summary> public Soundboard() { InitializeComponent(); this._console = HotkeyConsole.GetInstance(); // assign hotkey values ghk1 = new GlobalHotkey(Constants.ALT + Constants.CTRL, Keys.D1, this); ghk2 = new GlobalHotkey(Constants.ALT + Constants.CTRL, Keys.D2, this); ghk3 = new GlobalHotkey(Constants.ALT + Constants.CTRL, Keys.D3, this); ghk4 = new GlobalHotkey(Constants.ALT + Constants.CTRL, Keys.D4, this); ghk5 = new GlobalHotkey(Constants.ALT + Constants.CTRL, Keys.D5, this); ghk6 = new GlobalHotkey(Constants.ALT + Constants.CTRL, Keys.D6, this); ghk7 = new GlobalHotkey(Constants.ALT + Constants.CTRL, Keys.D7, this); ghk8 = new GlobalHotkey(Constants.ALT + Constants.CTRL, Keys.D8, this); ghk9 = new GlobalHotkey(Constants.ALT + Constants.CTRL, Keys.D9, this); // the _hotkey array is used to iterate through all the keys in a loop // in other parts of the program, so there are chunks of code repeated 9 times everywhere. Hotkeys[0] = null; // i don't want to deal with zero based numbering for readability's sake Hotkeys[1] = ghk1; Hotkeys[2] = ghk2; Hotkeys[3] = ghk3; Hotkeys[4] = ghk4; Hotkeys[5] = ghk5; Hotkeys[6] = ghk6; Hotkeys[7] = ghk7; Hotkeys[8] = ghk8; Hotkeys[9] = ghk9; // load the config if there is one from a previous session AudioConfig.checkLoadConfig(); // set up or install the Virtual Audio Cable AudioConfig.CheckSetupAudio(); }