コード例 #1
0
        /// <summary>
        /// Writes the content of this instance to a persistent storage area.
        /// </summary>
        /// <param name="es">The mechanism for storing content.</param>
        public override void WriteData(EditSerializer es)
        {
            base.WriteData(es);

            es.WriteString(DataField.UserName, this.UserName);
            es.WriteString(DataField.MachineName, this.MachineName);
        }
コード例 #2
0
        /// <summary>
        /// Writes the content of this instance to a persistent storage area.
        /// </summary>
        /// <param name="es">The mechanism for storing content.</param>
        public override void WriteData(EditSerializer es)
        {
            base.WriteData(es);

            es.WriteString(DataField.ProjectId, this.ProjectId.ToString().ToUpper());
            es.WriteString(DataField.ProjectName, this.ProjectName);
            es.WriteInt32(DataField.LayerId, this.LayerId);
            es.WriteString(DataField.CoordinateSystem, this.DefaultSystem);
            es.WriteString(DataField.UserName, this.UserName);
            es.WriteString(DataField.MachineName, this.MachineName);
        }
コード例 #3
0
        /// <summary>
        /// Writes the content of this instance to a persistent storage area.
        /// </summary>
        /// <param name="editSerializer">The mechanism for storing content.</param>
        public void WriteData(EditSerializer editSerializer)
        {
            editSerializer.WriteInternalId(DataField.Id, this.Sequence);

            if (Leg.PrimaryFace != this)
            {
                editSerializer.WriteInternalId(DataField.PrimaryFaceId, Leg.PrimaryFace.Sequence);
            }

            editSerializer.WriteString(DataField.EntryString, GetEntryString(null));
        }
コード例 #4
0
        /// <summary>
        /// Writes the content of this instance to a persistent storage area.
        /// </summary>
        /// <param name="editSerializer">The mechanism for storing content.</param>
        public override void WriteData(EditSerializer editSerializer)
        {
            // Express the data as one long string (about 30 chars per position)
            var sb = new StringBuilder(30 * m_Data.Length);

            foreach (IPointGeometry p in m_Data)
            {
                if (sb.Length > 0)
                {
                    sb.Append(",");
                }

                sb.Append(p.Easting.Meters);
                sb.Append(" ");
                sb.Append(p.Northing.Meters);
            }

            editSerializer.WriteString(DataField.LineString, sb.ToString());
        }
コード例 #5
0
        /// <summary>
        /// Makes a copy of this text.
        /// </summary>
        /// <param name="where">The position for the copy. Specify null if the copy should
        /// be at the same position as this text.</param>
        /// <returns>The copy that was created.</returns>

        /*
         * TextGeometry MakeText(IPosition where)
         * {
         *      // If a position was not specified, get the position of this text.
         *  IPosition pos = (where==null ? this.Position : where);
         *
         *  // Create a new key text object.
         *  MiscText text = new MiscText(pos, m_Text);
         *
         *      // Pick up info from this object ... the constructor did it.
         *
         *      // Pick up info from the base class.
         *      DefineText(text);
         *      return text;
         * }
         */

        /// <summary>
        /// Extracts this text primitive into another map.
        /// </summary>
        /// <param name="xref">Info about the extract.</param>
        /// <param name="exLabel">The extract label that has already been created.</param>
        /// <returns>The text that was created.</returns>

        /*
         * TextGeometry Extract(ExTranslation xref, TextFeature exLabel)
         * {
         *  throw new NotImplementedException();
         *
         *      // What map are we extracting into?
         *      CeMap& output = xref.GetExMap();
         *
         *      // Create a new misc-text primitive in the output map.
         *      CeVertex pos(GetEasting(),GetNorthing());
         *      CeMiscText* pEx = new ( os_database::of(&output)
         *                                                , os_ts<CeMiscText>::get() )
         *                                                  CeMiscText(pos,m_pString);
         *
         *      // Define base class stuff.
         *      CeText::Extract(xref,*pEx);
         *
         *      // Return the address of the text we created.
         *      return pEx;
         * }
         */

        /// <summary>
        /// Writes the content of this instance to a persistent storage area.
        /// </summary>
        /// <param name="editSerializer">The mechanism for storing content.</param>
        public override void WriteData(EditSerializer editSerializer)
        {
            base.WriteData(editSerializer);
            editSerializer.WriteString(DataField.Text, m_Text);
        }