Exemplo n.º 1
0
 /// <summary>
 /// Search <see cref="P:Northwoods.Go.GoView.MouseDownTools" /> for the first tool that we can start;
 /// if we find one, we start it by making it the view's current <see cref="P:Northwoods.Go.GoView.Tool" />.
 /// </summary>
 /// <remarks>
 /// This sets the <see cref="P:Northwoods.Go.GoToolManager.Started" /> property to true if we did not find a startable
 /// tool, so that later searches for tools in the <see cref="M:Northwoods.Go.GoToolManager.DoMouseMove" /> and
 /// <see cref="M:Northwoods.Go.GoToolManager.DoMouseUp" /> methods can proceed.
 /// </remarks>
 public override void DoMouseDown()
 {
     foreach (IGoTool mouseDownTool in base.View.MouseDownTools)
     {
         IGoTool goTool = mouseDownTool as IGoTool;
         if (goTool != null && goTool.CanStart())
         {
             base.View.Tool = goTool;
             return;
         }
     }
     Started = true;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Search <see cref="P:Northwoods.Go.GoView.MouseUpTools" /> for the first tool that we can start;
 /// if we find one, we start it by making it the view's current <see cref="P:Northwoods.Go.GoView.Tool" />.
 /// </summary>
 public override void DoMouseUp()
 {
     if (Started)
     {
         foreach (IGoTool mouseUpTool in base.View.MouseUpTools)
         {
             IGoTool goTool = mouseUpTool as IGoTool;
             if (goTool != null && goTool.CanStart())
             {
                 base.View.Tool = goTool;
                 break;
             }
         }
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Search <see cref="P:Northwoods.Go.GoView.MouseMoveTools" /> for the first tool that we can start;
 /// if we find one, we start it by making it the view's current <see cref="P:Northwoods.Go.GoView.Tool" />.
 /// </summary>
 /// <remarks>
 /// This implementation does not do the search when <see cref="P:Northwoods.Go.GoToolManager.Started" /> is false,
 /// presumably because of a mouse motion without a mouse down in this view.
 /// This method calls <see cref="M:Northwoods.Go.GoToolManager.DoMouseOver(Northwoods.Go.GoInputEventArgs)" /> if no startable tool is
 /// found and started.
 /// </remarks>
 public override void DoMouseMove()
 {
     if (Started)
     {
         foreach (IGoTool mouseMoveTool in base.View.MouseMoveTools)
         {
             IGoTool goTool = mouseMoveTool as IGoTool;
             if (goTool != null && goTool.CanStart())
             {
                 base.View.Tool = goTool;
                 return;
             }
         }
     }
     DoMouseOver(base.LastInput);
 }