Пример #1
0
        private void ReadProperty(ref ShockwaveReader input, int index, int length)
        {
            switch (index)
            {
            case 0:
                ScriptText = input.ReadString(length);
                break;

            case 1:
                Name = input.ReadString();
                break;

            case 2:
                FilePath = input.ReadString(length);
                break;

            case 3:
                FileName = input.ReadString(length);
                break;

            case 4:
                FileType = input.ReadString(length);
                break;

            case 9:
                XtraGUID = new Guid(input.ReadBytes(length));
                //XtraGUID = input.Read<Guid>();
                break;

            case 10:
                XtraName = input.ReadNullString();
                break;

            case 11:     //TODO:
                break;

            case 12:
                RegistrationPoints = new int[length / 4];
                for (int i = 0; i < RegistrationPoints.Length; i++)
                {
                    RegistrationPoints[i] = input.ReadInt32();
                }
                break;

            case 16:
                ClipboardFormat = input.ReadString(length);
                break;

            case 17:
                CreationDate = input.ReadInt32() * 1000;
                break;

            case 18:
                ModifiedDate = input.ReadInt32() * 1000;
                break;

            case 19:
                ModifiedBy = input.ReadNullString();
                break;

            case 20:
                Comments = input.ReadString(length);
                break;

            case 21:
                ReadOnlySpan <byte> imageFlags = input.ReadBytes(length);    //4

                ImageCompression = imageFlags[0] >> 4;
                ImageQuality     = imageFlags[1];
                break;

            case 7:     //TODO:
            default:
                ReadOnlySpan <byte> unknown = input.ReadBytes(length);
                break;
            }
        }