Пример #1
0
        protected virtual void ConfigureServices(object o)
        {
            WindowStepState servicesConfigurationState = this.GetStateFromPipeline();

            Assert.IsNotNull(servicesConfigurationState, "Pipeline hasn't returned state object");
            WindowWithBackVM.GoAheadWithBackIfPossible(servicesConfigurationState);
        }
        protected virtual void ConfigureApplication(object obj)
        {
            WindowStepState applicationConfigStep = this.GetStateFromPipeline();

            if (applicationConfigStep == null)
            {
                HatcherGuide <IUIManager> .Instance.OKMessageBox(
                    "Application settings",
                    "Something is wrong. Tell app developer that he is stupid and the pipeline didn't return proper step object.",
                    MessageBoxImage.Error);

                Log.Warn("GetApplicationConfigStep pipeline hasn't returned proper object", this);
                return;
            }
            WindowWithBackVM.GoAheadWithBackIfPossible(applicationConfigStep);
        }
Пример #3
0
        protected virtual void RunServiceForPlant(object argument)
        {
            var userConfigServicePlantBox = argument as UserConfigServicePlantBox;

            Assert.IsNotNull(userConfigServicePlantBox, "Wrong argument. Shouldn't be null");

            var args = new GetUCStepPipelineArgs(userConfigServicePlantBox);

            GetUCStepPipelineRunner.Run(args);
            if (args.Aborted || args.StateConstructInfo.ResultState == null)
            {
                HatcherGuide <IUIManager> .Instance.OKMessageBox(
                    "Plant configuration",
                    "Plant configuration service wasn't able to resolve next step. Please contact dev",
                    MessageBoxImage.Error);
            }
            else
            {
                var nextStep = args.StateConstructInfo.ResultState;
                WindowWithBackVM.GoAheadWithBackIfPossible(nextStep);
            }
        }
Пример #4
0
        public virtual void PopupMainWindow()
        {
            IWindowWithBack windowWithBack = HatcherGuide <IWindowWithBack> .Instance;

            Assert.IsNotNull(windowWithBack, "Window with back wasn't resolved");
            if (windowWithBack.IsCurrentlyDisplayed)
            {
                windowWithBack.BringToFront();
                return;
            }
            WindowWithBackVM mainWindowVM = GetMainVMPipelineRunner.Run(new GetMainVMPipelineArgs());

            if (mainWindowVM == null)
            {
                HatcherGuide <IUIManager> .Instance.OKMessageBox(
                    "Plant configuration",
                    "We was unable to resolve main View Model. Please provide log files to developer",
                    MessageBoxImage.Error);
            }
            else
            {
                windowWithBack.PrepareAndShow(mainWindowVM);
            }
        }
        protected virtual void ShowConfigurationWindow(object obj)
        {
            WindowStepState windowStepState = UNConfigurationStepPipeline.Run();

            WindowWithBackVM.GoAheadWithBackIfPossible(windowStepState);
        }