Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IdAllocation"/> class.
 /// </summary>
 /// <param name="ed">The mechanism for reading back content.</param>
 internal IdAllocation(EditDeserializer ed)
     : base(ed)
 {
     this.GroupId   = ed.ReadInt32(DataField.GroupId);
     this.LowestId  = ed.ReadInt32(DataField.LowestId);
     this.HighestId = ed.ReadInt32(DataField.HighestId);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NewProjectEvent"/> class.
 /// </summary>
 /// <param name="ed">The mechanism for reading back content.</param>
 internal NewProjectEvent(EditDeserializer ed)
     : base(ed)
 {
     this.ProjectId     = new Guid(ed.ReadString(DataField.ProjectId));
     this.ProjectName   = ed.ReadString(DataField.ProjectName);
     this.LayerId       = ed.ReadInt32(DataField.LayerId);
     this.DefaultSystem = ed.ReadString(DataField.CoordinateSystem);
     this.UserName      = ed.ReadString(DataField.UserName);
     this.MachineName   = ed.ReadString(DataField.MachineName);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Reads data that was previously written using <see cref="WriteData"/>
        /// </summary>
        /// <param name="editDeserializer">The mechanism for reading back content.</param>
        /// <param name="font">The text style</param>
        /// <param name="position">Position of the text's reference point</param>
        /// <param name="height">The height of the text, in meters on the ground.</param>
        /// <param name="width">The total width of the text, in meters on the ground.</param>
        /// <param name="rotation">Clockwise rotation from horizontal</param>
        static void ReadData(EditDeserializer editDeserializer, out IFont font, out PointGeometry position,
                             out float height, out float width, out IAngle rotation)
        {
            if (editDeserializer.IsNextField(DataField.Font))
            {
                int fontId = editDeserializer.ReadInt32(DataField.Font);
                font = EnvironmentContainer.FindFontById(fontId);
            }
            else
            {
                font = null;
            }

            position = editDeserializer.ReadPointGeometry(DataField.X, DataField.Y);
            width    = (float)editDeserializer.ReadDouble(DataField.Width);
            height   = (float)editDeserializer.ReadDouble(DataField.Height);
            rotation = editDeserializer.ReadRadians(DataField.Rotation);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RowTextContent"/> class
 /// using the data read from persistent storage.
 /// </summary>
 /// <param name="editDeserializer">The mechanism for reading back content.</param>
 internal RowTextContent(EditDeserializer editDeserializer)
     : base(editDeserializer)
 {
     m_TableId    = editDeserializer.ReadInt32(DataField.Table);
     m_TemplateId = editDeserializer.ReadInt32(DataField.Template);
 }