Example #1
0
        protected override void DoLoadFromStream(Stream aStream, HCStyle aStyle, ushort aFileVersion)
        {
            base.DoLoadFromStream(aStream, aStyle, aFileVersion);

            if (aFileVersion > 22 && aFileVersion < 55)
            {
                ushort vAnnCount = 0;
                byte[] vBuffer   = BitConverter.GetBytes(vAnnCount);
                aStream.Read(vBuffer, 0, vBuffer.Length);
                vAnnCount = BitConverter.ToUInt16(vBuffer, 0);
                if (vAnnCount > 0)
                {
                    for (int i = 0; i < vAnnCount; i++)
                    {
                        HCDataAnnotate vAnn = new HCDataAnnotate();
                        vAnn.LoadFromStream(aStream, aFileVersion);
                        //FDataAnnotates.Add(vAnn);
                    }
                }
            }

            if (aFileVersion > 54)
            {
                byte[] vBuffer = BitConverter.GetBytes(FNextID);
                aStream.Read(vBuffer, 0, vBuffer.Length);
                FNextID = BitConverter.ToUInt32(vBuffer, 0);
            }
            else
            {
                FNextID = 0;
            }
        }
Example #2
0
        public override void LoadFromStream(Stream aStream, HCStyle aStyle, ushort aFileVersion)
        {
            base.LoadFromStream(aStream, aStyle, aFileVersion);

            if (aFileVersion > 22)
            {
                ushort vAnnCount = 0;
                byte[] vBuffer   = BitConverter.GetBytes(vAnnCount);
                aStream.Read(vBuffer, 0, vBuffer.Length);
                if (vAnnCount > 0)
                {
                    for (int i = 0; i <= vAnnCount - 1; i++)
                    {
                        HCDataAnnotate vAnn = new HCDataAnnotate();
                        vAnn.LoadFromStream(aStream, aFileVersion);
                        FDataAnnotates.Add(vAnn);
                    }
                }
            }
        }