Exemplo n.º 1
0
 private void beforeLoadManifest()
 {
     comboBox1.SelectedIndex = -1;
     weixinapp        = null;
     currentBackup    = null;
     label2.Text      = "未选择";
     label2.ForeColor = Color.Black;
     button2.Enabled  = false;
 }
Exemplo n.º 2
0
 private void addApp(iPhoneApp app)
 {
     if (app.Key == "com.tencent.xin")
     {
         weixinapp        = app;
         label2.Text      = "正确";
         label2.ForeColor = Color.Green;
         button2.Enabled  = true;
     }
 }
Exemplo n.º 3
0
        public void BuildFilesDictionary(iPhoneApp app)
        {
            var dict = new Dictionary <string, iPhoneFile>();

            foreach (var f in app.Files)
            {
                var x  = files92[int.Parse(f)];
                var ff = new iPhoneFile()
                {
                    Key              = x.key,
                    Domain           = x.Domain,
                    Path             = x.Path,
                    ModificationTime = x.aTime,
                    FileLength       = x.FileLength
                };
                dict.Add(x.Path, ff);
            }
            this.fileDict = dict;
        }
Exemplo n.º 4
0
        private void parseAll92(IDictionary mbdb)
        {
            var sd = mbdb["Applications"] as Dictionary <object, object>;

            if (sd == null)
            {
                return;
            }
            var filesByDomain = new Dictionary <string, appFiles>();

            for (int i = 0; i < files92.Count; ++i)
            {
                if ((files92[i].Mode & 0xF000) == 0x8000)
                {
                    string d = files92[i].Domain;
                    if (!filesByDomain.ContainsKey(d))
                    {
                        filesByDomain.Add(d, new appFiles());
                    }

                    filesByDomain[d].add(i, files92[i].FileLength);
                }
            }
            foreach (var p in sd)
            {
                iPhoneApp app = new iPhoneApp();
                app.Key = p.Key as string;
                var zz = p.Value as IDictionary;
                app.Identifier = zz["CFBundleIdentifier"] as string;
                app.Container  = zz["Path"] as string;
                if (filesByDomain.ContainsKey("AppDomain-" + app.Key))
                {
                    app.Files = new List <String>();
                    foreach (int i in filesByDomain["AppDomain-" + app.Key].indexes)
                    {
                        app.Files.Add(i.ToString());
                    }
                    app.FilesLength = filesByDomain["AppDomain-" + app.Key].FilesLength;
                    filesByDomain.Remove("AppDomain-" + app.Key);
                }
                addApp(app);
            }
        }
Exemplo n.º 5
0
 private void ShowApplicationsNull()
 {
     this.statusMain.Text = "Loading Application List";
     if (localApps == null)
     {
         String installedAppPath = "//private/var/root/Library/Installer/LocalPackages.plist";
         if (myPhone.Exists(installedAppPath))
         {
             using (Stream inStream = iPhoneFile.OpenRead(myPhone, installedAppPath)) {
                 localApps = AppList.ReadXmlStream(inStream);
             }
         }
         CreateAppListGroups(localApps);
         listApps.Items.Clear();
         for (Int32 i = 0; i < localApps.Applications.Length; i++)
         {
             iPhoneApp    app  = localApps.Applications[i];
             ListViewItem item = new ListViewItem();
             item.Name        = app.Name;
             item.Text        = app.Name;
             item.ToolTipText = app.Name + Environment.NewLine + app.Description;
             ListViewItem.ListViewSubItem version = new ListViewItem.ListViewSubItem();
             version.Name = "Version";
             version.Text = app.Version;
             item.SubItems.Add(version);
             ListViewItem.ListViewSubItem desc = new ListViewItem.ListViewSubItem();
             desc.Name = "Description";
             desc.Text = app.Description;
             item.SubItems.Add(desc);
             ListViewItem.ListViewSubItem pub = new ListViewItem.ListViewSubItem();
             pub.Name = "Publisher";
             pub.Text = app.Source;
             item.SubItems.Add(pub);
             item.Group = listApps.Groups[app.Category];
             listApps.Items.Add(item);
         }
     }
     listApps.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
     listApps.Visible  = true;
     listFiles.Visible = false;
     SetStatus();
 }