private void InitializePages(string serviceName) { MPPage page = null; page = new GeneralPropertyPage(this, this._container, this._plugin, serviceName); this.AddPage(page, new MPMenuItem(page.PageID, "General", "General"), MPMenu.POSITION_BEGINING); if (Configurations.currentPlatform == LikewiseTargetPlatform.Windows) { page = new ServiceRecoveryPage(this._container, this._plugin, serviceName); this.AddPage(page, new MPMenuItem(page.PageID, "Recovery", "Recovery"), MPMenu.POSITION_BEGINING); } page = new DependenciesPage(this._container, serviceName); this.AddPage(page, new MPMenuItem(page.PageID, "Dependencies", "Dependencies"), MPMenu.POSITION_END); foreach (IDirectoryPropertiesPage ppage in this.GetPages()) { if (ppage != null) { ppage.SetData(); } } }
protected override bool Apply(EditDialog.EditDialogAction actionCause) { base.Apply(actionCause); foreach (IDirectoryPropertiesPage ppage in this.GetPages()) { if (ppage != null && ppage is ServiceRecoveryPage) { GeneralPropertyPage generalPage = ppage as GeneralPropertyPage; if (generalPage != null) { if (!generalPage.OnApply()) { return(false); } } ServiceRecoveryPage recoveryPage = ppage as ServiceRecoveryPage; if (recoveryPage != null) { if (!recoveryPage.OnApply()) { return(false); } } DependenciesPage dependencyPage = ppage as DependenciesPage; if (dependencyPage != null) { if (!dependencyPage.OnApply()) { return(false); } } } } commit = true; return(true); }
private void InitializePages(string serviceName) { MPPage page = null; page = new GeneralPropertyPage(this, this._container, this._plugin, serviceName); this.AddPage(page, new MPMenuItem(page.PageID, "General", "General"), MPMenu.POSITION_BEGINING); if (Configurations.currentPlatform == LikewiseTargetPlatform.Windows) { page = new ServiceRecoveryPage(this._container, this._plugin, serviceName); this.AddPage(page, new MPMenuItem(page.PageID, "Recovery", "Recovery"), MPMenu.POSITION_BEGINING); } page = new DependenciesPage(this._container, serviceName); this.AddPage(page, new MPMenuItem(page.PageID, "Dependencies", "Dependencies"), MPMenu.POSITION_END); foreach (IDirectoryPropertiesPage ppage in this.GetPages()) { if (ppage != null) ppage.SetData(); } }