Example #1
0
        /// <summary>APIの処理を実際に担当できるサブモジュールを用いてインスタンスを初期化します。</summary>
        /// <param name="window">キャラ表示ウィンドウ</param>
        /// <param name="character">実際のキャラクター</param>
        /// <param name="voiceOperator">発声処理器</param>
        /// <param name="chatWindow">チャット枠</param>
        /// <param name="requestor">スクリプト実行要求器</param>
        /// <param name="setting">設定事項</param>
        /// <param name="characterName">キャラクター名</param>
        public ScriptApi(
            IMainWindow window,
            IHarrietCharacter character,
            IVoiceOperator voiceOperator,
            IChatWindowModel chatWindow,
            IScriptRequestor requestor,
            CharacterSetting setting,
            IScriptApiSetting scriptApiSetting,
            string characterName
            )
        {
            this.Window = window;
            this.Character = character;
            this._voiceOperater = voiceOperator;
            this.ChatWindow = chatWindow;
            this.CharacterName = characterName;
            this.Setting = new SettingWindowViewModel(setting);
            this.ScriptRequest = requestor;

            _keyboardHook = new KeyboardHook(OnKeyboardUpDown);

            ////プラグインがあったら拾い、無かったら無視
            //try
            //{
            //    TextConverter = TextToPronounceConverterLoader.Load().FirstOrDefault() ??
            //                    new ImeTextConverter(); 
            //}
            //catch(Exception)
            //{
            //    TextConverter = new ImeTextConverter();
            //}

            _scriptApiSetting = scriptApiSetting;
        }
Example #2
0
 public ReadkeyCommandTests()
 {
     this.platformFacade = Substitute.For<IPlatformFacade>();
     this.platformFacade.RegisterHotKey(Keys.None, 0).ReturnsForAnyArgs(true);
     this.keyMapService = new KeyMapService(this.platformFacade);
     this.mainWindow = Substitute.For<IMainWindow>();
 }
 public RevertToSnapshotCommand(IMainWindow mainWindow, VM vm, VM snapshot)
     : base(mainWindow, vm)
 {
     Util.ThrowIfParameterNull(snapshot, "snapshot");
     _snapshot = snapshot;
     _VM = vm;
 }
 public RevertToSnapshotCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection, VM snapshot)
     : base(mainWindow, selection)
 {
     Util.ThrowIfParameterNull(snapshot, "snapshot");
     _snapshot = snapshot;
     _VM = _snapshot.Connection.Resolve(_snapshot.snapshot_of);
 }
Example #5
0
        public static void Initialize(IMainWindow mainWindow)
        {
            //Form form = (mainWindow as Form);
            //m_parent = form;

            //m_manager = TaskbarManager.Instance.TabbedThumbnail;
        }
Example #6
0
        /// <summary>
        /// 起動後にモデルの動作を開始します。
        /// NOTE: エントリポイント的に動作する
        /// </summary>
        private void Initialize(IMainWindow mainWindow)
        {
            string characterName = CommonSettingRecord.Load().CharacterName;
            CharacterSetting = CharacterSetting.Load(characterName);

            _characterOperator = new HarrietCharacterOperator(
                characterName,
                mainWindow,
                CharacterSetting.CharacterAppearance
                );

            _scriptingOperator = new ScriptingOperator(
                characterName,
                mainWindow,
                _characterOperator.Character,
                CharacterSetting
                );

            Observable.FromEventPattern<EventArgs>(_scriptingOperator, nameof(_scriptingOperator.Initialized))
                  .Take(1)
                  .Subscribe(_ => _timer.Start());

            Observable.FromEventPattern<EventArgs>(_scriptingOperator, nameof(_scriptingOperator.Closed))
                .Take(1)
                .Subscribe(_ => mainWindow.Close());

            _scriptingOperator.Start();

            //タイマーは初期化スクリプトが読み終わってから稼働開始するのでここでは放置
            //_timer.Start();
        }
