예제 #1
0
        protected virtual void InitializePlantFromPipeline(IPlantEx plantEx)
        {
            INotifyIconChangerMaster globalNotifyIconChanger = HatcherGuide <INotifyIconChangerMaster> .CreateNewInstance();

            globalNotifyIconChanger.Initialize(this.GlobalNotifyIcon);
            InitPlantPipeline.InitPlantGMPipeline.Run(plantEx, this.LuggageName, globalNotifyIconChanger);
        }
        protected virtual void AssignIconModifierToRequirer(InitPlantSIArgs args, INeedToModifyIcon iconRequirer)
        {
            INotifyIconChangerMaster iconChanger = HatcherGuide <INotifyIconChangerMaster> .CreateNewInstance();

            iconChanger.Initialize(args.SIBox.NotifyIcon);
            iconRequirer.StoreIconChangingAssignee(iconChanger);
        }
예제 #3
0
        protected virtual ContextMenuStrip BuildContextMenu(List <GlobalMenuPlantBox> plantBoxes)
        {
            Assert.IsNotNull(this.ContextMenuBuilder, "Builder cannot be null, something is wrong");
            this.ContextMenuBuilder.ConfigureContextItemOnClick = this.ConfigureContextItemOnClick;
            this.ContextMenuBuilder.ExitContextItemOnClick      = this.ExitContextItemOnClick;
            IDynamicStateWatcher stateWatcher = HatcherGuide <IDynamicStateWatcher> .CreateNewInstance();

            return(this.ContextMenuBuilder.BuildContextMenu(plantBoxes, stateWatcher));
        }
        protected virtual void LastPreparationsAndVisualizeTask(DisplayTaskBag task)
        {
            var uiManager = HatcherGuide <IUIManager> .Instance;

            uiManager.ExecuteActionOnUIThreadAsynchronously(
                delegate
            {
                var window = HatcherGuide <INotificationWindow> .CreateNewInstance();
                task.WindowVM.ResultObtained += this.WindowVM_ResultObtained;
                window.PrepareAndDisplay(task.WindowVM);
            });
        }