public virtual void AddPerimeterVertices(IEnumerable <QGVertexControl> vertices) { this.PerimeterVertexList ??= new List <QGVertexControl>(vertices.Count()); QGUserInterface.LockGlobalRefresh(this); foreach (QGVertexControl vc in vertices) { vc.SetDraggability(true); vc.SetDragMobility(true, QGDragParameterType.Active); vc.AddDragStartEventHandler(__NodeDragStart, QGDragParameterType.Active); vc.AddDragMoveEventHandler(__NodeDragMove, QGDragParameterType.Active); vc.AddDragStopEventHandler(__NodeDragStop, QGDragParameterType.Active); vc.SetDragMobility(false, QGDragParameterType.Passive); vc.SetDragMobility(false, QGDragParameterType.Proxy); vc.SetProxyTargets(new IQGControl[] { this }, QGDragParameterType.Passive); vc.SetProxyTargets(new IQGControl[] { this }, QGDragParameterType.Proxy); vc.Deleting += __deletePerimeterVertex; this.PerimeterVertexList.Add(vc); this.ChildControls.Add(vc); } if (this.IsInitialized) { this.RefreshVertexConnections(); this.RefreshVertices(); } QGUserInterface.UnlockGlobalRefresh(this); }
protected override void OnDeleting(QGControlEventArgs e) { QGUserInterface.LockGlobalRefresh(this); foreach (QGEdge edge in this.GraphEdges.ToArray()) { edge.DeleteControl(); } base.OnDeleting(e); QGUserInterface.UnlockGlobalRefresh(this); }
public void RefreshVertexConnections() => QGUserInterface.PostRefreshMethod(this, __refreshConnectionsCallback);
protected void RefreshVertices() => QGUserInterface.PostRefreshMethod(this, __refreshVerticesCallback);