private void ProtocolGUI_FormClosing(object sender, FormClosingEventArgs e) { HOHEvent.LogUpdated -= OnHOHEventUpdate; HOHEvent.UsrMsgUpdated -= OnHOHEventUpdate; HOHEvent.ExerciseTimerUpdated -= OnHOHEventUpdate; HOHEvent.ExerciseNameUpdated -= OnHOHEventUpdate; HOHEvent.ProtocolStateUpdated -= OnHOHEventUpdate; HOHEventObj.UpdateProtocolState("interrupt"); HOHEventObj.UpdateProtocolGUIStatus(false); }
private void btnProtocolStart_Click(object sender, EventArgs e) { //btnProtocolStart.Enabled = false; Protocol pt = ((Protocol)lstProtocols.SelectedItem); ProtocolGUI protocolGUI = new ProtocolGUI(clinic, pt, NW); protocolGUI.Show(); Thread ProtoRun = new Thread(() => pt.Execute(NW)); ProtoRun.Start(); HOHEventObj.UpdateProtocolGUIStatus(true); //new Thread(new ThreadStart(((Protocol)lstProtocols.SelectedItem).Execute)).Start(); }