/// <summary> /// Method to initailize the tab pages for the property sheet /// </summary> private void InitializePages() { MPPage page = null; page = new ComputerGeneralEditPage(); this.AddPage(page, new MPMenuItem(page.PageID, "General", "General"), MPMenu.POSITION_END); page = new ComputerOSEditPage(); this.AddPage(page, new MPMenuItem(page.PageID, "Operating System", "Operating System"), MPMenu.POSITION_END ); page = new ComputerMemOfPage(this._container, this._plugin); this.AddPage(page, new MPMenuItem(page.PageID, "Member Of", "Member Of"), MPMenu.POSITION_END); page = new ADEditPage(this); this.AddPage(page, new MPMenuItem(page.PageID, "Advanced", "Advanced"), MPMenu.POSITION_END ); }
/// <summary> /// Method to call the Apply functionality for each of tab pages of type MPage. /// </summary> /// <param name="actionCause"></param> /// <returns></returns> protected override bool Apply(EditDialogAction actionCause) { if (Applied && !bDataWasChanged) { return(true); } foreach (MPPage page in this.GetPages()) { if (page != null) { IDirectoryPropertiesPage ipp = page as IDirectoryPropertiesPage; if (page.PageID.Trim().Equals("EditProperitiesAdvanced")) { ADEditPage _editPage = (ADEditPage)page; if (!_editPage.OnApply()) { return(false); } } if (page.PageID.Trim().Equals("ComputerMemofEditProperities")) { ComputerMemOfPage _computerMemPage = (ComputerMemOfPage)page; if (!_computerMemPage.OnApply()) { return(false); } } if (page.PageID.Trim().Equals("ComputerGeneralEditProperities")) { ComputerGeneralEditPage _computereditPage = (ComputerGeneralEditPage)page; if (!_computereditPage.OnApply()) { return(false); } } } } Applied = true; return(true); }