Example #7
0
 protected override void OnStartup(StartupEventArgs e)
 {
     base.OnStartup(e);
     try
     {
         Assembly a = Assembly.LoadFrom(Console.Properties.Settings.Default.DataProviderLibrary);
         ProviderType = a.GetType(Console.Properties.Settings.Default.DataProviderClass);
         Provider = (IDataProvider)Activator.CreateInstance(ProviderType);
     }
     catch (Exception ex)
     {
         string m = (ex.InnerException != null) ? ex.InnerException.Message : ex.Message;
         Message(
             "Fehler beim Aufstarten des konfigurierten Datenproviders: " + 
             m + 
             "\nDie Anwendung wird nun beendet.",
             MessageType.Error);
         Shutdown(1);
         return;
     }
     MainView = new MainViewModel();
     MainView.ShowPage(new SplashViewModel());
     Task t = new Task(new Action<object>(Provider.Startup), null);
     t.Start();
     Task.WaitAny(new Task[] { t });
     this.MainWindow = MainView.GetWindow();
     MainView.SetDefaultView(typeof(OverViewModel));
     MainView.ShowPage(new OverViewModel());
 }
Example #8
0
        public ListViewModel(IMainWindow mainWindow, ISelectDirectoryService selectDirectoryService)
        {
            _mainWindow = mainWindow;
            
            _appFolder = System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData) + @"\KidsPlayer\";
            _filePath = _appFolder + "moviesList.xml";

            LoadMoviesList();

            if (Movies == null || !Movies.Any())
            {
                if (selectDirectoryService.DetermineDirectory())
                {
                    Movies = Directory.EnumerateFiles(selectDirectoryService.DirectoryName, "*.mp4")
                        .Select(file => new Movie { Path = file })
                        .ToList();

                    //var ffMpeg = new FFMpegConverter();
                    //Directory.CreateDirectory(_appFolder + "thumbnails");

                    //foreach (var movie in Movies)
                    //{
                    //    ffMpeg.GetVideoThumbnail(movie.Path, _appFolder + @"thumbnails\" + movie.Name + ".jpg", 50);
                    //}
                   

                }
            }
        }
 public ParentMenuItemFeatureCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection, ParentMenuItemFeature owner, Search search)
     : base(mainWindow, selection)
 {
     Util.ThrowIfParameterNull(owner, "owner");
     _owner = owner;
     _search = search;
 }
Example #10
0
        public MainWindowViewModel(IMainWindow mainWindow, IEnumerable<IBuildServer> buildServers)
        {
            BuildServers = buildServers.Select(b => new BuildServerViewModel(b));

            CloseApplicationCommand = new ActionCommand(() => Application.Current.Shutdown());
            MinimizeToTrayCommand = new ActionCommand(mainWindow.MinimizeToTray);
        }
Example #11
0
        public DockWindow(IMainWindow window)
        {
            InitializeComponent();

            _window = window;
            Icon = new BitmapImage(new Uri(@"C:\Users\Shawn.Axsom\Desktop\TaskDash.ico"));
        }
Example #12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MainWindowCommandModel"/> class.
 /// </summary>
 /// <param name="mainWindowViewModel">The main window view model.</param>
 /// <param name="mainWindow">The main window of the application.</param>
 public MainWindowCommandModel(MainWindowViewModel mainWindowViewModel, IMainWindow mainWindow)
 {
     //this.mainWindowViewModel = mainWindowViewModel;
     //this.mainWindow = mainWindow;
     //this.mainWorkArea = mainWindow.Designer;
     this.WorkAreaCommands = new WorkAreaCommands(mainWindowViewModel, mainWindow.WorkArea);
 }
