private void stateChanged(object sender, iMonStateChangedEventArgs e) { lock (this.displayLock) { if (e.IsInitialized) { iMonDisplayType display = this.imon.DisplayType; if ((display & iMonDisplayType.LCD) == iMonDisplayType.LCD) { this.imon.LCD.ScrollFinished += lcdScrollFinished; this.lcd = true; } if ((display & iMonDisplayType.VFD) == iMonDisplayType.VFD) { this.vfd = true; } try { this.semReady.Release(); } catch (SemaphoreFullException) { Logging.Error(LoggingArea, "Error: 'SemaphoreFullException' for semReady in DisplayHandler.stateChanged()"); } } else { this.lcd = false; this.vfd = false; this.update(); } } }
private void wrapperApi_StateChanged(object sender, iMonStateChangedEventArgs e) { this.iMonStateChanged(e.IsInitialized); }