Пример #1
0
        public void WriteStartNode(string id, NodeOptions options)
        {
            if (id == null)
            {
                throw new ArgumentNullException("id");
            }
            this.checkstate(State.Graph);
            this.state = State.Node;

            this.write(id);
            if (options != null)
            {
                this.write(" [ ");
                if (options.Label != null)
                {
                    this.write("label=\"{0}\" ", options.Label);
                }
                if (options.FontName != null)
                {
                    this.write("fontname=\"{0}\" ", options.FontName);
                }

                if (options.FillColor != null)
                {
                    this.write("fillcolor=\"#{0}\" ", options.FillColor.Value.ToString("X6"));
                }

                if (options.Shape != null)
                {
                    this.write("shape=\"{0}\" ", options.Shape.Value.ToString().ToLower());
                }

                if (options.Style != null)
                {
                    this.write("style=\"{0}\" ", options.Style.Value.ToString().ToLower());
                }


                this.write(" ]");
            }

            this.writeline("");
        }
Пример #2
0
        public void WriteStartNode(string id, NodeOptions options)
        {
            if (id == null)
            {
                throw new ArgumentNullException("id");
            }
            this.checkstate(State.Graph);
            this.state = State.Node;

            this.write(id);
            if (options != null)
            {
                this.write(" [ ");
                if (options.Label != null)
                {
                    this.write("label=\"{0}\" ", options.Label);
                }
                if (options.FontName!= null)
                {
                    this.write("fontname=\"{0}\" ", options.FontName);
                }

                if (options.FillColor!= null)
                {
                    this.write("fillcolor=\"#{0}\" ", options.FillColor.Value.ToString("X6"));
                }

                if (options.Shape!= null)
                {
                    this.write("shape=\"{0}\" ", options.Shape.Value.ToString().ToLower());
                }

                if (options.Style!= null)
                {
                    this.write("style=\"{0}\" ", options.Style.Value.ToString().ToLower());
                }


                this.write(" ]");

            }

            this.writeline("");

        }