LcdClose() private méthode

private LcdClose ( int device ) : uint
device int
Résultat uint
Exemple #1
0
        public void Dispose()
        {
            if (disposed)
            {
                return;
            }
            disposed = true;

            if (sys_font != null)
            {
                sys_font.Dispose();
            }

            LCD.Dispose();

            if (device != DMcLgLCD.LGLCD_INVALID_DEVICE)
            {
                DMcLgLCD.LcdClose(device);
                device = DMcLgLCD.LGLCD_INVALID_DEVICE;
            }

            if (connection != DMcLgLCD.LGLCD_INVALID_CONNECTION)
            {
                DMcLgLCD.LcdDisconnect(connection);
                connection = DMcLgLCD.LGLCD_INVALID_CONNECTION;
            }
            GC.SuppressFinalize(this);
        }
Exemple #2
0
 private void DisconnectLCD()
 {
     if (this.LCD != null)
     {
         this.LCD.Dispose();
         DMcLgLCD.LcdClose(this.device);
         DMcLgLCD.LcdDisconnect(this.connection);
         DMcLgLCD.LcdDeInit();
     }
 }
        public void Disable()
        {
            updateTimer.Enabled = false; // Will completely disable the display and close it.

            if (LCD != null)
            {
                LCD.Dispose();
            }
            DMcLgLCD.LcdClose(device);
            DMcLgLCD.LcdDisconnect(connection);
            DMcLgLCD.LcdDeInit();
        }
        private void frmMain_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (LCD != null)
            {
                GFont.Dispose();
                LoadingImg.Dispose();

                LCD.Dispose();
                DMcLgLCD.LcdClose(device);
                DMcLgLCD.LcdDisconnect(connection);
                DMcLgLCD.LcdDeInit();
            }

            // Release the icon resource.
            if (SettingsMgr.Instance.UseTrayIcon)
            {
                if (TrayIcon != null)
                {
                    TrayIcon.Dispose();
                }
            }
        }