int GetSize(GraphNodeTypeEnum graphNodeType)
        {
            switch (graphNodeType)
            {
            case GraphNodeTypeEnum.UTXOSet:
            case GraphNodeTypeEnum.MemPool:
            case GraphNodeTypeEnum.Genesis:
                return(60);

            case GraphNodeTypeEnum.Block:
                return(40);

            case GraphNodeTypeEnum.Input:
                return(15);

            case GraphNodeTypeEnum.Output:
                return(15);

            case GraphNodeTypeEnum.Tx:
                return(30);

            default:
                return(5);
            }
        }
Beispiel #2
0
 public static CytoscapeNode Create(GraphNodeTypeEnum nodeType, int idNode, string nodeText, int idServiceDescription, string idGroupNode, string classes)
 {
     return(new CytoscapeNode
     {
         Data = new CytoscapeNodeData
         {
             Id = $"{nodeType.GetEnumDescription()}-{idNode}-{nodeText}",
             Label = nodeText,
             Name = nodeText,
             NodeTypeEnum = nodeType,
             Parent = idGroupNode,
             IdWsdlElement = idNode,
             IdServiceDescription = idServiceDescription
         },
         Classes = classes
     });
 }
        int GetColor(GraphNodeTypeEnum graphNodeType)
        {
            switch (graphNodeType)
            {
            case GraphNodeTypeEnum.Genesis:
                return(6);

            case GraphNodeTypeEnum.Block:
                return(1);

            case GraphNodeTypeEnum.Input:
                return(2);

            case GraphNodeTypeEnum.Output:
                return(3);

            case GraphNodeTypeEnum.Tx:
                return(4);

            default:
                return(0);
            }
        }
 public GraphNode(GraphNodeTypeEnum graphNodeType, string title = null, byte[] hash = null)
 {
     GraphNodeType = graphNodeType;
     Display       = title;
     Hash          = hash;
 }