/// <summary>
        /// Loads the shut down commands.
        /// </summary>
        /// <param name="codeCoverageConfigNode">The code coverage config node.</param>
        private void LoadShutDownCommands(XPathNavigator codeCoverageConfigNode)
        {
            XPathNavigator shutDownCommandsNode = codeCoverageConfigNode.SelectSingleNode("shutdownCommands");

            if (shutDownCommandsNode == null)
            {
                return;
            }

            if (shutDownCommandsNode.MoveToFirstChild())
            {
                do
                {
                    string nodeName = shutDownCommandsNode.Name;
                    if (nodeName == "stopProcess")
                    {
                        string name = shutDownCommandsNode.GetAttribute("name", string.Empty);

                        StopProcessCommand command = new StopProcessCommand(name, true);
                        shutdownCommands.Add(command);
                    }
                    else if (nodeName == "stopService")
                    {
                        string name = shutDownCommandsNode.GetAttribute("name", string.Empty);

                        StopServiceCommand command = new StopServiceCommand(name, true);
                        shutdownCommands.Add(command);
                    }
                }while (shutDownCommandsNode.MoveToNext());
            }
        }
Example #2
0
 private void RaiseContextMenuCanExceute()
 {
     StartServiceCommand.RaiseCanExecuteChanged();
     StopServiceCommand.RaiseCanExecuteChanged();
     RestartServiceCommand.RaiseCanExecuteChanged();
 }