/// <summary> /// /// </summary> /// <param name="e"></param> protected override void OnPaint(PaintEventArgs e) { Log.Debug("D3D: OnPaint()"); base.OnPaint(e); if (_isLoaded) { // stop the splash screen thread it it is still running if (SplashScreen != null) { Log.Info("D3D: Stopping splash screen thread"); SplashScreen.Stop(); do { Thread.Sleep(20); } while (!SplashScreen.IsStopped()); SplashScreen = null; MediaPortalApp.ShowStartupWarningDialogs(); } if (MinimizeOnStartup && _firstTimeWindowDisplayed) { Log.Info("D3D: Minimizing to tray on startup"); ExitToTray = true; MinimizeToTray(); _firstTimeWindowDisplayed = false; } // Set Cursor.Position to avoid mouse cursor show up itself (for ex on video) Log.Debug("D3D: Force mouse cursor to false"); ShowMouseCursor(false); _lastCursorPosition = Cursor.Position; } }
/// <summary> /// /// </summary> /// <param name="e"></param> protected override void OnPaint(PaintEventArgs e) { Log.Debug("D3D: OnPaint()"); base.OnPaint(e); if (_isLoaded) { // stop the splash screen thread it it is still running if (SplashScreen != null) { Log.Info("D3D: Stopping splash screen thread"); SplashScreen.Stop(); do { Thread.Sleep(20); } while (!SplashScreen.IsStopped()); SplashScreen = null; // force Windows to recognize the imbalanced state we created if (AutoHideMouse) { ShowMouseCursor(false); } else { ShowMouseCursor(false); } } if (MinimizeOnStartup && _firstTimeWindowDisplayed) { Log.Info("D3D: Minimizing to tray on startup"); ExitToTray = true; MinimizeToTray(); _firstTimeWindowDisplayed = false; } } }