Пример #1
0
        /// <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("GroupMemofEditProperities"))
                    {
                        GroupMemOfPage _groupMemPage = (GroupMemOfPage)page;
                        if (!_groupMemPage.OnApply())
                        {
                            return(false);
                        }
                    }
                    if (page.PageID.Trim().Equals("GroupMembersEditProperities"))
                    {
                        GroupMembersPage _groupMemsPage = (GroupMembersPage)page;
                        if (!_groupMemsPage.OnApply())
                        {
                            return(false);
                        }
                    }
                    if (page.PageID.Trim().Equals("GroupGeneralEditProperities"))
                    {
                        GroupGeneralEditPage _editPage = (GroupGeneralEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return(false);
                        }
                    }
                    if (page.PageID.Trim().Equals("BuiltinGroupGeneralEditProperities"))
                    {
                        BuiltinGroupGeneralEditPage _editPage = (BuiltinGroupGeneralEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return(false);
                        }
                    }
                }
            }
            Applied = true;
            return(true);
        }
Пример #2
0
        /// <summary>
        /// Method to initailize the tab pages for the property sheet
        /// </summary>
        private void InitializePages()
        {
            MPPage page = null;

            if (_dirnode.ObjectClass.Equals("foreignSecurityPrincipal"))
            {
                page = new BuiltinGroupGeneralEditPage();
                this.AddPage(page,
                             new MPMenuItem(page.PageID, "General", "General"),
                             MPMenu.POSITION_END);

                page = new GroupMemOfPage(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);
            }
            else
            {
                page = new GroupGeneralEditPage();
                this.AddPage(page,
                             new MPMenuItem(page.PageID, "General", "General"),
                             MPMenu.POSITION_END);

                page = new GroupMembersPage(this._container, this._plugin);
                this.AddPage(page,
                             new MPMenuItem(page.PageID, "Members", "Members"),
                             MPMenu.POSITION_END);

                page = new GroupMemOfPage(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 initailize the tab pages for the property sheet
    /// </summary>
    private void InitializePages()
    {
        MPPage page = null;

        if (_dirnode.ObjectClass.Equals("foreignSecurityPrincipal"))
        {
            page = new BuiltinGroupGeneralEditPage();
            this.AddPage(page,
                     new MPMenuItem(page.PageID, "General", "General"),
                     MPMenu.POSITION_END);

            page = new GroupMemOfPage(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);
        }
        else
        {
            page = new GroupGeneralEditPage();
            this.AddPage(page,
                         new MPMenuItem(page.PageID, "General", "General"),
                         MPMenu.POSITION_END);

            page = new GroupMembersPage(this._container, this._plugin);
            this.AddPage(page,
                         new MPMenuItem(page.PageID, "Members", "Members"),
                         MPMenu.POSITION_END);

            page = new GroupMemOfPage(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);
        }
    }