private CloseRootBoxes ( |
||
ctrl | A main window or any of its descendents | |
Résultat | void |
private void CloseRootBoxes(Control ctrl)
{
if (ctrl != null)
{
if (ctrl is ISettings)
((ISettings)ctrl).SaveSettingsNow();
if (ctrl is IRootSite)
((IRootSite)ctrl).CloseRootBox();
foreach (Control childControl in ctrl.Controls)
CloseRootBoxes(childControl);
}
}