void LabService_LabServiceStopped(object sender, LabServiceEventArgs e) { timer.Enabled = false; if (apiServer != null) { apiServer.Dispose(); } DisposeLab(); LogStatus(selectedLab, "Stopped", "Lab Stopped"); }
void LabService_LabServiceStarted(object sender, LabServiceEventArgs e) { //AppendLog("Starting......"); LoadParamConfig(); AppendLog("Attempting Start"); if (CreatedComponents()) { AppendLog("Started lab successfully"); StartWebServer(); //testing purpose timer.Enabled = true; isRunning = true; } else { LogStatus(selectedLab, "Stopped", "Failed to Start " + selectedLab + " in Service\nCheck log"); AppendLog("Failed to start lab in start service"); } }