private void buttonStart_Click(object sender, EventArgs e) { DecompileOptions options = new DecompileOptions(apkPath); options.NoResource = checkBoxNoRes.Checked; options.NoSource = checkBoxNoSrc.Checked; options.Force = checkBoxForce.Checked; options.KeepBrokenResource = checkBoxKeepBrokenResource.Checked; options.MatchOriginal = checkBoxMatchOriginal.Checked; if (checkBoxFrameworkPath.Checked) { if (System.IO.Directory.Exists(textBoxFrameworkPath.Text)) { options.FrameworkPath = textBoxFrameworkPath.Text; } else { MessageBox.Show("Указанной директорию расположения фреймворков не существует.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } } options.OutputDirectory = textBoxOutputProjectDir.Text; bool started = false; #if !DEBUG try { #endif started = apktool.Decompile(options); #if !DEBUG } catch (Exception ex) { MessageBox.Show(ex.ToString(), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error); } #endif if (started) { progressBarStyle = ProgressBarStyle.Marquee; StartButtonEnabled = false; } }
private bool Decompiling() { //string projectDir = Path.GetDirectoryName(textBox_DECODE_InputAppPath.Text) + "\\" + System.IO.Path.GetFileNameWithoutExtension(textBox_DECODE_InputAppPath.Text); DecompileOptions options = new DecompileOptions(textBox_DECODE_InputAppPath.Text); options.NoSource = checkBox_DECODE_NoSrc.Checked; options.NoResource = checkBox_DECODE_NoRes.Checked; options.Force = checkBox_DECODE_Force.Checked; options.KeepBrokenResource = checkBox_DECODE_KeepBrokenRes.Checked; options.MatchOriginal = checkBox_DECODE_MatchOriginal.Checked; if (checkBox_DECODE_UseFramework.Checked) { options.FrameworkPath = textBox_DECODE_FrameDir.Text; } if (checkBox_DECODE_OutputDirectory.Checked) { options.OutputDirectory = textBox_DECODE_OutputDirectory.Text; } return(apktool.Decompile(options)); }