public AddEdgeAttribute ( String sourceId, ulong timeId, String edgeId, String attribute, Object value ) : void | ||
sourceId | String | |
timeId | ulong | |
edgeId | String | |
attribute | String | |
value | Object | |
Результат | void |
public void AddEdgeAttribute(String sourceId, ulong timeId, String edgeId,
String attribute, Object value)
{
NetStreamStorage buff = new NetStreamStorage().
EncodeArray(_streamIdArray).
EncodeEvent(NetStreamEvent.AddEdgeAttr).
EncodeString(sourceId).
EncodeNative(timeId).
EncodeString(edgeId).
EncodeString(attribute).
EncodeValueWithType(value);
DoSend(buff);
}
private static void AddEdgeWithLabel(NetStreamSender stream, string sourceId, ref ulong timeId, string name, string nodeFrom, string nodeTo) { if (lastEdge != null) stream.RemoveEdgeAttribute(sourceId, timeId++, lastEdge, "ui.class"); stream.AddEdge(sourceId, timeId++, name, nodeFrom, nodeTo, false); stream.AddEdgeAttribute(sourceId, timeId++, name, "ui.label", name); stream.AddEdgeAttribute(sourceId, timeId++, name, "ui.class", "active"); lastEdge = name; }