private void EventFormClosed(object sender, FormClosedEventArgs e) { foreach (TreeNode node in TreeViewOptions.Nodes) { OptionPageWinForms page = node.Tag as OptionPageWinForms; page.Dispose(); } }
private void EventFormClosed(object sender, EventArgs e) { foreach (TabPage page in iTabControl.TabPages) { OptionPageWinForms optionPage = page.Tag as OptionPageWinForms; optionPage.Dispose(); } }