private void SaveCurrentControl() { if (contentPanel.HasChildren) { ISettingsControl currentControl = contentPanel.Controls[0] as ISettingsControl; if (currentControl != null) { currentControl.Save(); } } }
private void ApplyButton_Click(object sender, EventArgs e) { ISettingsControl cnt = (ISettingsControl)m_ActiveControl; Debug.Assert(cnt != null); if (cnt.IsDirty) { try { cnt.Verify(); cnt.Save(); cnt.UpdateEnvironment(); } catch (Exception ex) { this.ShowError(ex.Message); } } else { this.ShowExclamation("Nothing to save."); } }