예제 #1
0
 public void ClearApi()
 {
     LoadedApiInfos.Clear();
     ApiSet.Clear();
     ApiSet.Add(new JavaApi());
     OnApiSetUpdated();
 }
예제 #2
0
 public static SharedSet ApiToShared(ApiSet apiSet)
 {
     return(new SharedSet
     {
         Id = apiSet.Id,
         Code = apiSet.Code,
         Name = apiSet.Name,
         SetType = apiSet.Set_Type,
         ReleasedAt = apiSet.Released_At,
         BlockCode = apiSet.Block_Code,
         Block = apiSet.Block,
         CardCount = apiSet.Card_Count
     });
 }
예제 #3
0
        public void LoadApiFromFiles(string [] files)
        {
            if (Api.Packages.Any())
            {
                ApiSet.Add(new JavaApi());
            }

            foreach (var file in files)
            {
                var identifer = GetFileId(file);
                switch (Path.GetExtension(file.ToLowerInvariant()))
                {
                case ".apk":
                    LoadApk(file, identifer);
                    break;

                case ".dex":
                    LoadDex(file, identifer);
                    break;

                case ".aar":
                    LoadAar(file, identifer);
                    break;

                case ".jar":
                    LoadJar(file, identifer);
                    break;

                case ".dll":
                    LoadDll(file, identifer);
                    break;

                default:                 // load as XML
                    LoadXml(file, identifer);
                    break;
                }
            }
            OnApiSetUpdated();
        }