/// <summary> /// Runs the application as a simple console application. /// </summary> private static void RunConsoleApplication() { Console.WriteLine(Const.Messages.ServiceStartRequested); var control = new ServiceControl(); control.Start(); Console.WriteLine(Const.Messages.PressAnyKeyToStop); Console.ReadKey(); control.Stop(); }
/// <summary> /// Initializes a new instance of the <see cref="UpsMonitorService"/> class. /// </summary> internal UpsMonitorService() { InitializeComponent(); _service = new ServiceControl(); }