Exemple #1
0
 public CounterInstruction() : base(OperationCode.Counter)
 {
     Operands = new Object[4];
     setBoxType(0);
     setPreset(0);
     setAccumulated(0);
     Counter = new InternalCounter(this);
 }
Exemple #2
0
 protected override void OnMonitoringTimerTick(object state)
 {
     try
     {
         InternalBar.AddValue((int)InternalCounter.NextValue());
     }
     catch (Exception e)
     { }
 }
Exemple #3
0
 protected override void OnMonitoringTimerTick(object state)
 {
     try
     {
         InternalBar.AddValue(Math.Round(InternalCounter.NextValue() / Environment.ProcessorCount, 2, MidpointRounding.AwayFromZero));
     }
     catch (Exception e)
     { }
 }
 protected override void OnMonitoringTimerTick(object state)
 {
     try
     {
         InternalBar?.AddValue(Math.Round(InternalCounter?.NextValue() ?? 0.0, 2, MidpointRounding.AwayFromZero));
     }
     catch (Exception e)
     { }
 }
Exemple #5
0
 public override void Dispose()
 {
     _monitoringTimer?.Dispose();
     InternalCounter?.Dispose();
     InternalBar?.Dispose();
 }