Esempio n. 1
0
 /// <summary>
 /// If <see cref="P:Northwoods.Go.GoToolCreating.Modal" /> and not <see cref="P:Northwoods.Go.GoToolCreating.OneShot" />, the current
 /// <see cref="P:Northwoods.Go.GoToolCreating.NewObject" /> is removed but this tool remains active to allow
 /// further object creations; otherwise this tool is stopped.
 /// </summary>
 public override void DoCancelMouse()
 {
     if (Active && Modal && !OneShot)
     {
         if (NewObject != null && NewObject.IsInView)
         {
             NewObject.Remove();
         }
         NewObject = null;
     }
     else
     {
         StopTool();
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Stopping this tool will remove the temporary <see cref="P:Northwoods.Go.GoToolCreating.NewObject" /> from
 /// the view, if it had not yet been added to the document.
 /// </summary>
 /// <remarks>
 /// This also calls <see cref="M:Northwoods.Go.GoTool.StopTransaction" /> if
 /// <see cref="P:Northwoods.Go.GoToolCreating.Modal" /> is false or if <see cref="P:Northwoods.Go.GoToolCreating.OneShot" /> is true.
 /// </remarks>
 public override void Stop()
 {
     if (NewObject != null && NewObject.IsInView)
     {
         NewObject.Remove();
     }
     NewObject = null;
     base.View.StopAutoScroll();
     base.View.CursorName = "default";
     Active = false;
     if (!Modal || OneShot)
     {
         StopTransaction();
     }
 }