public NewVertex(IVertex _Vertex) { InitializeComponent(); Vertex = _Vertex; IVertex SchemaEdge = MinusZero.Instance.CreateTempVertex(); Edge.AddEdgeEdgesOnlyTo(SchemaEdge, MinusZero.Instance.Empty); GraphUtil.ReplaceEdge(this.Schema.Vertex.Get("BaseEdge:"), "To", SchemaEdge); this.Loaded += new RoutedEventHandler(OnLoad); }
// LOCATION STUFF public IVertex GetEdgeByLocation(Point p) { TabInfo t = getActiveTabInfo(); foreach (KeyValuePair <IVertex, ControlInfo> kvp in t.ControlInfos) { if (VisualTreeHelper.HitTest(kvp.Value.MetaControl, TranslatePoint(p, kvp.Value.MetaControl)) != null) { IVertex v = MinusZero.Instance.CreateTempVertex(); Edge.AddEdgeEdgesOnlyTo(v, kvp.Key); return(v); } } return(null); }
public NewEdge(IVertex _Vertex) { InitializeComponent(); Vertex = _Vertex; IVertex MetaEdge = MinusZero.Instance.CreateTempVertex(); Edge.AddEdgeEdgesOnlyTo(MetaEdge, MinusZero.Instance.Empty); GraphUtil.ReplaceEdge(this.Meta.Vertex.Get("BaseEdge:"), "To", MetaEdge); IVertex ToEdge = MinusZero.Instance.CreateTempVertex(); Edge.AddEdgeEdgesOnlyTo(ToEdge, MinusZero.Instance.Empty); GraphUtil.ReplaceEdge(this.To.Vertex.Get("BaseEdge:"), "To", ToEdge); }
public IVertex GetEdgeByLocation(Point p) { vertexByLocationToReturn = null; foreach (KeyValuePair <IVertex, SimpleVisualiserWrapper> kvp in DisplayedVertexesUIElements) { if (VisualTreeHelper.HitTest(kvp.Value, TranslatePoint(p, kvp.Value)) != null) { IVertex v = MinusZero.Instance.CreateTempVertex(); Edge.AddEdgeEdgesOnlyTo(v, kvp.Value.baseVertex); vertexByLocationToReturn = v; } } // DO WANT THIS FEATURE if (vertexByLocationToReturn == null && GeneralUtil.CompareStrings(MinusZero.Instance.Root.Get(@"User\CurrentUser:\Settings:\AllowBlankAreaDragAndDrop:").Value, "StartAndEnd")) { vertexByLocationToReturn = Vertex.Get(@"BaseEdge:"); } return(vertexByLocationToReturn); }