示例#1
0
        private static byte GetNodeColor(QiHe.CodeLib.NodeColor nodeColor)
        {
            switch (nodeColor)
            {
            case QiHe.CodeLib.NodeColor.Black:
                return(NodeColor.Black);

            case QiHe.CodeLib.NodeColor.Red:
                return(NodeColor.Red);

            default:
                throw new ArgumentException();
            }
        }
示例#2
0
        private static byte GetNodeColor(QiHe.CodeLib.NodeColor nodeColor)
        {
            byte result;

            switch (nodeColor)
            {
            case QiHe.CodeLib.NodeColor.Red:
                result = 0;
                break;

            case QiHe.CodeLib.NodeColor.Black:
                result = 1;
                break;

            default:
                throw new ArgumentException();
            }
            return(result);
        }