public Node GetNewNode(Point position) { Node node = new Node("State " + this.nodes.Count.ToString(), this) { Name = "State" + this.nodes.Count.ToString() }; ForPoint.Equality(node.Manager.translate, ForPoint.Division(position, node.Manager.Zoom)); nodes.Add(node); Panel.SetZIndex(node, nodes.Count()); return(node); }
public int UpdateSeletedNodes() { Point selectorPoint1 = Selector.Position1; Point selectorPoint2 = Selector.Position2; if (nodes.Count > 0) { selectorPoint1 = ForPoint.Division(selectorPoint1, nodes.First().Manager.Zoom); selectorPoint2 = ForPoint.Division(selectorPoint2, nodes.First().Manager.Zoom); } foreach (Node node in nodes) { node.Selected = Functions.Intersect(node.Point1, node.Point2, selectorPoint1, selectorPoint2); } return(0); }