Example #1
0
 private void menuOpenManifestXML_Click(object sender, EventArgs e)
 {
     OpenFileDialog dlg = new OpenFileDialog();
     dlg.Filter = "AndroidManifest|*.xml|所有文件|*.*";
     if (dlg.ShowDialog() == DialogResult.OK)
     {
         _fileName = dlg.FileName;
         AndroidPackageViewer viewer = new AndroidPackageViewer(unzip_path);
         string name = viewer.readAndroidManifestXML(_fileName);
         if (name == null)
         {
             MessageBox.Show("文件中没有包名。");
         }
         else
         {
             addRow(new DataGridCell("-", "-", name));
         }
     }
 }
Example #2
0
 //////////////////////////////////////////////////////////////////////////
 private void menuOpenApk_Click(object sender, EventArgs e)
 {
     OpenFileDialog dlg = new OpenFileDialog();
     dlg.Filter = "Android安装包|*.apk;*.zip|所有文件|*.*";
     if (dlg.ShowDialog() == DialogResult.OK)
     {
         _fileName = dlg.FileName;
         AndroidPackageViewer viewer = new AndroidPackageViewer(unzip_path);
         viewer.getPackageName(_fileName, (string name) =>
         {
             if (name == null)
             {
                 MessageBox.Show("文件中没有包名。");
             }
             else
             {
                 addRow(new DataGridCell("-", "-", name));
             }
         });
     }
 }