public LinkOrchestrator(ContainerDrawer containerDrawer) { sturctureDrawings = new List<StructureDrawing>(); linkStrategy = new NSWELinkStrategy(); this.containerDrawer = containerDrawer; containerDrawer.ActionListener.ItemsMoved += new ItemsMovedHandler(OnItemsMoved); }
public InvalidationStrategy(ContainerDrawer container) { this.containerDrawer = container; this.containerDrawer.ActionListener.ItemsMoved += new ItemsMovedHandler(OnItemsMoved); this.containerDrawer.ActionListener.SelectionChanged += new SelectedItemsChangedHandler(OnSelectionChanged); this.containerDrawer.LinkOrchestrator.linkStrategy.LinkDirectionChangedEvent += new LinkDirectionChangedHandler(OnLinkDirectionChanged); this.containerDrawer.DiagramContainer.Paint += new PaintEventHandler(OnPaint); this.containerDrawer.DiagramContainer.ZoomFactorChanged += new ZoomFactorChangedHandler(OnZoomChanged); this.containerDrawer.DiagramContainer.DrawingResized += new DrawingResizedHandler(OnDrawingResized); }
public DiagramContainer() { zoomFactor = 100; structures = new List<ILinkable>(); selectedItems = new List<StructureDrawing>(); SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw | ControlStyles.DoubleBuffer | ControlStyles.UserPaint, true); hScrollBar = new HScrollBar(); hScrollBar.Dock = DockStyle.Bottom; vScrollBar = new VScrollBar(); vScrollBar.Dock = DockStyle.Right; vScrollBar.Scroll += new ScrollEventHandler(vScrollBar1_Scroll); hScrollBar.Scroll += new ScrollEventHandler(hScrollBar1_Scroll); this.Resize += new EventHandler(DiagramContainer_Resize); this.Controls.Add(hScrollBar); this.Controls.Add(vScrollBar); nodeEditor = new NodeTextEditor(this); containerDrawer = new ContainerDrawer(this); this.Invalidate(); }