Пример #1
0
                public PlainTextExtension(Header parent, BinaryReader input) : base(parent)
                {
                    TextGridLeftPosition     = (ushort)(input.ReadBytes(2)).GetUIntLE(0);
                    TextGridTopPosition      = (ushort)(input.ReadBytes(2)).GetUIntLE(0);
                    TextGridWidth            = (ushort)(input.ReadBytes(2)).GetUIntLE(0);
                    TextGridHeight           = (ushort)(input.ReadBytes(2)).GetUIntLE(0);
                    CharacterCellWidth       = input.ReadByte();
                    CharacterCellHeight      = input.ReadByte();
                    TextForegroundColorIndex = input.ReadByte();
                    TextBackgroundColorIndex = input.ReadByte();

                    SubBlocks = new List <DataSubBlock>();
                    bool isDone = false;

                    while (!isDone)
                    {
                        DataSubBlock subBlock = new DataSubBlock(input, parent, this);
                        if (subBlock.IsBlockTerminator)
                        {
                            isDone = true;
                        }
                        else
                        {
                            SubBlocks.Add(subBlock);
                        }
                    }
                }
Пример #2
0
                public CommentExtension(Header parent, BinaryReader input) : base(parent)
                {
                    SubBlocks = new List <DataSubBlock>();
                    bool isDone = false;

                    while (!isDone)
                    {
                        DataSubBlock subBlock = new DataSubBlock(input, parent, this);
                        if (subBlock.IsBlockTerminator)
                        {
                            isDone = true;
                        }
                        else
                        {
                            SubBlocks.Add(subBlock);
                        }
                    }
                }
Пример #3
0
                public ApplicationExtension(Header parent, BinaryReader input) : base(parent)
                {
                    BlockSize                    = input.ReadByte();
                    ApplicationIdentifier        = Encoding.Default.GetString(input.ReadBytes(8));
                    ApplicationAuthorizationCode = input.ReadBytes(3);

                    SubBlocks = new List <DataSubBlock>();
                    bool isDone = false;

                    while (!isDone)
                    {
                        DataSubBlock subBlock = new DataSubBlock(input, parent, this);
                        if (subBlock.IsBlockTerminator)
                        {
                            isDone = true;
                        }
                        else
                        {
                            SubBlocks.Add(subBlock);
                        }
                    }
                }