示例#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);
        }
示例#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));
        }
示例#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);
 }
示例#4
0
 public static Color ReadDrawingColor(GH_IReader reader, string itemName)
 {
     return(reader.GetDrawingColor(itemName));
 }