private void DisconnectLCD() { if (this.LCD != null) { this.LCD.Dispose(); DMcLgLCD.LcdClose(this.device); DMcLgLCD.LcdDisconnect(this.connection); DMcLgLCD.LcdDeInit(); } }
public void OnDestroy() { foreach (Device dev in devices) { dev.Dispose(); } if (lcd_initialized) { 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(); } } }