Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6997 for trunk/sources


Ignore:
Timestamp:
11/16/11 10:25:10 (13 years ago)
Author:
ascheibe
Message:

#1672 added missing invoke

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive.Slave.Views/3.3/SlaveCmdsBase.cs

    r6983 r6997  
    7676    #region Event Handlers
    7777    protected virtual void Content_SlaveDisplayStateChanged(object sender, EventArgs<SlaveDisplayStat> e) {
    78       lastSlaveDisplayStat = e.Value;
     78      if (this.InvokeRequired) {
     79        Action<object, EventArgs<SlaveDisplayStat>> action = new Action<object, EventArgs<SlaveDisplayStat>>(Content_SlaveDisplayStateChanged);
     80        Invoke(action, sender, e);
     81      } else {
     82        lastSlaveDisplayStat = e.Value;
     83        if (e.Value == SlaveDisplayStat.Asleep || e.Value == SlaveDisplayStat.NoService) {
     84          btnStart.Enabled = true;
     85          btnStop.Enabled = false;
     86        }
    7987
    80       if (e.Value == SlaveDisplayStat.Asleep || e.Value == SlaveDisplayStat.NoService) {
    81         btnStart.Enabled = true;
    82         btnStop.Enabled = false;
    83       }
    84 
    85       if (e.Value == SlaveDisplayStat.Busy || e.Value == SlaveDisplayStat.Idle || e.Value == SlaveDisplayStat.Offline) {
    86         btnStart.Enabled = false;
    87         btnStop.Enabled = true;
     88        if (e.Value == SlaveDisplayStat.Busy || e.Value == SlaveDisplayStat.Idle || e.Value == SlaveDisplayStat.Offline) {
     89          btnStart.Enabled = false;
     90          btnStop.Enabled = true;
     91        }
    8892      }
    8993    }
Note: See TracChangeset for help on using the changeset viewer.