Exemplo n.º 1
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (this.activeTool != null)
                {
                    this.activeTool.Dispose();
                    this.activeTool = null;
                }
            }

            base.Dispose(disposing);
        }
Exemplo n.º 2
0
        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"));
            }
        }
Exemplo n.º 3
0
 public ToolClickedEventArgs(Tool tool)
 {
     this.toolType = tool.GetType();
 }
Exemplo n.º 4
0
        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();
        }
Exemplo n.º 5
0
 public ToolClickedEventArgs(Tool tool)
 {
     this.toolType = tool.GetType();
 }