示例#1
0
        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());
        }
示例#2
0
 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();
 }
示例#3
0
 public static string GetString(SWFTag Tag)
 {
     return(Current.GetString(Tag));
 }
示例#4
0
 public static string GetInfo(SWFTag Tag)
 {
     return(Current.GetInfo(Tag));
 }
示例#5
0
 public override string GetString(SWFTag Tag)
 {
     return(string.Format("[{0}]({1}){2}", Tag.Content.Length, Tag.Id, GetString(Tag.Type)));
 }
示例#6
0
 public abstract string GetString(SWFTag Tag);
示例#7
0
 public abstract string GetInfo(SWFTag Tag);
示例#8
0
 public abstract string GetString(SWFTag Tag);
示例#9
0
 public abstract string GetInfo(SWFTag Tag);
示例#10
0
 public override string GetString(SWFTag Tag)
 {
     return string.Format("[{0}]({1}){2}", Tag.Content.Length, Tag.Id, GetString(Tag.Type));
 }
示例#11
0
 public static string GetString(SWFTag Tag)
 {
     return Current.GetString(Tag);
 }
示例#12
0
 public static string GetInfo(SWFTag Tag)
 {
     return Current.GetInfo(Tag);
 }