public NVertexMovedVisitor(NPathResolver pathResolver, List <NComponent> components) { this.components = components; connectVisitor = new NConnectVisitor { PathResolver = pathResolver }; boxVisitor = new NBoxMovedVisitor { PathResolver = pathResolver }; }
public NPanel() { InitializeComponent(); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); this.SetStyle(ControlStyles.UserPaint, true); NComponents = new List <NComponent>(); mouseTool = new NBoxTool(this.NComponents); mouseTool.ReDraw += new Action(mouseTool_ReDraw); mouseTool.ComponentSelected += new Action <NComponent>(mouseTool_ComponentSelected); mouseTool.Change += new Action(mouseTool_Change); pathResolver = new NPathResolver { BoundingBox = new NBox { X = 0, Y = 0, Width = 900, Height = 1200 }, Components = this.NComponents }; viewVisitor = new NViewVisitor(this.Font); vertexMovedVisitor = new NVertexMovedVisitor(pathResolver, this.NComponents); this.MouseDown += new MouseEventHandler(Box_MouseDown); this.MouseUp += new MouseEventHandler(Box_MouseUp); this.MouseMove += new MouseEventHandler(Box_MouseMove); this.MouseDoubleClick += new MouseEventHandler(NPanel_MouseDoubleClick); this.txtText.TextChanged += new EventHandler(TextBoxTextChange); this.txtText.KeyDown += new KeyEventHandler(txtText_KeyDown); this.ComponentAdded += new Action <NComponent>(NPanel_ComponentAdded); }
public NConnectorConnetVisitor(NPathResolver resolver) { this.resolver = resolver; }