Ejemplo n.º 1
0
 protected override void OnStart(string[] args)
 {
     logger.Info("Starting service");
     if (runner == null)
     {
         runner = new Runner();
     }
     if (!runner.Running)
     {
         runner.start();
     }
 }
Ejemplo n.º 2
0
        private void run()
        {
            if (runner == null)
            {
                runner = new Runner();
            }

            if (!runner.Running)
            {
                runner.start();
                runItem.Checked = runner.Running;
            }
            else
            {
                runner.stop();
                runItem.Checked = runner.Running;
            }
        }