/// <summary> /// Loads the start up commands. /// </summary> /// <param name="codeCoverageConfigNode">The code coverage config node.</param> private void LoadStartUpCommands(XPathNavigator codeCoverageConfigNode) { XPathNavigator startUpCommandsNode = codeCoverageConfigNode.SelectSingleNode("startUpCommands"); if (startUpCommandsNode == null) { return; } if (startUpCommandsNode.MoveToFirstChild()) { do { string nodeName = startUpCommandsNode.Name; if (nodeName == "startProcess") { string fileName = startUpCommandsNode.GetAttribute("fileName", string.Empty); string arguments = startUpCommandsNode.GetAttribute("arguments", string.Empty); StartProcessCommand command = new StartProcessCommand(fileName, arguments, true, false, true); startUpCommands.Add(command); } else if (nodeName == "startService") { string name = startUpCommandsNode.GetAttribute("name", string.Empty); StartServiceCommand command = new StartServiceCommand(name, true); startUpCommands.Add(command); } }while (startUpCommandsNode.MoveToNext()); } }
private void RaiseContextMenuCanExceute() { StartServiceCommand.RaiseCanExecuteChanged(); StopServiceCommand.RaiseCanExecuteChanged(); RestartServiceCommand.RaiseCanExecuteChanged(); }