protected override void OnActivated(EventArgs e) { if (pshow != null) { pshow.Close(); pshow = null; } base.OnActivated(e); }
protected override void OnDeactivated(EventArgs e) { if (pshow == null && !this.windowClosed) { pshow = new PercentShow(); pshow.Show(); } base.OnDeactivated(e); }