private void PropertyPage_Save(object sender, ResultEventArgs <bool> e) { if (this.generalPropPage.IsValid() == false || this.accountsPropPage.IsValid() == false) { MsgBoxUtil.Show(this.generalPropPage.ParentSheet, "Some information is missing or incorrect. Please review and correct the information entered on each page."); e.Result = false; } else { if (this.generalPropPage.IsDirty() == true || this.accountsPropPage.IsDirty() == true) { // load app info from SSO this.appInfo = SSOManager.GetApplicationInfo(this.appInfo.Name); // update it with new information from property pages this.generalPropPage.Update(this.appInfo); this.accountsPropPage.Update(this.appInfo); // save changes into SSO SSOManager.UpdateApplicationInfo(this.appInfo); // notify subscribers the application has been saved this.OnSaved(EventArgs.Empty); } e.Result = true; } }
public AppPropertyPageManager(string appName) { // load app info from SSO this.appInfo = SSOManager.GetApplicationInfo(appName); // initialize property pages // general this.generalPropPage = new AppGeneralPropertyPage(); this.generalPropPage.Load += PropertyPage_Load; this.generalPropPage.Save += PropertyPage_Save; // accounts this.accountsPropPage = new AppAccountsPropertyPage(); }