Пример #1
0
 public DiagramContextMenu(DiagramView view)
 {
     this._View = null;
     if (view == null)
     {
         throw new ArgumentNullException("view");
     }
     this._View = view;
 }
Пример #2
0
 public ToolPanning(DiagramView v)
     : base(v)
 {
     this.myAutoPan = true;
     this.myModal = false;
     this.myActive = false;
     this.myOriginSet = false;
     this.myOrigin = new Point();
     this.myPaintHandler = null;
 }
Пример #3
0
 public ToolResizing(DiagramView v)
     : base(v)
 {
     this.myMinimumSize = new SizeF(1f, 1f);
     this.myMaximumSize = new SizeF(1E+21f, 1E+21f);
     this.myHidesSelectionHandles = true;
     this.myResizeHandle = null;
     this.mySelectionHidden = false;
     this.mySelectedObject = null;
 }
Пример #4
0
 protected DiagramTool(DiagramView view)
 {
     this.myView = null;
     this.myDragSize = SystemInformation.DragSize;
     this.myStopTransactionName = null;
     this.myCurrentObject = null;
     if (view == null)
     {
         throw new ArgumentNullException("view");
     }
     this.myView = view;
 }
Пример #5
0
 public DiagramSelection(DiagramView view)
 {
     this.myView = null;
     this.myObjTable = new Hashtable();
     this.myHotSpot = new SizeF();
     this.myHandles = null;
     this.myBoundingHandlePen = null;
     this.myResizeHandlePen = null;
     this.myResizeHandlePenColor = Color.Black;
     this.myResizeHandleBrush = null;
     this.myFocused = true;
     this.myView = view;
 }
Пример #6
0
 public ToolDragging(DiagramView v)
     : base(v)
 {
     this.myCopiesEffectiveSelection = false;
     this.myHidesSelectionHandles = true;
     this.myEffectiveSelection = null;
     this.myDragSelection = null;
     this.myDragSelectionOrigObj = null;
     this.myMoveOffset = new SizeF();
     this.mySelectionHidden = false;
     this.myModalDropped = false;
     this.mySelectionSet = false;
 }
Пример #7
0
 protected ToolLinking(DiagramView v)
     : base(v)
 {
     this.myForwardsOnly = false;
     this.myOrthogonal = false;
     this.myOrthogonalSet = false;
     this.myLinkingNew = true;
     this.myForwards = true;
     this.myOrigStartPort = null;
     this.myOrigEndPort = null;
     this.myTempStartPort = null;
     this.myTempEndPort = null;
     this.myTempLink = null;
     this.myValidPortsCache = new Hashtable();
 }
Пример #8
0
 public ToolRubberBanding(DiagramView v)
     : base(v)
 {
     this.myModal = false;
     this.myAutoScrolling = false;
 }
 internal void Dispose(DiagramView view)
 {
     Rectangle rectangle1 = view.myPaintEventArgs.ClipRectangle;
     view.myGraphics.DrawImage(view.myBuffer, rectangle1, rectangle1, GraphicsUnit.Pixel);
     if ((this.myBrush.Color.B & 7) < 4)
     {
         view.myGraphics.DrawString(DiagramViewLicenseProvider.GONAME + ", for evaluation only\r\nNorthwoods Software\r\nwww.nwoods.com", this.myFont, this.myBrush, (float)10f, (float)10f);
     }
 }
Пример #10
0
 public static RectangleF ComputeBounds(Shapes.IDiagramShapeCollection coll, DiagramView view)
 {
     bool flag1 = false;
     float single1 = 0f;
     float single2 = 0f;
     float single3 = 0f;
     float single4 = 0f;
     bool flag2 = (view != null) ? view.IsPrinting : false;
     foreach (Shapes.DiagramShape obj1 in coll)
     {
         if (flag2 ? !obj1.CanPrint() : !obj1.CanView())
         {
             continue;
         }
         RectangleF ef1 = obj1.Bounds;
         RectangleF ef2 = obj1.ExpandPaintBounds(ef1, view);
         if (!flag1)
         {
             flag1 = true;
             single1 = ef2.X;
             single2 = ef2.Y;
             single3 = ef2.X + ef2.Width;
             single4 = ef2.Y + ef2.Height;
             continue;
         }
         if (ef2.X < single1)
         {
             single1 = ef2.X;
         }
         if (ef2.Y < single2)
         {
             single2 = ef2.Y;
         }
         if ((ef2.X + ef2.Width) > single3)
         {
             single3 = ef2.X + ef2.Width;
         }
         if ((ef2.Y + ef2.Height) > single4)
         {
             single4 = ef2.Y + ef2.Height;
         }
     }
     if (flag1)
     {
         return new RectangleF(single1, single2, single3 - single1, single4 - single2);
     }
     return new RectangleF();
 }
