当前位置: 首页>>代码示例>>C#>>正文


C# RecordHeader.WriteTo方法代码示例

本文整理汇总了C#中SwfDotNet.IO.Tags.RecordHeader.WriteTo方法的典型用法代码示例。如果您正苦于以下问题:C# RecordHeader.WriteTo方法的具体用法?C# RecordHeader.WriteTo怎么用?C# RecordHeader.WriteTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SwfDotNet.IO.Tags.RecordHeader的用法示例。


在下文中一共展示了RecordHeader.WriteTo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UpdateData

        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void UpdateData(byte version)
        {
            MemoryStream m = new MemoryStream();
            BufferedBinaryWriter w = new BufferedBinaryWriter(m);

            RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());

            rh.WriteTo(w);
            if (Meta != null)
                w.Write(Meta);

            w.Flush();
            // write to data array
            _data = m.ToArray();
        }
开发者ID:Berenold,项目名称:SwfExport,代码行数:18,代码来源:MetadataTag.cs

示例2: UpdateData

        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void UpdateData(byte version)
        {
            if (version < 3)
                return;

            MemoryStream m = new MemoryStream();
            BufferedBinaryWriter w = new BufferedBinaryWriter(m);

            RecordHeader rh = new RecordHeader(TagCode, GetSizeOf(version));
            rh.WriteTo(w);

            w.WriteBoolean(HasClipActions());
            w.WriteBoolean(HasClipDepth());
            w.WriteBoolean(HasName());
            w.WriteBoolean(HasRatio());
            w.WriteBoolean(HasColorTransform());
            w.WriteBoolean(HasMatrix());
            w.WriteBoolean(HasCharacter());
            w.WriteBoolean(placeFlagMove);

            w.Write(depth);
            if (HasCharacter())
                w.Write(characterId);
            if (HasMatrix())
                matrix.WriteTo(w);
            if (HasColorTransform())
                colorTransform.WriteTo(w);
            if (HasRatio())
                w.Write((ushort)(ratio * 65535.0f));
            if (HasName())
                w.WriteString(name);
            if (HasClipDepth())
                w.Write(clipDepth);

            if (HasClipActions())
            {
                w.Write(actionHead);
                // ClipActionRecords
                foreach (ClipActionRec clpA in clipActions)
                    w.Write(clpA.GetData(version));
                // ClipActionRecords end
                if (version >= 6)
                    w.Write((int)0);
                else
                    w.Write((short)0);
            }

            w.Flush();
            _data = m.ToArray();
        }
开发者ID:foresightbrand,项目名称:brandqq,代码行数:53,代码来源:PlaceObject2Tag.cs

示例3: UpdateData

        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void UpdateData(byte version)
        {
            if (version < 3)
                return;

            MemoryStream m = new MemoryStream();
            BufferedBinaryWriter w = new BufferedBinaryWriter(m);

            RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());

            rh.WriteTo(w);
            w.Write(this.characterId);

            w.SynchBits();
            if (this.startBounds != null)
                this.startBounds.WriteTo(w);
            w.SynchBits();
            if (this.endBounds != null)
                this.endBounds.WriteTo(w);

            w.Write(this.offset);
            if (this.morphFillStyles != null)
                this.morphFillStyles.WriteTo(w);
            if (this.morphLineStyles != null)
                this.morphLineStyles.WriteTo(w);

            ShapeWithStyle.NumFillBits = (uint)morphFillStyles.Count;
            ShapeWithStyle.NumLineBits = (uint)morphLineStyles.Count;

            if (this.startEdges != null)
                this.startEdges.WriteTo(w);
            if (this.endEdges != null)
                this.endEdges.WriteTo(w);

            w.Flush();
            // write to data array
            _data = m.ToArray();
        }
开发者ID:Berenold,项目名称:SwfExport,代码行数:41,代码来源:DefineMorphShapeTag.cs

示例4: UpdateData

        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void UpdateData(byte version)
        {
            if (version < 3)
                return;

            MemoryStream m = new MemoryStream();
            BufferedBinaryWriter w = new BufferedBinaryWriter(m);

            RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());

            rh.WriteTo(w);
            w.Write(this.buttonId);
            w.WriteUBits(0, 7);
            w.WriteBoolean(trackAsMenu);
            w.Write(this.actionOffset);
            if (characters != null)
            {
                IEnumerator butts = characters.GetEnumerator();
                while (butts.MoveNext())
                {
                    ((ButtonRecord)butts.Current).WriteTo(w, TagCodeEnum.DefineButton2);
                    w.SynchBits();
                }
            }
            w.Write((byte)0);
            if (actions != null)
            {
                for (int i = 0; i < actions.Count; i++)
                {
                    ButtonCondaction buttCon = actions[i];
                    if (i == actions.Count - 1)
                        w.Write((ushort)0);
                    else
                    {
                        int size = buttCon.GetSizeOf();
                        w.Write((ushort)size);
                    }
                    buttCon.WriteTo(w);
                }
            }

            w.Flush();
            // write to data array
            _data = m.ToArray();
        }
