public static clsOption<clsKeyboardControl> KeyboardControlOptionCreate(string saveKey, clsKeyboardControl defaultValue) { clsOption<clsKeyboardControl> option2 = new clsOption<clsKeyboardControl>(saveKey, defaultValue); Options_KeyboardControls.Options.Add(option2.GroupLink); return option2; }
private void btnKeyControlChange_Click(object sender, EventArgs e) { if (this.lstKeyboardControls.SelectedIndex >= 0) { frmKeyboardControl control = new frmKeyboardControl(); if ((control.ShowDialog() == DialogResult.OK) && (control.Results.Count != 0)) { clsOption<clsKeyboardControl> optionItem = this.lstKeyboardControls_Items[this.lstKeyboardControls.SelectedIndex]; clsKeyboardControl control3 = (clsKeyboardControl) this.ChangedKeyControls.get_Value(optionItem); Keys[] keys = new Keys[(control.Results.Count - 1) + 1]; int num2 = control.Results.Count - 1; for (int i = 0; i <= num2; i++) { keys[i] = control.Results[i].Item; } clsKeyboardControl control2 = new clsKeyboardControl(keys, control3.UnlessKeys); this.ChangedKeyControls.set_Changes(optionItem, new clsOptionProfile.clsChange<clsKeyboardControl>(control2)); this.UpdateKeyboardControl(optionItem.GroupLink.ArrayPosition); } } }