Example #1
0
 public RoofStyleCatalogResource(int APIversion, Stream unused, RoofStyleCatalogResource basis)
     : base(APIversion, basis.version, basis.common, basis.list)
 {
     this.common             = new Common(requestedApiVersion, OnResourceChanged, basis.common);
     this.roofType           = basis.roofType;
     this.catalogRoofPattern = basis.catalogRoofPattern;
     this.catalogWallStyle   = basis.catalogWallStyle;
     this.defaultSlope       = basis.defaultSlope;
     this.roofStyleFlags     = basis.roofStyleFlags;
 }
 public RoofStyleCatalogResource(int APIversion, Stream unused, RoofStyleCatalogResource basis)
     : base(APIversion, basis.version, basis.common, basis.list)
 {
     this.common = new Common(requestedApiVersion, OnResourceChanged, basis.common);
     this.roofType = basis.roofType;
     this.catalogRoofPattern = basis.catalogRoofPattern;
     this.catalogWallStyle = basis.catalogWallStyle;
     this.defaultSlope = basis.defaultSlope;
     this.roofStyleFlags = basis.roofStyleFlags;
 }
Example #3
0
 public RoofStyleCatalogResource(int APIversion, uint version,
                                 Common common, Roof roofType, uint catalogRoofStyle, uint catalogWallStyle, float defaultSlope, RoofStyle roofStyleFlags,
                                 TGIBlockList ltgib)
     : base(APIversion, version, common, ltgib)
 {
     this.common             = new Common(requestedApiVersion, OnResourceChanged, common);
     this.roofType           = roofType;
     this.catalogRoofPattern = catalogRoofStyle;
     this.catalogWallStyle   = catalogWallStyle;
     this.defaultSlope       = defaultSlope;
     this.roofStyleFlags     = roofStyleFlags;
 }
 public RoofStyleCatalogResource(int APIversion, uint version,
     Common common, Roof roofType, uint catalogRoofStyle, uint catalogWallStyle, float defaultSlope, RoofStyle roofStyleFlags,
     TGIBlockList ltgib)
     : base(APIversion, version, common, ltgib)
 {
     this.common = new Common(requestedApiVersion, OnResourceChanged, common);
     this.roofType = roofType;
     this.catalogRoofPattern = catalogRoofStyle;
     this.catalogWallStyle = catalogWallStyle;
     this.defaultSlope = defaultSlope;
     this.roofStyleFlags = roofStyleFlags;
 }
        protected override void Parse(Stream s)
        {
            BinaryReader r = new BinaryReader(s);
            base.Parse(s);
            this.common = new Common(requestedApiVersion, OnResourceChanged, s);
            this.roofType = (Roof)r.ReadUInt32();
            this.catalogRoofPattern = r.ReadUInt32();
            this.catalogWallStyle = r.ReadUInt32();
            this.defaultSlope = r.ReadSingle();
            this.roofStyleFlags = (RoofStyle)r.ReadUInt32();

            list = new TGIBlockList(OnResourceChanged, s, tgiPosn, tgiSize);

            if (checking) if (this.GetType().Equals(typeof(RoofStyleCatalogResource)) && s.Position != s.Length)
                    throw new InvalidDataException(String.Format("Data stream length 0x{0:X8} is {1:X8} bytes longer than expected at {2:X8}",
                        s.Length, s.Length - s.Position, s.Position));
        }
Example #6
0
        protected override void Parse(Stream s)
        {
            BinaryReader r = new BinaryReader(s);

            base.Parse(s);
            this.common             = new Common(OnResourceChanged, s);
            this.roofType           = (Roof)r.ReadUInt32();
            this.catalogRoofPattern = r.ReadUInt32();
            this.catalogWallStyle   = r.ReadUInt32();
            this.defaultSlope       = r.ReadSingle();
            this.roofStyleFlags     = (RoofStyle)r.ReadUInt32();

            list = new TGIBlockList(OnResourceChanged, s, tgiPosn, tgiSize);

            if (this.GetType().Equals(typeof(RoofStyleCatalogResource)) && s.Position != s.Length)
            {
                throw new InvalidDataException(String.Format("Data stream length 0x{0:X8} is {1:X8} bytes longer than expected at {2:X8}",
                                                             s.Length, s.Length - s.Position, s.Position));
            }
        }