private void btnDecompile_Click(object sender, EventArgs e) { if (!File.Exists(tbApkPath.Text)) { MessageBox.Show("源文件不存在"); tbApkPath.Focus(); return; } if (rbPlatformAndroid.Checked) { if (!tbApkPath.Text.EndsWith(".apk")) { MessageBox.Show("源文件必须为apk文件"); tbApkPath.Focus(); return; } } else if (rbPlatformWinPhone.Checked) { if (!tbApkPath.Text.EndsWith(".xap")) { MessageBox.Show("源文件必须为xap文件"); tbApkPath.Focus(); return; } } cmd = new CommandProcess(config); cmd.OutputDataReceived += DataReceived; cmd.SourceFile = tbApkPath.Text; cmd.Package = config.PackageList[cbPackageName.SelectedIndex]; List <String> channelIds = new List <string>(); thread = new Thread(new ThreadStart(delegate() { if (rbPlatformAndroid.Checked) { cmd.runAndroidDecompile(); } else if (rbPlatformWinPhone.Checked) { cmd.runWinPhoneDecompile(); } this.Invoke((ThreadStart) delegate() { cbEnableVersionName.Checked = false; tbVersionName.Text = cmd.VersionName; tbVersionCode.Text = cmd.VersionCode.ToString(); MessageBox.Show(this, "反编译完成"); }); })); thread.IsBackground = true; thread.Start(); }