/// <summary> /// Read a RCOl Block /// </summary> /// <param name="id">expected ID</param> /// <param name="reader">the reader</param> internal IRcolBlock ReadBlock(uint id, System.IO.BinaryReader reader) { long pos = reader.BaseStream.Position; string s = reader.ReadString(); Type tp = (Type)Tokens[s]; if (tp == null) { throw new Exception("Unknown embedded RCOL Block Name at Offset=0x" + Helper.HexString((uint)pos), new Exception("RCOL Block Name: " + s)); } pos = reader.BaseStream.Position; uint myid = reader.ReadUInt32(); if (myid == 0xffffffff) { return(null); } if (id != myid) { throw new Exception("Unexpected embedded RCOL Block ID at Offset=0x" + Helper.HexString((uint)pos), new Exception("Read: 0x" + Helper.HexString(myid) + "; Expected: 0x" + Helper.HexString(id))); } IRcolBlock wrp = AbstractRcolBlock.Create(tp, this, myid); wrp.Unserialize(reader); return(wrp); }
private void tb_arc_ver_TextChanged(object sender, System.EventArgs e) { if (this.tb_arc_ver.Tag == null) { return; } try { AbstractRcolBlock arb = (AbstractRcolBlock)this.tAnimResourceConst.Tag; arb.Version = Convert.ToUInt32(tb_arc_ver.Text, 16); arb.Changed = true; } catch (Exception) { //Helper.ExceptionMessage("", ex); } }