private void Save() { foreach (Control c in tableLayoutPanel1.Controls) { ShortcutControl scc = c as ShortcutControl; if (scc != null && scc.Recording) { scc.SaveRecording(); } } }
private void UpdateControls() { this.tableLayoutPanel1.Controls.Clear(); foreach (KeyboardShortcut keyboardShortcut in KeyboardShortcuts.Instance.Shortcuts) { ShortcutControl scc = new ShortcutControl(keyboardShortcut); scc.ShortcutRecorded += this.OnShortcutRecorded; tableLayoutPanel1.Controls.Add(scc); } Update(); }