private void btnStart_Click(object sender, EventArgs e) { #if DEBUG _service = new svcMain(); _service.Start(); btnStart.Enabled = false; btnStop.Enabled = true; #endif }
private void btnStop_Click(object sender, EventArgs e) { #if DEBUG _service.Stop(); _service.Dispose(); _service = null; btnStop.Enabled = false; btnStart.Enabled = true; #endif }