コード例 #1
0
ファイル: Program.cs プロジェクト: ArtiomCiumac/upsmonitor
        /// <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();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: ArtiomCiumac/upsmonitor
        /// <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();
        }
コード例 #3
0
 /// <summary>
 /// Handles the 'stop' service control command.
 /// </summary>
 protected override void OnStop()
 {
     _service.Stop();
 }