protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (this.activeTool != null)
                {
                    this.activeTool.Dispose();
                    this.activeTool = null;
                }
            }

            base.Dispose(disposing);
        }
        public void UpdateStatusBarToToolHelpText(Tool tool)
        {
            if (tool == null)
            {
                SetStatus(string.Empty, null);
            }
            else
            {
                string toolName = tool.Name;
                string helpText = tool.HelpText;

                string contextFormat = PdnResources.GetString("StatusBar.Context.Help.Text.Format");
                string contextText = string.Format(contextFormat, toolName, helpText);

                SetStatus(contextText, PdnResources.GetImageResource("Icons.MenuHelpHelpTopicsIcon.png"));
            }
        }
 public ToolClickedEventArgs(Tool tool)
 {
     this.toolType = tool.GetType();
 }
        public void SetTool(Tool copyMe)
        {
            OnToolChanging();

            if (this.activeTool != null)
            {
                this.previousActiveToolType = this.activeTool.GetType();
                this.activeTool.CursorChanged -= ToolCursorChangedHandler;
                this.activeTool.PerformDeactivate();
                this.activeTool.Dispose();
                this.activeTool = null;
            }

            if (copyMe == null)
            {
                EnableToolPulse = false;
            }
            else
            {
                Tracing.LogFeature("SetTool(" + copyMe.GetType().FullName + ")");
                this.activeTool = CreateTool(copyMe.GetType());
                this.activeTool.PerformActivate();
                this.activeTool.CursorChanged += ToolCursorChangedHandler;

                if (this.suspendToolCursorChanges <= 0)
                {
                    Cursor = this.activeTool.Cursor;
                }

                EnableToolPulse = true;
            }

            OnToolChanged();
        }
 public ToolClickedEventArgs(Tool tool)
 {
     this.toolType = tool.GetType();
 }