protected override void OnHandleDestroyed(EventArgs e) { if (overlay != null) { overlay.Close(); overlay = null; } base.OnHandleDestroyed(e); }
protected virtual void OnScreenLeave(ScreenEventArgs e) { if (ScreenLeave != null) ScreenLeave(this, e); if (overlay != null) { overlay.Close(); overlay = null; } }
protected virtual void OnScreenEnter(ScreenEventArgs e) { if (ScreenEnter != null) ScreenEnter(this, e); if (overlay != null) { overlay.Close(); overlay = null; } overlay = new ScreenOverlayWindow(e.Screen); overlay.Show(); }