/// <summary>
        /// Method to initailize the tab pages for the property sheet
        /// </summary>
        private void InitializePages()
        {
            MPPage page = null;

            if (ADUCPage.ADObjectType == "user")
            {
                page = new UserMultiselectGeneralEditPage(this);
                this.AddPage(page,
                             new MPMenuItem(page.PageID, "General", "General"),
                             MPMenu.POSITION_BEGINING
                             );

                page = new MultiItemsAddressEditPage(this, true);
                this.AddPage(page,
                             new MPMenuItem(page.PageID, "Address", "Address"),
                             MPMenu.POSITION_BEGINING
                             );
            }
            else if (ADUCPage.ADObjectType == "group")
            {
                page = new MultiItemsGeneralEditPage(this);
                this.AddPage(page,
                             new MPMenuItem(page.PageID, "General", "General"),
                             MPMenu.POSITION_BEGINING
                             );
            }
            else if (ADUCPage.ADObjectType == "organizationalUnit")
            {
                page = new MultiItemsGeneralEditPage(this);
                this.AddPage(page,
                             new MPMenuItem(page.PageID, "General", "General"),
                             MPMenu.POSITION_BEGINING
                             );
            }
            else
            {
                page = new MultiItemsGeneralEditPage(this);
                this.AddPage(page,
                             new MPMenuItem(page.PageID, "General", "General"),
                             MPMenu.POSITION_BEGINING
                             );
            }
        }
        /// <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);
            }
            //bool b = base.Apply(actionCause);
            foreach (MPPage page in this.GetPages())
            {
                if (page != null)
                {
                    IDirectoryPropertiesPage ipp = page as IDirectoryPropertiesPage;

                    if (page.PageID.Trim().Equals("UserMultiSelectProperities"))
                    {
                        UserMultiselectGeneralEditPage _editPage = (UserMultiselectGeneralEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return(false);
                        }
                    }
                    if (page.PageID.Trim().Equals("UserMultiSelectAddressProperities"))
                    {
                        MultiItemsAddressEditPage _editPage = (MultiItemsAddressEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return(false);
                        }
                    }
                    if (page.PageID.Trim().Equals("MultiItemsGeneralEditPage"))
                    {
                        MultiItemsGeneralEditPage _editPage = (MultiItemsGeneralEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return(false);
                        }
                    }
                }
            }
            Applied = true;
            return(true);
        }
예제 #3
0
        /// <summary>
        /// Method to initailize the tab pages for the property sheet
        /// </summary>
        private void InitializePages()
        {
            MPPage page = null;

            page = new UserGeneralEditPage();
            this.AddPage(page,
                         new MPMenuItem(page.PageID, "General", "General"),
                         MPMenu.POSITION_BEGINING);

            page = new MultiItemsAddressEditPage(this, false);
            this.AddPage(page,
                         new MPMenuItem(page.PageID, "Address", "Address"),
                         MPMenu.POSITION_BEGINING
                         );

            page = new UserAccountPage();
            this.AddPage(page,
                         new MPMenuItem(page.PageID, "Account", "Account"),
                         MPMenu.POSITION_BEGINING
                         );

            page = new UserProfilePage();
            this.AddPage(page,
                         new MPMenuItem(page.PageID, "Profile", "Profile"),
                         MPMenu.POSITION_BEGINING
                         );

            page = new UserMemOfPage(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;
            page = new UserGeneralEditPage();
            this.AddPage(page,
                           new MPMenuItem(page.PageID, "General", "General"),
                           MPMenu.POSITION_BEGINING);

            page = new MultiItemsAddressEditPage(this, false);
            this.AddPage(page,
                            new MPMenuItem(page.PageID, "Address", "Address"),
                            MPMenu.POSITION_BEGINING
                            );

            page = new UserAccountPage();
            this.AddPage(page,
                           new MPMenuItem(page.PageID, "Account", "Account"),
                           MPMenu.POSITION_BEGINING
                           );

            page = new UserProfilePage();
            this.AddPage(page,
                             new MPMenuItem(page.PageID, "Profile", "Profile"),
                             MPMenu.POSITION_BEGINING
                             );

            page = new UserMemOfPage(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 (ADUCPage.ADObjectType == "user")
            {
                page = new UserMultiselectGeneralEditPage(this);
                this.AddPage(page,
                new MPMenuItem(page.PageID, "General", "General"),
                MPMenu.POSITION_BEGINING
                );

                page = new MultiItemsAddressEditPage(this, true);
                this.AddPage(page,
                new MPMenuItem(page.PageID, "Address", "Address"),
                MPMenu.POSITION_BEGINING
                );
            }
            else if (ADUCPage.ADObjectType == "group")
            {
                page = new MultiItemsGeneralEditPage(this);
                this.AddPage(page,
                new MPMenuItem(page.PageID, "General", "General"),
                MPMenu.POSITION_BEGINING
                );
            }
            else if (ADUCPage.ADObjectType == "organizationalUnit")
            {
                page = new MultiItemsGeneralEditPage(this);
                this.AddPage(page,
                new MPMenuItem(page.PageID, "General", "General"),
                MPMenu.POSITION_BEGINING
                );
            }
            else
            {
                page = new MultiItemsGeneralEditPage(this);
                this.AddPage(page,
                new MPMenuItem(page.PageID, "General", "General"),
                MPMenu.POSITION_BEGINING
                );
            }
        }
예제 #6
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);
            }
            //bool b = base.Apply(actionCause);
            ICollection pages = this.GetPages();

            foreach (MPPage page in pages)
            {
                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("UserMemofEditProperities"))
                    {
                        UserMemOfPage _userMemPage = (UserMemOfPage)page;
                        if (!_userMemPage.OnApply())
                        {
                            return(false);
                        }
                    }
                    if (page.PageID.Trim().Equals("UserGeneralEditProperities"))
                    {
                        UserGeneralEditPage _editPage = (UserGeneralEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return(false);
                        }
                    }

                    if (page.PageID.Trim().Equals("UserAccountPage"))
                    {
                        UserAccountPage _accountPage = (UserAccountPage)page;
                        if (!_accountPage.OnApply())
                        {
                            return(false);
                        }
                    }

                    if (page.PageID.Trim().Equals("UserProfilePage"))
                    {
                        UserProfilePage _profilePage = (UserProfilePage)page;
                        if (!_profilePage.OnApply())
                        {
                            return(false);
                        }
                    }

                    if (page.PageID.Trim().Equals("UserMultiSelectAddressProperities"))
                    {
                        MultiItemsAddressEditPage _editPage = (MultiItemsAddressEditPage)page;
                        if (!_editPage.OnApply())
                        {
                            return(false);
                        }
                    }
                }
            }
            Applied = true;
            return(true);
        }