Exemplo n.º 1
0
        bool GH_ISerializable.Read(GH_IReader reader)
        {
            var pt = reader.GetPoint3D("Location");

            Text                = reader.GetString("Text");
            Font                = reader.GetString("Font");
            Colour              = reader.GetDrawingColor("Colour");
            Location            = new Point3d(pt.x, pt.y, pt.z);
            HorizontalAlignment = reader.GetDouble("Horizontal");
            VerticalAlignment   = reader.GetDouble("Vertical");
            Rotation            = reader.GetDouble("Rotation");
            return(true);
        }
Exemplo n.º 2
0
        public override bool Read(GH_IReader reader)
        {
            hJustify = reader.GetInt32("Vertical");
            vJustify = reader.GetInt32("Horizontal");

            IsBold   = reader.GetBoolean("Bold");
            IsItalic = reader.GetBoolean("Italic");
            IsUnder  = reader.GetBoolean("Under");

            DrawColor = reader.GetDrawingColor("Color");

            fName = reader.GetString("FontName");
            fSize = reader.GetDouble("FontSize");

            return(base.Read(reader));
        }
Exemplo n.º 3
0
 public bool Read(GH_IReader reader)
 {
     Name        = reader.GetString("tName");
     Description = reader.GetString("tDescription");
     Owner       = reader.GetString("tOwner");
     Link        = reader.GetString("tLink");
     Color       = reader.GetDrawingColor("tColor");
     HasDate     = reader.ItemExists("tHasDate")
         ? reader.GetBoolean("tHasDate")
         : false;
     if (HasDate)
     {
         Date = reader.GetDate("tDate");
     }
     Status   = (TaskStatus)reader.GetInt32("tStatus");
     StatusIn = Status;
     _tags    = new ImmutableHashSet <string>(reader.GetEnumerable("tTags", ReadString));
     return(true);
 }
Exemplo n.º 4
0
 public static Color ReadDrawingColor(GH_IReader reader, string itemName)
 {
     return(reader.GetDrawingColor(itemName));
 }