private void Save() { foreach (Control c in tableLayoutPanel1.Controls) { ShortcutControl scc = c as ShortcutControl; if (scc != null && scc.Recording) { scc.SaveRecording(); } } }