private void observedWindowEvent(int windowEvent) { switch (windowEvent) { case WindowEventTypes.EVENT_OBJECT_FOCUS: { _overlay.UpdateOverlay(GetWindowArea()); _overlay.Show(); //App.minimized = false; } break; case WindowEventTypes.EVENT_OBJECT_HIDE: { //App.minimized = true; _overlay.Hide(); //ToasterThread.toaster.popToast("Info", "BDMT has been minimized!"); } break; case WindowEventTypes.EVENT_OBJECT_LOCATIONCHANGE: { _overlay.UpdateOverlay(GetWindowArea()); } break; case WindowEventTypes.EVENT_OBJECT_SHOW: { } break; case WindowEventTypes.EVENT_SYSTEM_FOREGROUND: { } break; case 0: { _overlay.Hide(); } break; default: break; } }