开发者ID:foresightbrand,项目名称:brandqq,代码行数:48,代码来源:DefineButton2Tag.cs

示例5: UpdateData

        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void UpdateData(byte version)
        {
            if (version < 7)
                return;

            MemoryStream m = new MemoryStream();
            BufferedBinaryWriter w = new BufferedBinaryWriter(m);

            RecordHeader rh = new RecordHeader(TagCode, 4);

            rh.WriteTo(w);
            w.Write(recursion);
            w.Write(timeout);

            w.Flush();
            // write to data array
            _data = m.ToArray();
        }
开发者ID:bladecoding,项目名称:SwfExport,代码行数:21,代码来源:ScriptLimitTag.cs

示例6: UpdateData

        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void UpdateData(byte version)
        {
            if (version < 6)
                return;

            MemoryStream m = new MemoryStream();
            BufferedBinaryWriter w = new BufferedBinaryWriter(m);

            RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());
            rh.WriteTo(w);

            w.Write(this.characterId);
            w.Write(this.numFrames);
            w.Write(this.width);
            w.Write(this.height);

            w.WriteUBits(0, 5);
            w.WriteUBits(videoFlagsDeblocking, 2);
            w.WriteBoolean(videoFlagsSmoothing);

            w.Write(this.codecId);

            w.Flush();
            // write to data array
            _data = m.ToArray();
        }
开发者ID:foresightbrand,项目名称:brandqq,代码行数:29,代码来源:DefineVideoStreamTag.cs

示例7: UpdateData

        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void UpdateData(byte version)
        {
            MemoryStream m = new MemoryStream();
            BufferedBinaryWriter w = new BufferedBinaryWriter(m);

            RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());
            rh.WriteTo(w);

            w.Write(characterId);
            w.Write(depth);
            if (this.matrix != null)
                this.matrix.WriteTo(w);
            if (this.colorTransform != null)
                this.colorTransform.WriteTo(w);

            w.Flush();
            // write to data array
            _data = m.ToArray();
        }
开发者ID:bladecoding,项目名称:SwfExport,代码行数:22,代码来源:PlaceObjectTag.cs

示例8: UpdateData

        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void UpdateData(byte version)
        {
            MemoryStream m = new MemoryStream();
            BufferedBinaryWriter w = new BufferedBinaryWriter(m);

            RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());
            rh.WriteTo(w);

            w.WriteUBits(0, 4);
            w.WriteUBits(playbackSoundRate, 2);
            w.WriteUBits(playbackSoundSize, 1);
            w.WriteUBits(playbackSoundType, 1);
            w.WriteUBits(streamSoundCompression, 4);
            w.WriteUBits(streamSoundRate, 2);
            w.WriteUBits(streamSoundSize, 1);
            w.WriteUBits(streamSoundType, 1);
            w.Write(streamSoundSampleCount);
            if (streamSoundCompression == 2)
                w.Write(latencySeek);

            w.Flush();
            // write to data array
            _data = m.ToArray();
        }
开发者ID:foresightbrand,项目名称:brandqq,代码行数:27,代码来源:SoundStreamHeadTag.cs

示例9: UpdateData

        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void UpdateData(byte version)
        {
            MemoryStream m = new MemoryStream();
            BufferedBinaryWriter w = new BufferedBinaryWriter(m);

            RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());

            rh.WriteTo(w);
            w.Write(this.fontId);

            //TODO: calcule offset !!
            if (offsetTable != null)
            {
                IEnumerator offsets = offsetTable.GetEnumerator();
                while (offsets.MoveNext())
                    w.Write((ushort)offsets.Current);
            }

            ShapeWithStyle.NumFillBits = 0;
            ShapeWithStyle.NumLineBits = 0;
            glyphShapesTable.WriteTo(w);

            w.Flush();
            // write to data array
            _data = m.ToArray();
        }
开发者ID:Berenold,项目名称:SwfExport,代码行数:29,代码来源:DefineFontTag.cs

