コード例 #1
0
ファイル: ProtocolGUI.cs プロジェクト: RManPT/HOH-DEMO
 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);
 }
コード例 #2
0
        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();
        }