示例#1
0
        public void StartServiceClick(object sender, EventArgs e)
        {
            Write(string.Format("Starting Calculator Service\n"));

            //initialize the service with a reference to this window
            CalculatorService calculator = new CalculatorService(this);

            //start the service
            MyServiceHost.StartService(calculator);
        }
示例#2
0
 public void StopServiceClick(object sender, EventArgs e)
 {
     Write(string.Format("Stopping Calculator Service\n"));
     MyServiceHost.StopService();
 }