コード例 #1
0
        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();
                }
            }
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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();
            }
        }