Example #1
0
 public Properties Shape(NodeShape shape)
 {
     ThrowsIfIncorrectType(typeof(NodePart),
                           $"The {partType.Name} have no Shape attribute");
     Attributes.Add("shape", shape.ToString().ToLower());
     return(this);
 }
Example #2
0
        internal AttributeBuilder Shape(NodeShape shape)
        {
            string shapeValue;

            switch (shape)
            {
            case NodeShape.Box:
                shapeValue = "box";
                break;

            case NodeShape.Ellipse:
                shapeValue = "ellipse";
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }


            return(AddAttribute("shape", shapeValue));
        }
 public NodeBuilder Shape(NodeShape shape)
 {
     Attributes["shape"] = shape.ToString().ToLower();
     return(this);
 }
 /// <summary>
 /// Добавляет форму к вершине
 /// </summary>
 /// <param name="shape">
 /// Форма для добавления
 /// </param>
 /// <returns>
 /// Атрибуты вершины с новой формой
 /// </returns>
 public NodeCommonAttributesConfig Shape(NodeShape shape)
 {
     node.Attributes["shape"] = shape.ToString().ToLowerInvariant();
     return(this);
 }
Example #5
0
 internal GraphElement Shape(NodeShape shape) => AddAttribute("shape", shape);