Ejemplo n.º 1
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);
        }
Ejemplo n.º 3
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);
        }