Example #13
0
 public UpdateVIFCommand(IMainWindow mainWindow, VM vm, VIF vif, Proxy_VIF proxyVIF)
     : base(mainWindow, vm)
 {
     _vm = vm;
     _vif = vif;
     _proxyVIF = proxyVIF;
 }
 public BaseViewModel(ICommandService commandService, IQueryService queryService, IMainWindow mainWindow, ILog logger)
 {
     _MainWindow = mainWindow;
     _CommandService = commandService;
     _QueryService = queryService;
     _Logger = logger;
 }
Example #15
0
        public ShowMembersMenu(IMainWindow mainWindow)
        {
            _mainWindow = mainWindow;

            // Gather list of implemented filters in this assembly.
            CompositionHelper.ComposeInExecutingAssembly(this);
        }
Example #16
0
        public void LoadExportProjectAddins(IMainWindow mainWindow)
        {
            foreach (IExportProject exportProject in AddinManager.GetExtensionObjects<IExportProject> ()) {
                mainWindow.AddExportEntry(exportProject.GetMenuEntryName(), exportProject.GetMenuEntryShortName(),
                    new Action<Project, IGUIToolkit>(exportProject.ExportProject));

            }
        }
Example #17
0
        public CoreModule(IShell shell, IStateManager stateManager, IMainWindow mainWindow)
        {
            this.shell = shell;
            this.stateManager = stateManager;
            this.mainWindow = mainWindow;

            this.shell.AttemptingDeactivation += ShellDeactivating;
        }
        public MainWindowPresenter(IMainWindow my_view, IOPSClient my_client)
        {
            view = my_view;
            client = my_client;

            client.SessionCreated += ClientOnSessionCreated;
            client.SessionCompleted += ClientOnSessionCompleted;
        }
        public ViewGameResultsViewModel(ICommandService commandService, IQueryService queryService, IMainWindow mainWindow, ILog logger)
            : base(commandService, queryService, mainWindow, logger)
        {
            CloseCommand = new RelayCommand(x => this.Close());

            Height = 400;
            WindowTitle = "View Game Results";
        }
 public MenuItemFeatureCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection, MenuItemFeature menuItemFeature, Search search, PluginSerializationLevel serialization)
     : base(mainWindow, selection)
 {
     Util.ThrowIfParameterNull(menuItemFeature, "menuItemFeature");
     _menuItemFeature = menuItemFeature;
     _search = search;
     _serialization = serialization;
 }
 public MainWindowViewModel(IMainWindow view, IContainer container)
     : base(view, container)
 {
     ShowFirstChildCommand = new DelegateCommand<object>(OnShowFirstChild);
     ShowSecondChildCommand = new DelegateCommand<object>(OnShowSecondChild);
     ShowModalWindowCommand = new DelegateCommand<object>(OnShowModalWindow);
     ExitCommand = new DelegateCommand<object>(OnExit);
 }
Example #22
0
 /// <summary>
 ///   Plugs in the current node to the main window.
 /// </summary>
 /// <param name="mainForm"> Main window on which the node will be plugged in. </param>
 public void PlugIn(IMainWindow mainForm)
 {
     if (null == mainForm)
     {
         ExceptionManager.Throw(new ArgumentNullException("mainForm"));
     }
     mainForm.SetCurrentControl(this);
 }
Example #23
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ContextMenuBuilder"/> class.
        /// </summary>
        /// <param name="pluginManager">The plugin manager. This can be found on MainWindow.</param>
        /// <param name="mainWindow">The main window command interface. This can be found on mainwindow.</param>
        public ContextMenuBuilder(PluginManager pluginManager, IMainWindow mainWindow)
        {
            Util.ThrowIfParameterNull(pluginManager, "pluginManager");
            Util.ThrowIfParameterNull(pluginManager, "mainWindow");

            _pluginManager = pluginManager;
            _mainWindow = mainWindow;
        }
 public HarrietCharacterOperator(
     string characterName,
     IMainWindow mainWindow, 
     ICharacterAppearanceSetting setting)
 {
     _mainWindow = mainWindow;
     _setting = setting;
     LoadCharacter(characterName);
 }
