示例#1
0
        private void FormBuild_Shown(object sender, EventArgs e)
        {
            this.Update();

            textBoxOutputApkPath.Text = String.Format("{0}\\{1}_{2}.apk", System.IO.Path.GetDirectoryName(projectDir), projectDir.Replace(System.IO.Path.GetDirectoryName(projectDir) + "\\", String.Empty), DateTime.Now.ToString("yyyyMMdd_HH-mm-ss"), System.IO.Path.GetExtension(projectDir));

            Version javaVersion = apktool.GetJavaVersion();

            if (javaVersion != null)
            {
                ToLog(ApktoolEventType.Information, String.Format("Java version \"{0} Update {1}\"", javaVersion.Minor, javaVersion.Revision));
                string apktoolVersion = apktool.GetVersion();
                if (!String.IsNullOrWhiteSpace(apktoolVersion))
                {
                    ToLog(ApktoolEventType.Information, String.Format("Apktool version \"{0}\"", apktoolVersion));
                }
                else
                {
                    ToLog(ApktoolEventType.Error, "Can't detect apktool version.");
                }
            }
            else
            {
                MessageBox.Show(Language.ErrorJavaDetect, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#2
0
        private void FormDecompile_Shown(object sender, EventArgs e)
        {
            this.Update();

            textBoxOutputProjectDir.Text = System.IO.Path.GetDirectoryName(apkPath) + "\\" + System.IO.Path.GetFileNameWithoutExtension(apkPath);

            Version javaVersion = apktool.GetJavaVersion();

            if (javaVersion != null)
            {
                ToLog(ApktoolEventType.Information, String.Format("Java version \"{0} Update {1}\"", javaVersion.Minor, javaVersion.Revision));
                string apktoolVersion = apktool.GetVersion();
                if (!String.IsNullOrWhiteSpace(apktoolVersion))
                {
                    ToLog(ApktoolEventType.Information, String.Format("Apktool version \"{0}\"", apktoolVersion));
                }
                else
                {
                    ToLog(ApktoolEventType.Error, "Can't detect apktool version.");
                }
            }
            else
            {
                MessageBox.Show(Language.ErrorJavaDetect, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }