protected virtual void PaintHandle(Graphics g, DiagramView view) { SubGraphNode graph1 = base.Parent as SubGraphNode; if (graph1 != null) { RectangleF ef1 = this.Bounds; if (graph1.Collapsible) { float single1 = ef1.Y + (ef1.Height / 2f); DiagramGraph.DrawLine(g, view, this.Pen, ef1.X + (ef1.Width / 4f), single1, ef1.X + ((ef1.Width * 3f) / 4f), single1); if (graph1.IsExpanded) { return; } float single2 = ef1.X + (ef1.Width / 2f); DiagramGraph.DrawLine(g, view, this.Pen, single2, ef1.Y + (ef1.Height / 4f), single2, ef1.Y + ((ef1.Height * 3f) / 4f)); } else { DiagramGraph.DrawEllipse(g, view, this.Pen, null, ef1.X + (ef1.Width / 4f), ef1.Y + (ef1.Height / 4f), ef1.Width / 2f, ef1.Height / 2f); } } }
public virtual void PaintDecoration(Graphics g, DiagramView view) { if (this.Shadowed) { SizeF ef1 = this.GetShadowOffset(view); GraphicsPath path1 = this.GetPath(ef1.Width, ef1.Height); if (this.Brush != null) { System.Drawing.Brush brush1 = this.GetShadowBrush(view); DiagramGraph.DrawPath(g, view, null, brush1, path1); } else if (this.BorderPen != null) { Pen pen1 = this.GetShadowPen(view, DiagramGraph.GetPenWidth(this.BorderPen)); DiagramGraph.DrawPath(g, view, pen1, null, path1); } this.DisposePath(path1); } GraphicsPath path2 = this.GetPath(0f, 0f); DiagramGraph.DrawPath(g, view, this.BorderPen, this.Brush, path2); Pen pen2 = this.LinePen; if (pen2 != null) { float single1 = base.Left; float single2 = base.Top; float single3 = base.Width; float single4 = base.Height; float single5 = System.Math.Max(DiagramGraph.GetPenWidth(pen2), this.Spacing); SizeF ef2 = this.TopLeftMargin; SizeF ef3 = this.BottomRightMargin; if (this.Orientation == System.Windows.Forms.Orientation.Vertical) { float single6 = single2 + ef2.Height; float single7 = 0f; for (int num1 = 0; num1 < this.Count; num1++) { DiagramShape obj1 = this[num1]; if ((obj1 != null) && obj1.CanView()) { if (single7 > 0f) { DiagramGraph.DrawLine(g, view, pen2, single1, (single6 + single7) + (single5 / 2f), single1 + single3, (single6 + single7) + (single5 / 2f)); single7 += single5; } single7 += obj1.Height; } } } else { float single8 = single1 + ef2.Width; float single9 = 0f; for (int num2 = 0; num2 < this.Count; num2++) { DiagramShape obj2 = this[num2]; if ((obj2 != null) && obj2.CanView()) { if (single9 > 0f) { DiagramGraph.DrawLine(g, view, pen2, (single8 + single9) + (single5 / 2f), single2, (single8 + single9) + (single5 / 2f), single2 + single4); single9 += single5; } single9 += obj2.Width; } } } } this.DisposePath(path2); }