Example #25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AddHostToPoolCommand"/> class.
 /// </summary>
 /// <param name="mainWindow">The main window interface. It can be found at Program.MainWindow.CommandInterface.</param>
 /// <param name="hosts">The hosts which are to be added to the pool.</param>
 /// <param name="pool">The pool the host should be added to.</param>
 /// <param name="confirm">if set to <c>true</c> a confirmation dialog is shown.</param>
 public AddHostToPoolCommand(IMainWindow mainWindow, IEnumerable<Host> hosts, Pool pool, bool confirm)
     : base(mainWindow)
 {
     Util.ThrowIfParameterNull(hosts, "hosts");
     Util.ThrowIfParameterNull(pool, "pool");
     _hosts = new List<Host>(hosts);
     _confirm = confirm;
     _pool = pool;
 }
Example #26
0
 public EventsManager(IGUIToolkit guiToolkit)
 {
     this.guiToolkit = guiToolkit;
     mainWindow = guiToolkit.MainWindow;
     player = mainWindow.Player;
     capturer = mainWindow.Capturer;
     drawingManager = new VideoDrawingsManager(player);
     ConnectSignals();
 }
Example #27
0
        public ControlHostService(IMainWindow mainWindow)
        {
            m_dockPanel = new Sce.Atf.Wpf.Docking.DockPanel();
            m_mainWindow = mainWindow;


            // TODO: Need to implement DockStateChanged. Reference it here to silence the compiler warning.
            if (DockStateChanged == null) return;
        }
Example #28
0
 internal static void ExportAllMemberGroupLists(IMainWindow mainWindow)
 {
     MembersContainer container = mainWindow.ActiveDatabase;
     var data = container.MemberSet.AsEnumerable();
     foreach (string group in data.Select(member => member.MemberDetais.membergroup).Distinct())
     {
         ExportSingleMemberGroupList(group, mainWindow);
     }
 }
 public ProjectsManager(IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit)
 {
     this.multimediaToolkit = multimediaToolkit;
     this.guiToolkit = guiToolkit;
     mainWindow = guiToolkit.MainWindow;
     Player = mainWindow.Player;
     Capturer = mainWindow.Capturer;
     ConnectSignals();
 }
Example #30
0
        public ControllerMain(IMainWindow presentationLevel, BuildInMod.BasicModule basicModule)
        {
            _presentationLevel = presentationLevel;
            _ctx = new AppExecutor(new ScriptingSDK.ModuleBase[] { basicModule });
            _ctx.OnStateChanged += new EventHandler<AppStateChangeEventArgs>(_ctx_OnStateChanged);
            _ctx.OnExecError += new EventHandler<RuntimeErrorEventArg>(_ctx_OnExecError);

            CmdNewFile = new CmdWrapper(NewFile, (object param) =>
            {
                return _ctx.ApplicationState == AppState.Idle;
            });

            CmdLoadFile = new CmdWrapper(LoadFile, (object param) =>
            {
                return _ctx.ApplicationState == AppState.Idle;
            });

            CmdSaveFile = new CmdWrapper(SaveFile, (object param) =>
            {
                return _document.IsChanged &&
                    (_ctx.ApplicationState == AppState.Idle);
            });

            CmdSaveAsFile = new CmdWrapper(SaveFileAs, (object param) =>
            {
                return _ctx.ApplicationState == AppState.Idle;
            });

            CmdPlay = new CmdWrapper(Play, (object param) =>
            {
                switch (_ctx.ApplicationState)
                {
                    case AppState.Idle:
                    case AppState.Pause:
                        return true;
                    default:
                        return false;
                }
            });

            CmdPause = new CmdWrapper(Pause, (object param) =>
            {
                return _ctx.ApplicationState == AppState.Running;
            });

            CmdStop = new CmdWrapper(Stop, (object param) =>
            {
                switch (_ctx.ApplicationState)
                {
                    case AppState.Running:
                    case AppState.Pause:
                        return true;
                    default:
                        return false;
                }
            });
        }
