LcdClose() private method

private LcdClose ( int device ) : uint
device int
return uint
コード例 #1
0
ファイル: Device.cs プロジェクト: BGog/GHud
        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);
        }
コード例 #2
0
ファイル: Main.cs プロジェクト: Adapum/LoLG19Info
 private void DisconnectLCD()
 {
     if (this.LCD != null)
     {
         this.LCD.Dispose();
         DMcLgLCD.LcdClose(this.device);
         DMcLgLCD.LcdDisconnect(this.connection);
         DMcLgLCD.LcdDeInit();
     }
 }
コード例 #3
0
        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();
        }
コード例 #4
0
        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();
                }
            }
        }