示例10: UpdateData

        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void UpdateData(byte version)
        {
            if (version < VersionCompatibility)
                return;

            MemoryStream m = new MemoryStream();
            BufferedBinaryWriter w = new BufferedBinaryWriter(m);

            RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());
            rh.WriteTo(w);

            w.Write(this.characterId);
            if (rect != null)
                rect.WriteTo(w);
            if (matrix != null)
                matrix.WriteTo(w);

            w.Write(TextRecordCollection.GLYPH_BITS);
            w.Write(TextRecordCollection.ADVANCE_BITS);

            if (textRecords != null)
            {
                IEnumerator records = textRecords.GetEnumerator();
                while (records.MoveNext())
                    ((TextRecord)records.Current).WriteTo(w);
            }
            w.Write((byte)0);

            w.Flush();
            // write to data array
            _data = m.ToArray();
        }
开发者ID:foresightbrand,项目名称:brandqq,代码行数:35,代码来源:DefineText.cs

示例11: UpdateData

        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void UpdateData(byte version)
        {
            if (version < this.versionCompatibility)
                return;

            MemoryStream m = new MemoryStream();
            BufferedBinaryWriter w = new BufferedBinaryWriter(m);

            RecordHeader rh = new RecordHeader(this.TagCode, GetSizeOf(), true);
            rh.WriteTo(w);

            w.Write(this.shapeId);
            rect.WriteTo(w);
            shape.WriteTo(w);

            w.Flush();
            // write to data array
            _data = m.ToArray();
        }
开发者ID:bladecoding,项目名称:SwfExport,代码行数:22,代码来源:DefineShape.cs

示例12: UpdateData

        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void UpdateData(byte version)
        {
            if (version < 5)
                return;

            MemoryStream m = new MemoryStream();
            BufferedBinaryWriter w = new BufferedBinaryWriter(m);

            int lenght = 2 + url.Length;
            if (exportedCharacters != null)
                lenght += Assert.GetSizeOf(exportedCharacters);

            RecordHeader rh = new RecordHeader(TagCode, lenght);
            rh.WriteTo(w);

            w.Write(url);
            w.Write((ushort)exportedCharacters.Count);

            IEnumerator asserts = exportedCharacters.GetEnumerator();
            while (asserts.MoveNext())
            {
                Assert assert = (Assert)asserts.Current;
                assert.WriteTo(w);
            }

            w.Flush();
            // write to data array
            _data = m.ToArray();
        }
开发者ID:foresightbrand,项目名称:brandqq,代码行数:32,代码来源:ImportAssetsTag.cs

示例13: UpdateData

        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void UpdateData(byte version)
        {
            if (version < 6)
                return;

            MemoryStream m = new MemoryStream();
            BufferedBinaryWriter w = new BufferedBinaryWriter(m);

            RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());
            rh.WriteTo(w);
            w.Write(this.streamId);
            w.Write(this.frameNum);
            if (video != null)
                video.WriteTo(w);

            // write to data array
            w.Flush();
            _data = m.ToArray();
        }
开发者ID:foresightbrand,项目名称:brandqq,代码行数:22,代码来源:VideoFrameTag.cs

示例14: UpdateData

        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void UpdateData(byte version)
        {
            if (version < 2)
                return;

            MemoryStream m = new MemoryStream();
            BufferedBinaryWriter w = new BufferedBinaryWriter(m);

            RecordHeader rh = new RecordHeader(TagCode, GetSizeOf());

            rh.WriteTo(w);
            w.Write(this.buttonId);
            if (buttonColorTransform != null)
                buttonColorTransform.WriteTo(w);

            w.Flush();
            // write to data array
            _data = m.ToArray();
        }
开发者ID:bladecoding,项目名称:SwfExport,代码行数:22,代码来源:DefineButtonCxFormTag.cs

示例15: UpdateData

        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void UpdateData(byte version)
        {
            MemoryStream m = new MemoryStream();
            BufferedBinaryWriter w = new BufferedBinaryWriter(m);

            int length = 0;
            if (soundData != null)
                length += soundData.Length;
            RecordHeader rh = new RecordHeader(TagCode, length);
            rh.WriteTo(w);

            if (soundData != null)
                w.Write(soundData);

            w.Flush();
            // write to data array
            _data = m.ToArray();
        }
开发者ID:foresightbrand,项目名称:brandqq,代码行数:21,代码来源:SoundStreamBlockTag.cs


注:本文中的SwfDotNet.IO.Tags.RecordHeader.WriteTo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。