Example #31
0
 public VMOperationCommand(IMainWindow mainWindow, IEnumerable <SelectedItem> selection)
     : base(mainWindow, selection)
 {
     _operation = vm_operations.unknown;
 }
Example #32
0
 public AttachVirtualDiskCommand(IMainWindow mainWindow, IEnumerable <SelectedItem> selection)
     : base(mainWindow, selection)
 {
 }
Example #33
0
 public ExportSnapshotAsTemplateCommand(IMainWindow mainWindow, IEnumerable <SelectedItem> selection)
     : base(mainWindow, selection)
 {
 }
Example #34
0
 public ShutDownVMCommand(IMainWindow mainWindow, IEnumerable <SelectedItem> selection)
     : base(mainWindow, selection)
 {
 }
 public RemoveHostFromPoolCommand(IMainWindow mainWindow, IEnumerable <Host> hosts)
     : base(mainWindow, hosts.Select(h => new SelectedItem(h)).ToList())
 {
 }
Example #36
0
        public void ContextMenuStrip_ClickOnCalculateAllItem_ScheduleAllChildCalculations()
        {
            // Setup
            IMainWindow mainWindow  = MainWindowTestHelper.CreateMainWindowStub(mocksRepository);
            var         menuBuilder = new CustomItemsOnlyContextMenuBuilder();

            var failureMechanism = new ClosingStructuresFailureMechanism();

            failureMechanism.CalculationsGroup.Children.Add(new TestClosingStructuresCalculationScenario
            {
                Name            = "A",
                InputParameters =
                {
                    HydraulicBoundaryLocation = new TestHydraulicBoundaryLocation()
                }
            });
            failureMechanism.CalculationsGroup.Children.Add(new TestClosingStructuresCalculationScenario
            {
                Name            = "B",
                InputParameters =
                {
                    HydraulicBoundaryLocation = new TestHydraulicBoundaryLocation()
                }
            });

            var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase
            {
                FilePath = Path.Combine(testDataPath, "complete.sqlite")
            };

            HydraulicBoundaryDatabaseTestHelper.SetHydraulicBoundaryLocationConfigurationSettings(hydraulicBoundaryDatabase);

            var assessmentSection = mocksRepository.Stub <IAssessmentSection>();

            assessmentSection.Stub(a => a.Id).Return(string.Empty);
            assessmentSection.Stub(a => a.FailureMechanismContribution).Return(FailureMechanismContributionTestFactory.CreateFailureMechanismContribution());
            assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(hydraulicBoundaryDatabase);

            var context = new ClosingStructuresFailureMechanismContext(failureMechanism, assessmentSection);

            using (var treeViewControl = new TreeViewControl())
            {
                var gui = mocksRepository.Stub <IGui>();
                gui.Stub(g => g.Get(context, treeViewControl)).Return(menuBuilder);
                gui.Stub(g => g.MainWindow).Return(mainWindow);

                int nrOfCalculators   = failureMechanism.Calculations.Count();
                var calculatorFactory = mocksRepository.Stub <IHydraRingCalculatorFactory>();
                calculatorFactory.Expect(cf => cf.CreateStructuresCalculator <StructuresClosureCalculationInput>(
                                             Arg <HydraRingCalculationSettings> .Is.NotNull))
                .WhenCalled(invocation =>
                {
                    HydraRingCalculationSettingsTestHelper.AssertHydraRingCalculationSettings(
                        HydraulicBoundaryCalculationSettingsFactory.CreateSettings(hydraulicBoundaryDatabase),
                        (HydraRingCalculationSettings)invocation.Arguments[0]);
                })
                .Return(new TestStructuresCalculator <StructuresClosureCalculationInput>())
                .Repeat
                .Times(nrOfCalculators);
                mocksRepository.ReplayAll();

                plugin.Gui = gui;

                DialogBoxHandler = (name, wnd) =>
                {
                    // Expect an activity dialog which is automatically closed
                };

                using (ContextMenuStrip contextMenu = info.ContextMenuStrip(context, null, treeViewControl))
                    using (new HydraRingCalculatorFactoryConfig(calculatorFactory))
                    {
                        // Call
                        TestHelper.AssertLogMessages(() => contextMenu.Items[contextMenuCalculateAllIndex].PerformClick(), messages =>
                        {
                            List <string> messageList = messages.ToList();

                            // Assert
                            Assert.AreEqual(14, messageList.Count);
                            Assert.AreEqual("Uitvoeren van berekening 'A' is gestart.", messageList[0]);
                            CalculationServiceTestHelper.AssertValidationStartMessage(messageList[1]);
                            CalculationServiceTestHelper.AssertValidationEndMessage(messageList[2]);
                            CalculationServiceTestHelper.AssertCalculationStartMessage(messageList[3]);
                            StringAssert.StartsWith("Betrouwbaarheid sluiting kunstwerk berekening is uitgevoerd op de tijdelijke locatie", messageList[4]);
                            CalculationServiceTestHelper.AssertCalculationEndMessage(messageList[5]);
                            Assert.AreEqual("Uitvoeren van berekening 'A' is gelukt.", messageList[6]);

                            Assert.AreEqual("Uitvoeren van berekening 'B' is gestart.", messageList[7]);
                            CalculationServiceTestHelper.AssertValidationStartMessage(messageList[8]);
                            CalculationServiceTestHelper.AssertValidationEndMessage(messageList[9]);
                            CalculationServiceTestHelper.AssertCalculationStartMessage(messageList[10]);
                            StringAssert.StartsWith("Betrouwbaarheid sluiting kunstwerk berekening is uitgevoerd op de tijdelijke locatie", messageList[11]);
                            CalculationServiceTestHelper.AssertCalculationEndMessage(messageList[12]);
                            Assert.AreEqual("Uitvoeren van berekening 'B' is gelukt.", messageList[13]);
                        });
                    }
            }
        }
