public override string GetInfo(SWFTag Tag) { StringBuilder res = new StringBuilder(); MemoryStream ms; BinaryReader br; switch (Tag.Type) { case SWFTagType.ShowFrame: break; case SWFTagType.DefineText: ms = new MemoryStream(Tag.Content); br = new BinaryReader(ms); res.AppendFormat("ID:{0}\n", br.ReadInt16()); res.Append(GetHexString(Tag.Content, 2, Tag.Content.Length)); break; case SWFTagType.FrameLabel: res.Append(Encoding.UTF8.GetString(Tag.Content)); break; case SWFTagType.ExportAssets: ms = new MemoryStream(Tag.Content); br = new BinaryReader(ms); res.AppendFormat("数量:{0}\n", br.ReadInt16()); res.AppendFormat("第一个资源的ID:{0}\n", br.ReadInt16()); res.AppendFormat("名字:{0}", new String(br.ReadChars(Tag.Content.Length - 4))); break; case SWFTagType.DefineSprite: ms = new MemoryStream(Tag.Content); br = new BinaryReader(ms); res.AppendFormat("ID:{0}\n", br.ReadInt16()); res.AppendFormat("帧数:{0}\n", br.ReadInt16()); res.Append(GetHexString(Tag.Content, 4, Tag.Content.Length)); break; case SWFTagType.DoABC: //TODO res.Append(GetHexString(Tag.Content, 0, Tag.Content.Length)); break; default: res.Append(GetHexString(Tag.Content, 0, Tag.Content.Length)); break; } return(res.ToString()); }
public override string GetInfo(SWFTag Tag) { StringBuilder res = new StringBuilder(); MemoryStream ms; BinaryReader br; switch (Tag.Type) { case SWFTagType.ShowFrame: break; case SWFTagType.DefineText: ms = new MemoryStream(Tag.Content); br = new BinaryReader(ms); res.AppendFormat("ID:{0}\n", br.ReadInt16()); res.Append(GetHexString(Tag.Content, 2, Tag.Content.Length)); break; case SWFTagType.FrameLabel: res.Append(Encoding.UTF8.GetString(Tag.Content)); break; case SWFTagType.ExportAssets: ms = new MemoryStream(Tag.Content); br = new BinaryReader(ms); res.AppendFormat("数量:{0}\n", br.ReadInt16()); res.AppendFormat("第一个资源的ID:{0}\n", br.ReadInt16()); res.AppendFormat("名字:{0}", new String(br.ReadChars(Tag.Content.Length - 4))); break; case SWFTagType.DefineSprite: ms = new MemoryStream(Tag.Content); br = new BinaryReader(ms); res.AppendFormat("ID:{0}\n", br.ReadInt16()); res.AppendFormat("帧数:{0}\n", br.ReadInt16()); res.Append(GetHexString(Tag.Content, 4, Tag.Content.Length)); break; case SWFTagType.DoABC: //TODO res.Append(GetHexString(Tag.Content, 0, Tag.Content.Length)); break; default: res.Append(GetHexString(Tag.Content, 0, Tag.Content.Length)); break; } return res.ToString(); }
public static string GetString(SWFTag Tag) { return(Current.GetString(Tag)); }
public static string GetInfo(SWFTag Tag) { return(Current.GetInfo(Tag)); }
public override string GetString(SWFTag Tag) { return(string.Format("[{0}]({1}){2}", Tag.Content.Length, Tag.Id, GetString(Tag.Type))); }
public abstract string GetString(SWFTag Tag);
public abstract string GetInfo(SWFTag Tag);
public override string GetString(SWFTag Tag) { return string.Format("[{0}]({1}){2}", Tag.Content.Length, Tag.Id, GetString(Tag.Type)); }
public static string GetString(SWFTag Tag) { return Current.GetString(Tag); }
public static string GetInfo(SWFTag Tag) { return Current.GetInfo(Tag); }