ExecuteDirectCommand async wait
Piemērs
xxxxxxxxxx
291
2
3
4
5void TakeControl() {
6lock(m_contolMutex) {
7if(!m_isTakeControlFailed) {
8m_isTakeControlFailed = true;
9//parāda message vienreiz
10
11
12// var paprasīt un gaidit
13something = askUser();
14while(something) {
15UserIntefaceUtils.SleepWithEvents(10)
16}
17
18
19// stopet all threads ja viss slikti
20
21//ieleik ssitēmu error state
22StatusDevice = DataFormat.Devices.InstrumentStatus.Error;
23StatusWizard = InstrumentStatusWizard.ErrorUnexpected;
24m_statusErrorMessage = exception.Message;
25
26if(m_threadRun) {
27m_threadRun.abort();
28}
29}
30
31}
32}
⚠️ Error Description lauks pats izsauc to error popup ja uzstādisi
x1StatusDevice = DataFormat.Devices.InstrumentStatus.Error;
2StatusWizard = InstrumentStatusWizard.ErrorUnexpected;
3m_statusErrorMessage = exception.Message;