Example #37
0
 public RemoveHostFromPoolCommand(IMainWindow mainWindow, IEnumerable <SelectedItem> selection)
     : base(mainWindow, selection)
 {
 }
Example #38
0
 public override void Build(IMainWindow mainWindow, SelectedItemCollection selection, ContextMenuItemCollection items)
 {
     items.AddIfEnabled(new DisconnectPoolCommand(mainWindow, selection), true);
     items.AddIfEnabled(new EditTagsCommand(mainWindow, selection));
     items.AddPluginItems(PluginContextMenu.pool, selection);
 }
Example #39
0
 public MigrateVMToolStripMenuItem(IMainWindow mainWindow, IEnumerable <SelectedItem> selection, bool inContextMenu)
     : base(new MigrateVMCommand2(mainWindow, selection), inContextMenu, vm_operations.pool_migrate)
 {
 }
Example #40
0
 public RemoveHostFromPoolCommand(IMainWindow mainWindow, Host host)
     : base(mainWindow, host)
 {
 }
Example #41
0
 public ShutDownVMCommand(IMainWindow mainWindow, VM vm)
     : base(mainWindow, vm)
 {
 }
Example #42
0
 public DragDropAddHostToPoolCommand(IMainWindow mainWindow, VirtualTreeNode targetNode, IDataObject dragData)
     : base(mainWindow, targetNode, dragData)
 {
 }
Example #43
0
 public VMOperationCommand(IMainWindow mainWindow, IEnumerable <SelectedItem> selection, vm_operations operation)
     : base(mainWindow, selection)
 {
     _operation = operation;
     AssertOperationIsSupported();
 }
Example #44
0
 public MigrateVMCommand2(IMainWindow mainWindow, IEnumerable <SelectedItem> selection)
     : base(mainWindow, selection)
 {
 }