Пример #11
0
 public ToolContext(DiagramView v)
     : base(v)
 {
     this.myBackgroundContextMenu = null;
     this.mySingleSelection = true;
 }
Пример #12
0
 public ToolZooming(DiagramView v)
     : base(v)
 {
     this.myZoomedView = v;
 }
Пример #13
0
 public ToolLinkingNew(DiagramView v)
     : base(v)
 {
 }
Пример #14
0
 public void Paint(Graphics g, DiagramView view, RectangleF clipRect)
 {
     bool flag1 = view.IsPrinting;
     if (!(flag1 ? !this.CanPrintObjects() : !this.CanViewObjects()))
     {
         RectangleF ef1 = view.DocExtent;
         GoLayerCache cache1 = this.FindCache(view);
         if ((cache1 != null) && (cache1.Rect == ef1))
         {
             foreach (Shapes.DiagramShape obj1 in cache1.Objects)
             {
                 if (!(flag1 ? obj1.CanPrint() : obj1.CanView()))
                 {
                     continue;
                 }
                 RectangleF ef2 = obj1.Bounds;
                 ef2 = obj1.ExpandPaintBounds(ef2, view);
                 if (Shapes.DiagramShape.IntersectsRect(ef2, clipRect))
                 {
                     obj1.Paint(g, view);
                 }
             }
         }
         else
         {
             LayerEnumerator enumerator2;
             if (this.CacheWanted(view))
             {
                 if (cache1 == null)
                 {
                     cache1 = new GoLayerCache(view);
                     this.Caches.Add(cache1);
                 }
                 else
                 {
                     cache1.Reset();
                 }
                 cache1.Rect = ef1;
                 enumerator2 = this.GetEnumerator();
                 while (enumerator2.MoveNext())
                 {
                     Shapes.DiagramShape obj2 = enumerator2.Current;
                     RectangleF ef3 = obj2.Bounds;
                     ef3 = obj2.ExpandPaintBounds(ef3, view);
                     if ((flag1 ? obj2.CanPrint() : obj2.CanView()) && Shapes.DiagramShape.IntersectsRect(ef3, clipRect))
                     {
                         obj2.Paint(g, view);
                     }
                     if (Shapes.DiagramShape.IntersectsRect(ef3, ef1))
                     {
                         cache1.Objects.Add(obj2);
                     }
                 }
             }
             else
             {
                 enumerator2 = this.GetEnumerator();
                 while (enumerator2.MoveNext())
                 {
                     Shapes.DiagramShape obj3 = enumerator2.Current;
                     if (flag1 ? obj3.CanPrint() : obj3.CanView())
                     {
                         RectangleF ef4 = obj3.Bounds;
                         ef4 = obj3.ExpandPaintBounds(ef4, view);
                         if (Shapes.DiagramShape.IntersectsRect(ef4, clipRect))
                         {
                             obj3.Paint(g, view);
                         }
                     }
                 }
             }
         }
     }
 }
Пример #15
0
 internal GoLayerCache FindCache(DiagramView view)
 {
     foreach (GoLayerCache cache1 in this.Caches)
     {
         if (cache1.View == view)
         {
             return cache1;
         }
     }
     return null;
 }
Пример #16
0
 private bool CacheWanted(DiagramView view)
 {
     if (this.IsInDocument && DiagramDocument.myCaching)
     {
         return !view.IsPrinting;
     }
     return false;
 }
Пример #17
0
 internal GoLayerCache(DiagramView view)
 {
     this.myView = null;
     this.myObjects = null;
     this.myRect = new RectangleF(0f, 0f, 0f, 0f);
     this.myStrokes = null;
     this.myView = view;
     this.myObjects = new ArrayList();
     this.myStrokes = new ArrayList();
 }
Пример #18
0
 public virtual Shapes.OverviewRectangleGraph CreateOverviewRectangle(DiagramView observed)
 {
     return new Shapes.OverviewRectangleGraph();
 }
Пример #19
0
 public ToolAction(DiagramView v)
     : base(v)
 {
     this.myActionObject = null;
 }