protected override void OnDeactivate() { DocumentWorkspace.EnableSelectionTinting = false; if (Tracking) { Done(); } base.OnDeactivate(); SetCursors(null, null, null, null); // dispose 'em RendererList.Remove(NewSelectionRenderer); NewSelectionRenderer.Dispose(); NewSelectionRenderer = null; NewSelection = null; }
protected override void OnDeactivate() { AppEnvironment.PrimaryColorChanged -= new EventHandler(RenderBecauseOfEvent); AppEnvironment.SecondaryColorChanged -= new EventHandler(RenderBecauseOfEvent); AppEnvironment.GradientInfoChanged -= new EventHandler(RenderBecauseOfEvent); AppEnvironment.AlphaBlendingChanged -= new EventHandler(RenderBecauseOfEvent); AppWorkspace.UnitsChanged -= new EventHandler(RenderBecauseOfEvent); if (this.gradientActive) { CommitGradient(); this.mouseButton = MouseButtons.None; } if (this.startNub != null) { RendererList.Remove(this.startNub); this.startNub.Dispose(); this.startNub = null; } if (this.endNub != null) { RendererList.Remove(this.endNub); this.endNub.Dispose(); this.endNub = null; } this.moveNubs = null; if (this.toolCursor != null) { this.toolCursor.Dispose(); this.toolCursor = null; } if (this.toolMouseDownCursor != null) { this.toolMouseDownCursor.Dispose(); this.toolMouseDownCursor = null; } base.OnDeactivate(); }