예제 #1
0
 public override void ParseXml(XmlElement aNode)
 {
     base.ParseXml(aNode);
     ID       = uint.Parse(aNode.Attributes["id"].Value);
     MarkType = (MarkType)byte.Parse(aNode.Attributes["mark"].Value);
     if (MarkType == MarkType.cmtEnd)
     {
         XmlElement        vNode       = null;
         HCAnnotateContent vRepContent = null;
         for (int i = 0; i < aNode.ChildNodes.Count; i++)
         {
             if (aNode.ChildNodes[i].Name == "content")
             {
                 vNode = aNode.ChildNodes[i] as XmlElement;
                 FContent.ParseXml(vNode);
             }
             else
             if (aNode.ChildNodes[i].Name == "rp")
             {
                 vNode       = aNode.ChildNodes[i] as XmlElement;
                 vRepContent = new HCAnnotateContent();
                 vRepContent.ParseXml(vNode);
                 FReplys.Add(vRepContent);
             }
         }
     }
 }
예제 #2
0
 public override void LoadFromStream(Stream aStream, HCStyle aStyle, ushort aFileVersion)
 {
     base.LoadFromStream(aStream, aStyle, aFileVersion);
     byte[] vBuffer = BitConverter.GetBytes(ID);
     aStream.Read(vBuffer, 0, vBuffer.Length);
     ID       = BitConverter.ToUInt32(vBuffer, 0);
     MarkType = (MarkType)aStream.ReadByte();
     if (MarkType == MarkType.cmtEnd)
     {
         FContent.LoadFromStream(aStream, aFileVersion);
         int vRepCount = 0;
         vBuffer = BitConverter.GetBytes(vRepCount);
         aStream.Read(vBuffer, 0, vBuffer.Length);
         vRepCount = BitConverter.ToInt32(vBuffer, 0);
         if (vRepCount > 0)
         {
             HCAnnotateContent vRepContent = null;
             for (int i = 0; i < vRepCount; i++)
             {
                 vRepContent = new HCAnnotateContent();
                 vRepContent.LoadFromStream(aStream, aFileVersion);
                 FReplys.Add(vRepContent);
             }
         }
     }
 }
예제 #3
0
 public HCAnnotateItem(HCCustomData aOwnerData)
     : base(aOwnerData)
 {
     this.StyleNo = HCStyle.Annotate;
     FDrawRect    = new RECT();
     FContent     = new HCAnnotateContent();
     FReplys      = new List <HCAnnotateContent>();
     ID           = 0;
     Width        = 0;
     Height       = 0;
 }