Пример #1
0
        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();
                }
            }
        }
Пример #2
0
 private void wrapperApi_StateChanged(object sender, iMonStateChangedEventArgs e)
 {
     this.iMonStateChanged(e.IsInitialized);
 }
Пример #3
0
        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;
                    }

                    this.semReady.Release();
                }
                else
                {
                    this.lcd = false;
                    this.vfd = false;
                }
            }
        }