public VisualLink(VisualVertex Vertex1, VisualVertex Vertex2) { v1 = Vertex1; v2 = Vertex2; UpdateLink(); }
private void MainForm_MouseDown(object sender, MouseEventArgs e) { isDragging = true; if (e.Clicks == 2) { isDragging = false; box = new VisualVertex(e.X - VisualVertex.VisualSize / 2, e.Y - VisualVertex.VisualSize / 2); box.VertexNumber = (GlobalVisual.vertCount++) + 1; GlobalVisual.Vertexes.Add(box); Controls.Add(box); GlobalVisual.BuildMatrix(); } }
public VisualLink(VisualLink l) { this.v1 = l.v1; this.v2 = l.v2; UpdateLink(); }
private void MainForm_MouseDown(object sender, MouseEventArgs e) { isDragging = true; if(e.Clicks == 2) { isDragging = false; box = new VisualVertex(e.X-VisualVertex.VisualSize/2, e.Y-VisualVertex.VisualSize/2); box.VertexNumber = (GlobalVisual.vertCount++)+1; GlobalVisual.Vertexes.Add(box); Controls.Add(box); GlobalVisual.BuildMatrix(); } }