public void InitForEdge(EdgeWrapper current_edge_wrapper) { this.Text = "Edge properties"; working_edge = current_edge_wrapper.GraphEdge; lblName.Text = "Edge name: " + current_edge_wrapper.EdgeName; RebuildList(); }
public EdgeWrapper(GlGraphEdge existing_edge_from_db) { _api_graph_edge = existing_edge_from_db; }
// create edge objects during node object setup internal void InitializeEdges() { string loop_node_guid_str = _ParentGraph.GlNodeRef.NextSubscript(GlobalsGraphAdmin.GL_EDGES_SUBSCRIPT, _NodeUID.ToString(), ""); while (loop_node_guid_str != "") { Guid loop_node_guid = Guid.Empty; bool is_valid = false; if (Guid.TryParse(loop_node_guid_str, out loop_node_guid)) { if (_ParentGraph.AllNodesByGuid.ContainsKey(loop_node_guid)) { is_valid = true; GlGraphEdge new_edge = new GlGraphEdge(_ParentGraph, this, _ParentGraph.AllNodesByGuid[loop_node_guid], false); // the GlGraphEdge object automatically registers itself as a member of this node's OutgoingEdges collection // as well as the TARGET node's IncomingEdges collection } } if (!is_valid) { // clean up bogus data _ParentGraph.GlNodeRef.Kill(GlobalsGraphAdmin.GL_EDGES_SUBSCRIPT, _NodeUID.ToString(), loop_node_guid_str); } loop_node_guid_str = _ParentGraph.GlNodeRef.NextSubscript(GlobalsGraphAdmin.GL_EDGES_SUBSCRIPT, _NodeUID.ToString(), loop_node_guid_str); } }