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); }
public void StopServiceClick(object sender, EventArgs e) { Write(string.Format("Stopping Calculator Service\n")); MyServiceHost.StopService(); }