Example #45
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 /// <param name="mainWindow">Reference to the main application window interface.</param>
 public MenuInterfaceWibuKey(IMainWindow mainWindow)
     : base(mainWindow)
 {
     // Instantiate a new WibuKey object.
     m_WibuKey = new Wibukey();
 }
Example #46
0
 public override void Build(IMainWindow mainWindow, SelectedItemCollection selection, ContextMenuItemCollection items)
 {
     items.AddIfEnabled(new VappStartCommand(mainWindow, selection));
     items.AddIfEnabled(new VappShutDownCommand(mainWindow, selection));
 }
 public BaseViewModel(ICommandService commandService, IQueryService queryService, IMainWindow mainWindow, ILog logger)
 {
     _MainWindow     = mainWindow;
     _CommandService = commandService;
     _QueryService   = queryService;
     _Logger         = logger;
 }
Example #48
0
 public AttachVirtualDiskCommand(IMainWindow mainWindow, VM vm)
     : base(mainWindow, vm)
 {
 }
Example #49
0
 public ExportSnapshotAsTemplateCommand(IMainWindow mainWindow, VM snapshot)
     : base(mainWindow, new SelectedItem(snapshot, snapshot.Connection, null, null))
 {
 }
Example #50
0
 public override void Build(IMainWindow mainWindow, SelectedItemCollection selection, ContextMenuItemCollection items)
 {
     items.AddIfEnabled(new DeleteVMsAndTemplatesCommand(mainWindow, selection));
     items.AddIfEnabled(new EditTagsCommand(mainWindow, selection));
 }
Example #51
0
 public override void Build(IMainWindow mainWindow, SelectedItemCollection selection, ContextMenuItemCollection items)
 {
     items.AddIfEnabled(new ShutDownHostCommand(mainWindow, selection));
     items.AddIfEnabled(new PowerOnHostCommand(mainWindow, selection));
     items.AddIfEnabled(new RestartToolstackCommand(mainWindow, selection));
 }
Example #52
0
 public override void Build(IMainWindow mainWindow, SelectedItemCollection selection, ContextMenuItemCollection items)
 {
     items.AddIfEnabled(new DeleteTagCommand(mainWindow, selection));
 }
Example #53
0
            public override void Build(IMainWindow mainWindow, SelectedItemCollection selection, ContextMenuItemCollection items)
            {
                items.AddIfEnabled(new DeleteFolderCommand(mainWindow, selection));

                items.AddPluginItems(PluginContextMenu.folder, selection);
            }
Example #54
0
 public RemoveHostFromPoolCommand(IMainWindow mainWindow, IEnumerable <Host> hosts)
     : base(mainWindow, ConvertToSelection <Host>(hosts))
 {
 }
Example #55
0
 public override void Build(IMainWindow mainWindow, SelectedItemCollection selection, ContextMenuItemCollection items)
 {
     items.AddIfEnabled(new DisconnectHostsAndPoolsCommand(mainWindow, selection), true);
     items.AddIfEnabled(new ReconnectHostCommand(mainWindow, selection), true);
     items.AddIfEnabled(new EditTagsCommand(mainWindow, selection));
 }
Example #56
0
 public abstract void Build(IMainWindow mainWindow, SelectedItemCollection selection, ContextMenuItemCollection items);
 public DisconnectHostsAndPoolsCommand(IMainWindow mainWindow, IEnumerable <SelectedItem> selection)
     : base(mainWindow, selection)
 {
 }
Example #58
0
 public override void Build(IMainWindow mainWindow, SelectedItemCollection selection, ContextMenuItemCollection items)
 {
     items.Add(new PropertiesCommand(mainWindow, selection));
 }
Example #59
0
 public ShutDownVMCommand(IMainWindow mainWindow, VM vm, Control parent)
     : base(mainWindow, vm, parent)
 {
 }
Example #60
0
 public VMResetVDICommand(IMainWindow mainWindow, VM vm)
     : base(mainWindow, vm)
 {
 }