示例#1
0
 private void SaveCurrentControl()
 {
     if (contentPanel.HasChildren)
     {
         ISettingsControl currentControl = contentPanel.Controls[0] as ISettingsControl;
         if (currentControl != null)
         {
             currentControl.Save();
         }
     }
 }
示例#2
0
        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.");
            }
        }