mirror of
https://github.com/AndnixSH/APKToolGUI.git
synced 2026-05-04 11:02:27 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ee0fa89598 | |||
| ab629c24f3 | |||
| a45b671961 | |||
| 7725d3c28c | |||
| 041a70daa4 | |||
| 6a00b05eb4 |
@@ -81,6 +81,9 @@
|
||||
<HintPath>..\packages\Costura.Fody.5.7.0\lib\netstandard1.0\Costura.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CustomMarshalers" />
|
||||
<Reference Include="DarkNet, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DarkNet.2.2.0\lib\net452\DarkNet.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DotNetZip, Version=1.16.0.0, Culture=neutral, PublicKeyToken=6583c7c814667745, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DotNetZip.1.16.0\lib\net40\DotNetZip.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -101,6 +104,9 @@
|
||||
<Reference Include="Ookii.Dialogs.WinForms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=66aa232afad40158, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Ookii.Dialogs.WinForms.4.0.0\lib\net462\Ookii.Dialogs.WinForms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="OSVersionExt, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\OSVersionExt.2.0.0\lib\net462\OSVersionExt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PortableSettingsProvider, Version=0.2.4.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\PortableSettingsProvider.0.2.4\lib\net45\PortableSettingsProvider.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -317,6 +323,7 @@
|
||||
<Compile Include="Handlers\SignControlEventHandlers.cs" />
|
||||
<Compile Include="Handlers\SmaliControlEventHandlers.cs" />
|
||||
<Compile Include="Handlers\ZipalignControlEventHandlers.cs" />
|
||||
<Compile Include="Controls\DarkTheme.cs" />
|
||||
<Compile Include="Utils\AdminUtils.cs" />
|
||||
<Compile Include="Utils\BitmapUtils.cs" />
|
||||
<Compile Include="Utils\CMD.cs" />
|
||||
@@ -455,16 +462,16 @@
|
||||
<Error Condition="!Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props'))" />
|
||||
<Error Condition="!Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\Fody.6.6.4\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.6.6.4\build\Fody.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\Resource.Embedder.2.2.0\build\Resource.Embedder.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Resource.Embedder.2.2.0\build\Resource.Embedder.props'))" />
|
||||
<Error Condition="!Exists('..\packages\Fody.6.7.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.6.7.0\build\Fody.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets" Condition="Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets')" />
|
||||
<Import Project="..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets')" />
|
||||
<Import Project="..\packages\Fody.6.6.4\build\Fody.targets" Condition="Exists('..\packages\Fody.6.6.4\build\Fody.targets')" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\packages\Fody.6.7.0\build\Fody.targets" Condition="Exists('..\packages\Fody.6.7.0\build\Fody.targets')" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
||||
@@ -0,0 +1,224 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace APKToolGUI.Controls
|
||||
{
|
||||
internal class DarkTheme
|
||||
{
|
||||
static Color bgColor = Color.FromArgb(32, 32, 32);
|
||||
static Color txtBoxColor = Color.FromArgb(64, 64, 64);
|
||||
static Color btnColor = Color.FromArgb(51, 51, 51);
|
||||
static Color btnBorderColor = Color.FromArgb(155, 155, 155);
|
||||
static Color tabBorderColor = Color.FromArgb(45, 45, 45);
|
||||
static Color menuItemHoverColor = Color.FromArgb(51, 51, 51);
|
||||
static Color menuItemSelectedColor = Color.FromArgb(41, 41, 41);
|
||||
|
||||
public static void SetTheme(Control.ControlCollection container, Form form)
|
||||
{
|
||||
form.BackColor = bgColor;
|
||||
form.ForeColor = Color.White;
|
||||
|
||||
foreach (Control component in container)
|
||||
{
|
||||
Debug.WriteLine(component.GetType());
|
||||
component.BackColor = bgColor;
|
||||
component.ForeColor = Color.White;
|
||||
|
||||
SetThemeTabControl(component);
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetThemeTabControl(Control component)
|
||||
{
|
||||
if (component is TabControl)
|
||||
{
|
||||
((TabControl)component).DrawMode = TabDrawMode.OwnerDrawFixed;
|
||||
|
||||
foreach (Control tabControl in component.Controls)
|
||||
{
|
||||
SetThemeTabControl(tabControl);
|
||||
|
||||
Debug.WriteLine("tabPage " + tabControl.GetType());
|
||||
|
||||
((TabControl)component).DrawItem += (sender, e) =>
|
||||
{
|
||||
// Set Border header
|
||||
e.Graphics.FillRectangle(new SolidBrush(tabBorderColor), e.Bounds);
|
||||
Rectangle paddedBounds = e.Bounds;
|
||||
|
||||
paddedBounds.Inflate(0, 0);
|
||||
|
||||
// Set the rectangle for the tab button
|
||||
Rectangle tabRect = ((TabControl)component).GetTabRect(e.Index);
|
||||
|
||||
// Draw the border color
|
||||
using (Pen borderPen = new Pen(tabBorderColor, 7))
|
||||
{
|
||||
e.Graphics.DrawRectangle(borderPen, tabRect);
|
||||
}
|
||||
|
||||
StringFormat stringFlags = new StringFormat();
|
||||
stringFlags.Alignment = StringAlignment.Center;
|
||||
stringFlags.LineAlignment = StringAlignment.Center;
|
||||
|
||||
e.Graphics.DrawString(((TabControl)component).TabPages[e.Index].Text, FormMain.Instance.Font, SystemBrushes.HighlightText, tabRect, stringFlags);
|
||||
|
||||
//set Tabcontrol border
|
||||
Graphics g = e.Graphics;
|
||||
Pen p = new Pen(tabBorderColor, 8);
|
||||
g.DrawRectangle(p, tabControl.Bounds.X, tabControl.Bounds.Y, tabControl.Bounds.Width, tabControl.Bounds.Height);
|
||||
|
||||
SolidBrush fillbrush = new SolidBrush(bgColor);
|
||||
|
||||
//draw rectangle behind the tabs
|
||||
Rectangle lasttabrect = ((TabControl)component).GetTabRect(((TabControl)component).TabPages.Count - 1);
|
||||
Rectangle background = new Rectangle();
|
||||
background.Location = new Point(lasttabrect.Right, 0);
|
||||
|
||||
//pad the rectangle to cover the 1 pixel line between the top of the tabpage and the start of the tabs
|
||||
background.Size = new Size(((TabControl)component).Right - background.Left, lasttabrect.Height + 1);
|
||||
e.Graphics.FillRectangle(fillbrush, background);
|
||||
};
|
||||
|
||||
foreach (Control tabPage in tabControl.Controls)
|
||||
{
|
||||
SetThemeTabControl(tabPage);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (component is Panel)
|
||||
{
|
||||
foreach (Control control in component.Controls)
|
||||
{
|
||||
SetThemeTabControl(control);
|
||||
}
|
||||
component.BackColor = bgColor;
|
||||
component.ForeColor = Color.White;
|
||||
}
|
||||
if (component is MenuStrip menuStrip)
|
||||
{
|
||||
((MenuStrip)component).Renderer = new ToolStripProfessionalRenderer(new MenuItemColorTable());
|
||||
|
||||
foreach (ToolStripItem item in menuStrip.Items)
|
||||
{
|
||||
if (item is ToolStripMenuItem toolStripMenuItem)
|
||||
{
|
||||
foreach (ToolStripMenuItem dditem in toolStripMenuItem.DropDownItems)
|
||||
{
|
||||
dditem.BackColor = bgColor;
|
||||
dditem.ForeColor = Color.White;
|
||||
Debug.WriteLine(dditem.Text);
|
||||
}
|
||||
|
||||
toolStripMenuItem.BackColor = bgColor;
|
||||
toolStripMenuItem.ForeColor = Color.White;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (component is GroupBox)
|
||||
{
|
||||
foreach (Control control in component.Controls)
|
||||
{
|
||||
SetThemeTabControl(control);
|
||||
}
|
||||
component.BackColor = bgColor;
|
||||
component.ForeColor = Color.White;
|
||||
}
|
||||
else if (component is ComboBox)
|
||||
{
|
||||
component.BackColor = bgColor;
|
||||
component.ForeColor = Color.White;
|
||||
((ComboBox)component).FlatStyle = FlatStyle.Flat;
|
||||
}
|
||||
else if (component is Button)
|
||||
{
|
||||
component.BackColor = btnColor;
|
||||
component.ForeColor = Color.White;
|
||||
((Button)component).FlatStyle = FlatStyle.Flat;
|
||||
((Button)component).FlatAppearance.BorderColor = btnBorderColor;
|
||||
|
||||
}
|
||||
else if (component is TextBox)
|
||||
{
|
||||
foreach (Control panel in component.Controls)
|
||||
{
|
||||
SetThemeTabControl(panel);
|
||||
}
|
||||
component.BackColor = txtBoxColor;
|
||||
component.ForeColor = Color.White;
|
||||
((TextBox)component).BorderStyle = BorderStyle.FixedSingle;
|
||||
}
|
||||
else if (component is RichTextBox)
|
||||
{
|
||||
((RichTextBox)component).BorderStyle = BorderStyle.None;
|
||||
component.BackColor = bgColor;
|
||||
component.ForeColor = Color.White;
|
||||
}
|
||||
else
|
||||
{
|
||||
component.BackColor = bgColor;
|
||||
component.ForeColor = Color.White;
|
||||
}
|
||||
}
|
||||
|
||||
public class MenuItemColorTable : ProfessionalColorTable
|
||||
{
|
||||
public override Color ImageMarginGradientBegin
|
||||
{
|
||||
get { return bgColor; }
|
||||
}
|
||||
|
||||
public override Color ImageMarginGradientEnd
|
||||
{
|
||||
get { return bgColor; }
|
||||
}
|
||||
|
||||
public override Color ToolStripDropDownBackground
|
||||
{
|
||||
get { return bgColor; }
|
||||
}
|
||||
|
||||
public override Color MenuItemSelected
|
||||
{
|
||||
get { return menuItemHoverColor; }
|
||||
}
|
||||
|
||||
public override Color MenuBorder
|
||||
{
|
||||
get { return menuItemHoverColor; }
|
||||
}
|
||||
|
||||
public override Color MenuItemBorder
|
||||
{
|
||||
get { return menuItemHoverColor; }
|
||||
}
|
||||
|
||||
public override Color MenuItemSelectedGradientBegin
|
||||
{
|
||||
get { return menuItemSelectedColor; }
|
||||
}
|
||||
|
||||
public override Color MenuItemSelectedGradientEnd
|
||||
{
|
||||
get { return menuItemSelectedColor; }
|
||||
}
|
||||
public override Color MenuItemPressedGradientBegin
|
||||
{
|
||||
get { return menuItemSelectedColor; }
|
||||
}
|
||||
|
||||
public override Color MenuItemPressedGradientEnd
|
||||
{
|
||||
get { return menuItemSelectedColor; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
@@ -90,6 +90,7 @@
|
||||
// linkLabel1
|
||||
//
|
||||
resources.ApplyResources(this.linkLabel1, "linkLabel1");
|
||||
this.linkLabel1.LinkColor = System.Drawing.Color.DodgerBlue;
|
||||
this.linkLabel1.Name = "linkLabel1";
|
||||
this.linkLabel1.TabStop = true;
|
||||
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using APKToolGUI.Controls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
@@ -13,6 +14,10 @@ namespace APKToolGUI
|
||||
public FormAboutBox()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
if (Program.IsDarkTheme())
|
||||
DarkTheme.SetTheme(Controls, this);
|
||||
|
||||
this.Text = String.Format("{0} {1}", this.Text, AssemblyTitle);
|
||||
this.labelProductName.Text = AssemblyProduct;
|
||||
this.labelVersion.Text = String.Format("{0} {1}", labelVersion.Text, AssemblyVersion);
|
||||
|
||||
Generated
+11
-10
@@ -235,7 +235,7 @@
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.toolStripStatusLabelStateImage = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStripStatusLabelStateText = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStripProgressBar1 = new System.Windows.Forms.ToolStripProgressBar();
|
||||
this.progressBar = new System.Windows.Forms.ToolStripProgressBar();
|
||||
this.contextMenuStripLog = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.clearLogToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -302,6 +302,7 @@
|
||||
this.tabControlMain.Controls.Add(this.tabPageAdb);
|
||||
this.tabControlMain.Name = "tabControlMain";
|
||||
this.tabControlMain.SelectedIndex = 0;
|
||||
this.tabControlMain.SelectedIndexChanged += new System.EventHandler(this.tabControlMain_SelectedIndexChanged);
|
||||
//
|
||||
// tabPageMain
|
||||
//
|
||||
@@ -1863,7 +1864,7 @@
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripStatusLabelStateImage,
|
||||
this.toolStripStatusLabelStateText,
|
||||
this.toolStripProgressBar1});
|
||||
this.progressBar});
|
||||
resources.ApplyResources(this.statusStrip1, "statusStrip1");
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.SizingGrip = false;
|
||||
@@ -1883,14 +1884,14 @@
|
||||
this.toolStripStatusLabelStateText.Spring = true;
|
||||
this.toolStripStatusLabelStateText.Click += new System.EventHandler(this.toolStripStatusLabelStateText_Click);
|
||||
//
|
||||
// toolStripProgressBar1
|
||||
// progressBar
|
||||
//
|
||||
this.toolStripProgressBar1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
|
||||
resources.ApplyResources(this.toolStripProgressBar1, "toolStripProgressBar1");
|
||||
this.toolStripProgressBar1.MarqueeAnimationSpeed = 30;
|
||||
this.toolStripProgressBar1.Name = "toolStripProgressBar1";
|
||||
this.toolStripProgressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
|
||||
this.toolStripProgressBar1.Click += new System.EventHandler(this.toolStripProgressBar1_Click);
|
||||
this.progressBar.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
|
||||
resources.ApplyResources(this.progressBar, "progressBar");
|
||||
this.progressBar.MarqueeAnimationSpeed = 30;
|
||||
this.progressBar.Name = "progressBar";
|
||||
this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
|
||||
this.progressBar.Click += new System.EventHandler(this.toolStripProgressBar1_Click);
|
||||
//
|
||||
// contextMenuStripLog
|
||||
//
|
||||
@@ -2077,7 +2078,7 @@
|
||||
internal System.Windows.Forms.TabPage tabPageZipAlign;
|
||||
internal System.Windows.Forms.StatusStrip statusStrip1;
|
||||
internal System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelStateText;
|
||||
internal System.Windows.Forms.ToolStripProgressBar toolStripProgressBar1;
|
||||
internal System.Windows.Forms.ToolStripProgressBar progressBar;
|
||||
internal System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelStateImage;
|
||||
internal System.Windows.Forms.ContextMenuStrip contextMenuStripLog;
|
||||
internal System.Windows.Forms.ToolStripMenuItem clearLogToolStripMenuItem;
|
||||
|
||||
@@ -19,6 +19,9 @@ using Ionic.Zip;
|
||||
using System.Linq;
|
||||
using System.Windows.Interop;
|
||||
using System.Security.Cryptography;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
using APKToolGUI.Controls;
|
||||
using Dark.Net;
|
||||
|
||||
namespace APKToolGUI
|
||||
{
|
||||
@@ -52,6 +55,9 @@ namespace APKToolGUI
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
if (Program.IsDarkTheme())
|
||||
DarkTheme.SetTheme(Controls, this);
|
||||
|
||||
Text += " - v" + ProductVersion;
|
||||
Application.ApplicationExit += new EventHandler(Application_ApplicationExit);
|
||||
|
||||
@@ -152,13 +158,8 @@ namespace APKToolGUI
|
||||
if (updateInterval.Days > 0 && Settings.Default.CheckForUpdateAtStartup)
|
||||
updateCheker.CheckAsync(true);
|
||||
});
|
||||
|
||||
ToStatus(Language.Done, Resources.done);
|
||||
|
||||
string decApkPath = Settings.Default.Decode_InputAppPath;
|
||||
|
||||
await GetApkInfo(decApkPath);
|
||||
|
||||
RunCmdArgs();
|
||||
|
||||
await ListDevices();
|
||||
@@ -217,11 +218,11 @@ namespace APKToolGUI
|
||||
if (await Smali(file) == 0)
|
||||
Close();
|
||||
break;
|
||||
case "apkinfo":
|
||||
await GetApkInfo(file);
|
||||
case "viewinfo":
|
||||
tabControlMain.SelectedIndex = 1;
|
||||
await GetApkInfo(file);
|
||||
break;
|
||||
default: //Fix when running app as Release from Visual studio
|
||||
default:
|
||||
IgnoreOutputDirContextMenu = false;
|
||||
break;
|
||||
}
|
||||
@@ -388,7 +389,7 @@ namespace APKToolGUI
|
||||
{
|
||||
BeginInvoke(new MethodInvoker(delegate
|
||||
{
|
||||
toolStripStatusLabelStateText.Text = message;
|
||||
toolStripStatusLabelStateText.Text = message.Replace("\n", "").Replace("\r", "");
|
||||
toolStripStatusLabelStateImage.Image = statusImage;
|
||||
}));
|
||||
}
|
||||
@@ -416,30 +417,45 @@ namespace APKToolGUI
|
||||
if (String.IsNullOrWhiteSpace(message) || message.Contains("_JAVA_OPTIONS"))
|
||||
return;
|
||||
|
||||
Color color = Color.Black;
|
||||
|
||||
switch (eventType)
|
||||
{
|
||||
case ApktoolEventType.None:
|
||||
ToLog(DateTime.Now.ToString("[HH:mm:ss]"), message, Color.Black);
|
||||
if (Program.IsDarkTheme())
|
||||
color = Color.White;
|
||||
break;
|
||||
case ApktoolEventType.Success:
|
||||
ToLog(DateTime.Now.ToString("[HH:mm:ss]"), message, Color.DarkGreen);
|
||||
if (Program.IsDarkTheme())
|
||||
color = Color.LightGreen;
|
||||
else
|
||||
color = Color.DarkGreen;
|
||||
break;
|
||||
case ApktoolEventType.Infomation:
|
||||
ToLog(DateTime.Now.ToString("[HH:mm:ss]"), message, Color.Blue);
|
||||
if (Program.IsDarkTheme())
|
||||
color = Color.LightBlue;
|
||||
else
|
||||
color = Color.Blue;
|
||||
break;
|
||||
case ApktoolEventType.Error:
|
||||
ToLog(DateTime.Now.ToString("[HH:mm:ss]"), message, Color.Red);
|
||||
if (Program.IsDarkTheme())
|
||||
color = Color.LightPink;
|
||||
else
|
||||
color = Color.Red;
|
||||
break;
|
||||
case ApktoolEventType.Warning:
|
||||
ToLog(DateTime.Now.ToString("[HH:mm:ss]"), message, Color.DarkOrange);
|
||||
if (Program.IsDarkTheme())
|
||||
color = Color.DarkOrange;
|
||||
else
|
||||
color = Color.Orange;
|
||||
break;
|
||||
case ApktoolEventType.Unknown:
|
||||
ToLog(DateTime.Now.ToString("[HH:mm:ss]"), message, Color.Red);
|
||||
break;
|
||||
default:
|
||||
ToLog(DateTime.Now.ToString("[dd.MM.yyyy HH:mm:ss]"), message, Color.Blue);
|
||||
if (Program.IsDarkTheme())
|
||||
color = Color.White;
|
||||
break;
|
||||
}
|
||||
|
||||
ToLog(DateTime.Now.ToString("[dd.MM.yyyy HH:mm:ss]"), message, color);
|
||||
}
|
||||
|
||||
internal void Running(string msg)
|
||||
@@ -447,7 +463,8 @@ namespace APKToolGUI
|
||||
Invoke(new Action(delegate ()
|
||||
{
|
||||
TaskbarManager.Instance.SetProgressState(TaskbarProgressBarState.Indeterminate, Handle);
|
||||
toolStripProgressBar1.Style = ProgressBarStyle.Marquee;
|
||||
progressBar.Style = ProgressBarStyle.Marquee;
|
||||
progressBar.Visible = true;
|
||||
ActionButtonsEnabled = false;
|
||||
ClearLog();
|
||||
}));
|
||||
@@ -479,16 +496,21 @@ namespace APKToolGUI
|
||||
|
||||
TaskbarManager.Instance.SetProgressValue(1, 1);
|
||||
if (statusStrip1.InvokeRequired)
|
||||
statusStrip1.BeginInvoke(new Action(delegate { toolStripProgressBar1.Style = ProgressBarStyle.Continuous; }));
|
||||
statusStrip1.BeginInvoke(new Action(delegate { progressBar.Style = ProgressBarStyle.Continuous; }));
|
||||
else
|
||||
toolStripProgressBar1.Style = ProgressBarStyle.Continuous;
|
||||
progressBar.Style = ProgressBarStyle.Continuous;
|
||||
|
||||
Invoke(new Action(delegate ()
|
||||
{
|
||||
progressBar.Visible = false;
|
||||
}));
|
||||
|
||||
ActionButtonsEnabled = true;
|
||||
|
||||
ToStatus(Language.Done, Resources.done);
|
||||
}
|
||||
|
||||
internal void Error(string msg)
|
||||
internal void Error(string msg, string status = null)
|
||||
{
|
||||
isRunning = false;
|
||||
|
||||
@@ -505,13 +527,21 @@ namespace APKToolGUI
|
||||
|
||||
TaskbarManager.Instance.SetProgressValue(1, 1);
|
||||
if (statusStrip1.InvokeRequired)
|
||||
statusStrip1.BeginInvoke(new Action(delegate { toolStripProgressBar1.Style = ProgressBarStyle.Continuous; }));
|
||||
statusStrip1.BeginInvoke(new Action(delegate { progressBar.Style = ProgressBarStyle.Continuous; }));
|
||||
else
|
||||
toolStripProgressBar1.Style = ProgressBarStyle.Continuous;
|
||||
progressBar.Style = ProgressBarStyle.Continuous;
|
||||
|
||||
Invoke(new Action(delegate ()
|
||||
{
|
||||
progressBar.Visible = false;
|
||||
}));
|
||||
|
||||
ActionButtonsEnabled = true;
|
||||
|
||||
ToStatus(msg, Resources.error);
|
||||
if (status == null)
|
||||
ToStatus(msg, Resources.error);
|
||||
else
|
||||
ToStatus(status, Resources.error);
|
||||
}
|
||||
|
||||
internal void ClearLog()
|
||||
@@ -638,7 +668,7 @@ namespace APKToolGUI
|
||||
|
||||
void ApkEditorOutputDataRecieved(object sender, ApkEditorDataReceivedEventArgs e)
|
||||
{
|
||||
ToLog(ApktoolEventType.None, e.Message);
|
||||
ToLog(ApktoolEventType.None, e.Message);
|
||||
}
|
||||
|
||||
internal async Task<int> MergeUsingApkEditor(string inputSplitApk)
|
||||
@@ -877,7 +907,7 @@ namespace APKToolGUI
|
||||
catch (Exception ex)
|
||||
{
|
||||
code = 1;
|
||||
Error(ex.ToString());
|
||||
Error(ex.ToString(), Language.ErrorDecompiling);
|
||||
}
|
||||
|
||||
return code;
|
||||
@@ -1001,18 +1031,21 @@ namespace APKToolGUI
|
||||
}
|
||||
|
||||
string device = selAdbDeviceLbl.Text;
|
||||
if (!String.IsNullOrEmpty(device) && Settings.Default.Sign_InstallApkAfterSign)
|
||||
if (Settings.Default.Sign_InstallApkAfterSign)
|
||||
{
|
||||
ToStatus(Language.InstallingApk, Resources.waiting);
|
||||
ToLog(ApktoolEventType.Infomation, "=====[ " + Language.InstallingApk + " ]=====");
|
||||
if (!String.IsNullOrEmpty(device))
|
||||
{
|
||||
ToStatus(Language.InstallingApk, Resources.waiting);
|
||||
ToLog(ApktoolEventType.Infomation, "=====[ " + Language.InstallingApk + " ]=====");
|
||||
|
||||
if (adb.Install(device, outputFile) == 0)
|
||||
ToLog(ApktoolEventType.None, Language.InstallApkSuccessful);
|
||||
if (adb.Install(device, outputFile) == 0)
|
||||
ToLog(ApktoolEventType.None, Language.InstallApkSuccessful);
|
||||
else
|
||||
ToLog(ApktoolEventType.Error, Language.InstallApkFailed);
|
||||
}
|
||||
else
|
||||
ToLog(ApktoolEventType.Error, Language.InstallApkFailed); ;
|
||||
ToLog(ApktoolEventType.Error, String.Format(Language.DeviceNotSelected, outputFile));
|
||||
}
|
||||
else
|
||||
ToLog(ApktoolEventType.Error, String.Format(Language.DeviceNotSelected, outputFile));
|
||||
}
|
||||
else
|
||||
ToLog(ApktoolEventType.Error, Language.ErrorSigning);
|
||||
@@ -1420,11 +1453,15 @@ namespace APKToolGUI
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Main menu event handlers
|
||||
|
||||
#endregion
|
||||
|
||||
#region Form handlers
|
||||
private async void tabControlMain_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (tabControlMain.SelectedIndex == 1 && String.IsNullOrEmpty(appTxtBox.Text) && Environment.GetCommandLineArgs().Length == 1)
|
||||
{
|
||||
await GetApkInfo(Settings.Default.Decode_InputAppPath);
|
||||
}
|
||||
}
|
||||
|
||||
private void FormMain_Activated(object sender, EventArgs e)
|
||||
{
|
||||
if (!isRunning)
|
||||
@@ -1563,6 +1600,5 @@ namespace APKToolGUI
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -166,7 +166,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="decOutOpenDirBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>8, 196</value>
|
||||
<value>7, 197</value>
|
||||
</data>
|
||||
<data name="decOutOpenDirBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>175, 24</value>
|
||||
@@ -298,7 +298,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="compileOutputOpenDirBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>6, 225</value>
|
||||
<value>7, 225</value>
|
||||
</data>
|
||||
<data name="compileOutputOpenDirBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>175, 23</value>
|
||||
@@ -325,7 +325,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="button_OpenMainActivity.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>406, 258</value>
|
||||
<value>406, 253</value>
|
||||
</data>
|
||||
<data name="button_OpenMainActivity.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>175, 23</value>
|
||||
@@ -352,7 +352,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="openApktoolYmlBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>206, 258</value>
|
||||
<value>206, 253</value>
|
||||
</data>
|
||||
<data name="openApktoolYmlBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>175, 23</value>
|
||||
@@ -379,7 +379,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="openAndroidMainfestBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>7, 258</value>
|
||||
<value>7, 253</value>
|
||||
</data>
|
||||
<data name="openAndroidMainfestBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>175, 23</value>
|
||||
@@ -4571,7 +4571,7 @@ and change target SDK to 29</value>
|
||||
<value>4, 4</value>
|
||||
</data>
|
||||
<data name="groupBox_ZIPALIGN_Options.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>579, 275</value>
|
||||
<value>579, 271</value>
|
||||
</data>
|
||||
<data name="groupBox_ZIPALIGN_Options.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>16</value>
|
||||
@@ -6070,7 +6070,7 @@ and change target SDK to 29</value>
|
||||
<value>None</value>
|
||||
</data>
|
||||
<data name="toolStripStatusLabelStateText.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>479, 17</value>
|
||||
<value>581, 17</value>
|
||||
</data>
|
||||
<data name="toolStripStatusLabelStateText.Text" xml:space="preserve">
|
||||
<value>Loading...</value>
|
||||
@@ -6078,12 +6078,15 @@ and change target SDK to 29</value>
|
||||
<data name="toolStripStatusLabelStateText.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>MiddleLeft</value>
|
||||
</data>
|
||||
<data name="toolStripProgressBar1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<data name="progressBar.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="toolStripProgressBar1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<data name="progressBar.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>100, 16</value>
|
||||
</data>
|
||||
<data name="progressBar.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="statusStrip1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 543</value>
|
||||
</data>
|
||||
@@ -7957,10 +7960,10 @@ and change target SDK to 29</value>
|
||||
<data name=">>toolStripStatusLabelStateText.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripProgressBar1.Name" xml:space="preserve">
|
||||
<value>toolStripProgressBar1</value>
|
||||
<data name=">>progressBar.Name" xml:space="preserve">
|
||||
<value>progressBar</value>
|
||||
</data>
|
||||
<data name=">>toolStripProgressBar1.Type" xml:space="preserve">
|
||||
<data name=">>progressBar.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripProgressBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>copyToolStripMenuItem.Name" xml:space="preserve">
|
||||
|
||||
+21
@@ -55,6 +55,8 @@
|
||||
this.buttonRemoveContextMenu = new System.Windows.Forms.Button();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.buttonОК = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.themeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
@@ -81,6 +83,8 @@
|
||||
// groupBox1
|
||||
//
|
||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||
this.groupBox1.Controls.Add(this.themeComboBox);
|
||||
this.groupBox1.Controls.Add(this.label1);
|
||||
this.groupBox1.Controls.Add(this.customApkToolTxtBox);
|
||||
this.groupBox1.Controls.Add(this.customApktoolBtn);
|
||||
this.groupBox1.Controls.Add(this.useCustomApktoolChk);
|
||||
@@ -272,6 +276,21 @@
|
||||
this.buttonОК.UseVisualStyleBackColor = true;
|
||||
this.buttonОК.Click += new System.EventHandler(this.buttonОК_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// themeComboBox
|
||||
//
|
||||
this.themeComboBox.FormattingEnabled = true;
|
||||
this.themeComboBox.Items.AddRange(new object[] {
|
||||
resources.GetString("themeComboBox.Items"),
|
||||
resources.GetString("themeComboBox.Items1"),
|
||||
resources.GetString("themeComboBox.Items2")});
|
||||
resources.ApplyResources(this.themeComboBox, "themeComboBox");
|
||||
this.themeComboBox.Name = "themeComboBox";
|
||||
//
|
||||
// FormSettings
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
@@ -323,5 +342,7 @@
|
||||
private System.Windows.Forms.TextBox customApkToolTxtBox;
|
||||
private System.Windows.Forms.Button customApktoolBtn;
|
||||
private System.Windows.Forms.CheckBox useCustomApktoolChk;
|
||||
private System.Windows.Forms.ComboBox themeComboBox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,8 @@ using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Shapes;
|
||||
using static APKToolGUI.UpdateChecker;
|
||||
using APKToolGUI.Properties;
|
||||
using APKToolGUI.Controls;
|
||||
|
||||
namespace APKToolGUI
|
||||
{
|
||||
@@ -18,11 +20,15 @@ namespace APKToolGUI
|
||||
string currentLanguage;
|
||||
bool currentUseApktoolChk;
|
||||
string currentApktoolPath;
|
||||
int currentTheme;
|
||||
|
||||
public FormSettings()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
if (Program.IsDarkTheme())
|
||||
DarkTheme.SetTheme(Controls, this);
|
||||
|
||||
currentUseApktoolChk = useCustomApktoolChk.Checked;
|
||||
currentApktoolPath = customApkToolTxtBox.Text;
|
||||
|
||||
@@ -31,6 +37,10 @@ namespace APKToolGUI
|
||||
SetButtonShield(buttonAddContextMenu, true);
|
||||
SetButtonShield(buttonRemoveContextMenu, true);
|
||||
}
|
||||
|
||||
int themeInt = (themeComboBox.Items.Count + 1 > Settings.Default.Theme) ? Settings.Default.Theme : 0;
|
||||
themeComboBox.SelectedIndex = themeInt;
|
||||
currentTheme = themeInt;
|
||||
}
|
||||
|
||||
#region GUI
|
||||
@@ -115,13 +125,15 @@ namespace APKToolGUI
|
||||
private void SaveSettings()
|
||||
{
|
||||
if (Language.SystemLanguage.Equals(comboBox1.SelectedItem.ToString()))
|
||||
Properties.Settings.Default.Culture = "Auto";
|
||||
Settings.Default.Culture = "Auto";
|
||||
else
|
||||
Properties.Settings.Default.Culture = StringExt.Regex(@"(?<=\[)(.*?)(?=\])", comboBox1.SelectedItem.ToString());
|
||||
Properties.Settings.Default.Save();
|
||||
Settings.Default.Culture = StringExt.Regex(@"(?<=\[)(.*?)(?=\])", comboBox1.SelectedItem.ToString());
|
||||
|
||||
if (!comboBox1.SelectedItem.ToString().Contains(currentLanguage))
|
||||
if (MessageBox.Show(Language.SetLanguageRestartApplication, Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
Settings.Default.Theme = themeComboBox.SelectedIndex;
|
||||
Settings.Default.Save();
|
||||
|
||||
if (!comboBox1.SelectedItem.ToString().Contains(currentLanguage) || themeComboBox.SelectedIndex != currentTheme)
|
||||
if (MessageBox.Show(Language.RestartApplicationPrompt, Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
Application.Restart();
|
||||
|
||||
if (currentUseApktoolChk != useCustomApktoolChk.Checked || currentApktoolPath != customApkToolTxtBox.Text)
|
||||
@@ -172,7 +184,6 @@ namespace APKToolGUI
|
||||
DirectoryUtils.Delete(Program.TEMP_PATH);
|
||||
|
||||
//Create new temp folder
|
||||
|
||||
Program.TEMP_PATH = Program.TempDirectory();
|
||||
Directory.CreateDirectory(Program.TEMP_PATH);
|
||||
}
|
||||
|
||||
@@ -124,17 +124,74 @@
|
||||
<data name="groupBox1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Left, Right</value>
|
||||
</data>
|
||||
<data name="themeComboBox.Items" xml:space="preserve">
|
||||
<value>Auto</value>
|
||||
</data>
|
||||
<data name="themeComboBox.Items1" xml:space="preserve">
|
||||
<value>Light</value>
|
||||
</data>
|
||||
<data name="themeComboBox.Items2" xml:space="preserve">
|
||||
<value>Dark</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="themeComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>128, 213</value>
|
||||
</data>
|
||||
<data name="themeComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>121, 21</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="themeComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name=">>themeComboBox.Name" xml:space="preserve">
|
||||
<value>themeComboBox</value>
|
||||
</data>
|
||||
<data name=">>themeComboBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>themeComboBox.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>themeComboBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>6, 216</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>41, 13</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Theme</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="customApkToolTxtBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Left, Right</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="customApkToolTxtBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>203, 180</value>
|
||||
</data>
|
||||
<data name="customApkToolTxtBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>215, 22</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="customApkToolTxtBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
</data>
|
||||
@@ -151,7 +208,7 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>customApkToolTxtBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="customApktoolBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -184,7 +241,7 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>customApktoolBtn.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="useCustomApktoolChk.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -214,7 +271,7 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>useCustomApktoolChk.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -244,7 +301,7 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>label6.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="checkBox5.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -274,7 +331,7 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>checkBox5.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="checkBox4.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -304,7 +361,7 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>checkBox4.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="customTempLocationTxtBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Left, Right</value>
|
||||
@@ -331,7 +388,7 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>customTempLocationTxtBox.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="textBoxCustomJavaLocation.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Left, Right</value>
|
||||
@@ -358,7 +415,7 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>textBoxCustomJavaLocation.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="buttonCustomTempLocation.AccessibleName" xml:space="preserve">
|
||||
<value>buttonCustomTempLocation</value>
|
||||
@@ -394,7 +451,7 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>buttonCustomTempLocation.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="checkBox3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -424,7 +481,7 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>checkBox3.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="buttonCustomJavaLocation.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -457,7 +514,7 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>buttonCustomJavaLocation.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="checkBox2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -487,7 +544,7 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>checkBox2.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="checkBox1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -517,7 +574,7 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>checkBox1.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="checkBoxCheckUpdateStartup.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -547,13 +604,13 @@
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>checkBoxCheckUpdateStartup.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>8, 6</value>
|
||||
</data>
|
||||
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>454, 217</value>
|
||||
<value>454, 251</value>
|
||||
</data>
|
||||
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>12</value>
|
||||
@@ -604,7 +661,7 @@
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="groupBoxLanguage.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>8, 229</value>
|
||||
<value>8, 263</value>
|
||||
</data>
|
||||
<data name="groupBoxLanguage.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>454, 47</value>
|
||||
@@ -766,7 +823,7 @@
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="groupBoxContextMenu.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>8, 282</value>
|
||||
<value>8, 316</value>
|
||||
</data>
|
||||
<data name="groupBoxContextMenu.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>454, 74</value>
|
||||
@@ -796,7 +853,7 @@
|
||||
<value>3, 3, 3, 3</value>
|
||||
</data>
|
||||
<data name="tabPage1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>466, 360</value>
|
||||
<value>466, 396</value>
|
||||
</data>
|
||||
<data name="tabPage1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@@ -823,7 +880,7 @@
|
||||
<value>0, 1</value>
|
||||
</data>
|
||||
<data name="tabControl1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>474, 386</value>
|
||||
<value>474, 422</value>
|
||||
</data>
|
||||
<data name="tabControl1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
@@ -850,7 +907,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="buttonCancel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>392, 393</value>
|
||||
<value>392, 429</value>
|
||||
</data>
|
||||
<data name="buttonCancel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
@@ -883,7 +940,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="buttonОК.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>311, 393</value>
|
||||
<value>311, 429</value>
|
||||
</data>
|
||||
<data name="buttonОК.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
@@ -913,7 +970,7 @@
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>473, 421</value>
|
||||
<value>473, 457</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterParent</value>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using APKToolGUI.Languages;
|
||||
using APKToolGUI.Properties;
|
||||
using Dark.Net;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
@@ -44,7 +46,15 @@ namespace APKToolGUI.Handlers
|
||||
|
||||
private void menuItemSettings_Click(object sender, EventArgs e)
|
||||
{
|
||||
Theme theme = (Theme)Settings.Default.Theme;
|
||||
|
||||
if (Program.IsWin10OrAbove())
|
||||
DarkNet.Instance.SetCurrentProcessTheme(theme);
|
||||
|
||||
FormSettings frm = new FormSettings();
|
||||
|
||||
if (Program.IsWin10OrAbove())
|
||||
DarkNet.Instance.SetWindowThemeForms(frm, theme);
|
||||
frm.ShowDialog();
|
||||
}
|
||||
|
||||
@@ -66,7 +76,14 @@ namespace APKToolGUI.Handlers
|
||||
|
||||
private void menuItemAbout_Click(object sender, EventArgs e)
|
||||
{
|
||||
Theme theme = (Theme)Settings.Default.Theme;
|
||||
|
||||
if (Program.IsWin10OrAbove())
|
||||
DarkNet.Instance.SetCurrentProcessTheme(theme);
|
||||
|
||||
FormAboutBox frm = new FormAboutBox();
|
||||
if (Program.IsWin10OrAbove())
|
||||
DarkNet.Instance.SetWindowThemeForms(frm, theme);
|
||||
frm.ShowDialog();
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -781,7 +781,7 @@ namespace APKToolGUI.Languages {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Get APK Info.
|
||||
/// Looks up a localized string similar to View APK Info.
|
||||
/// </summary>
|
||||
internal static string GetApkInfo {
|
||||
get {
|
||||
@@ -1033,11 +1033,11 @@ namespace APKToolGUI.Languages {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The language is set. Do you want to restart the application?.
|
||||
/// Looks up a localized string similar to Restart is required to apply changes. Do you want to restart the application?.
|
||||
/// </summary>
|
||||
internal static string SetLanguageRestartApplication {
|
||||
internal static string RestartApplicationPrompt {
|
||||
get {
|
||||
return ResourceManager.GetString("SetLanguageRestartApplication", resourceCulture);
|
||||
return ResourceManager.GetString("RestartApplicationPrompt", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -373,7 +373,7 @@
|
||||
<value>Disassemble DEX</value>
|
||||
</data>
|
||||
<data name="GetApkInfo" xml:space="preserve">
|
||||
<value>Get APK Info</value>
|
||||
<value>View APK Info</value>
|
||||
</data>
|
||||
<data name="NotDecompiledApk" xml:space="preserve">
|
||||
<value>This folder is not a decompiled APK</value>
|
||||
@@ -429,8 +429,8 @@
|
||||
<data name="ParsingApkInfo" xml:space="preserve">
|
||||
<value>Parsing APK Info...</value>
|
||||
</data>
|
||||
<data name="SetLanguageRestartApplication" xml:space="preserve">
|
||||
<value>The language is set. Do you want to restart the application?</value>
|
||||
<data name="RestartApplicationPrompt" xml:space="preserve">
|
||||
<value>Restart is required to apply changes. Do you want to restart the application?</value>
|
||||
</data>
|
||||
<data name="DecompilingAllApkFiles" xml:space="preserve">
|
||||
<value>Decompiling all APK files</value>
|
||||
|
||||
+38
-6
@@ -2,6 +2,8 @@
|
||||
using APKToolGUI.Properties;
|
||||
using APKToolGUI.Utils;
|
||||
using Bluegrams.Application;
|
||||
using Dark.Net;
|
||||
using OSVersionExtension;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
@@ -28,14 +30,14 @@ namespace APKToolGUI
|
||||
{
|
||||
try
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
|
||||
if (Environment.OSVersion.Version.Major == 6)
|
||||
{
|
||||
SetProcessDPIAware();
|
||||
}
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
|
||||
if (arg.Length == 1)
|
||||
{
|
||||
switch (arg[0])
|
||||
@@ -71,7 +73,16 @@ namespace APKToolGUI
|
||||
TEMP_PATH = TempDirectory();
|
||||
Directory.CreateDirectory(TEMP_PATH);
|
||||
|
||||
Application.Run(new FormMain());
|
||||
Theme theme = (Theme)Settings.Default.Theme;
|
||||
if (IsWin10OrAbove())
|
||||
DarkNet.Instance.SetCurrentProcessTheme(theme);
|
||||
|
||||
Form mainForm = new FormMain();
|
||||
|
||||
if (IsWin10OrAbove())
|
||||
DarkNet.Instance.SetWindowThemeForms(mainForm, theme);
|
||||
|
||||
Application.Run(mainForm);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,6 +93,29 @@ namespace APKToolGUI
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsWin10OrAbove()
|
||||
{
|
||||
// Check if the operating system is Windows 10 or above
|
||||
if (OSVersion.GetOSVersion().Version.Major >= 10 && OSVersion.GetOSVersion().Version.Minor >= 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static bool IsDarkTheme()
|
||||
{
|
||||
if (IsWin10OrAbove())
|
||||
return DarkNet.Instance.EffectiveCurrentProcessThemeIsDark;
|
||||
else if (Settings.Default.Theme == 2)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void SetLanguage()
|
||||
{
|
||||
String settingsCulture = Settings.Default.Culture;
|
||||
@@ -137,7 +171,6 @@ namespace APKToolGUI
|
||||
AAPT2_PATH,
|
||||
SIGNAPK_KEYPRIVATE,
|
||||
SIGNAPK_KEYPUBLIC,
|
||||
AAPT2JNI_PATH,
|
||||
APKEDITOR_PATH,
|
||||
ADB_PATH,
|
||||
ADBWINAPI_PATH,
|
||||
@@ -208,7 +241,6 @@ namespace APKToolGUI
|
||||
public static string ZIPALIGN_PATH { get { return Path.Combine(RES_PATH, "zipalign.exe"); } }
|
||||
public static string AAPT_PATH { get { return Path.Combine(RES_PATH, "aapt.exe"); } }
|
||||
public static string AAPT2_PATH { get { return Path.Combine(RES_PATH, "aapt2.exe"); } }
|
||||
public static string AAPT2JNI_PATH { get { return Path.Combine(RES_PATH, "libaapt2_jni.dll"); } }
|
||||
public static string APKEDITOR_PATH { get { return Path.Combine(RES_PATH, "apkeditor.jar"); } }
|
||||
public static string ADB_PATH { get { return Path.Combine(RES_PATH, "adb.exe"); } }
|
||||
public static string ADBWINAPI_PATH { get { return Path.Combine(RES_PATH, "AdbWinApi.dll"); } }
|
||||
|
||||
+12
@@ -1179,5 +1179,17 @@ namespace APKToolGUI.Properties {
|
||||
this["ApktoolPath"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
||||
public int Theme {
|
||||
get {
|
||||
return ((int)(this["Theme"]));
|
||||
}
|
||||
set {
|
||||
this["Theme"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,5 +257,8 @@
|
||||
<Setting Name="ApktoolPath" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="Theme" Type="System.Int32" Scope="User">
|
||||
<Value Profile="(Default)">0</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -28,19 +28,19 @@
|
||||
and Windows will automatically select the most compatible environment. -->
|
||||
|
||||
<!-- Windows Vista -->
|
||||
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
|
||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
|
||||
|
||||
<!-- Windows 7 -->
|
||||
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
|
||||
|
||||
<!-- Windows 8 -->
|
||||
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
|
||||
|
||||
<!-- Windows 8.1 -->
|
||||
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
|
||||
|
||||
<!-- Windows 10 -->
|
||||
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||
|
||||
</application>
|
||||
</compatibility>
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace APKToolGUI
|
||||
apkToolGUIFolderShell.SetValue("SubCommands", "APKToolGUI.Build;APKToolGUI.Smali");
|
||||
apkToolGUIFolderShell.Close();
|
||||
|
||||
CreateFileAssociationsSubKey(executablePath, ".apk", "APKToolGUI.Decompile;APKToolGUI.Sign;APKToolGUI.Zipalign");
|
||||
CreateFileAssociationsSubKey(executablePath, ".apk", "APKToolGUI.Apkinfo;APKToolGUI.Decompile;APKToolGUI.Sign;APKToolGUI.Zipalign");
|
||||
CreateFileAssociationsSubKey(executablePath, ".xapk", "APKToolGUI.Decompile");
|
||||
CreateFileAssociationsSubKey(executablePath, ".apks", "APKToolGUI.Decompile");
|
||||
CreateFileAssociationsSubKey(executablePath, ".zip", "APKToolGUI.Decompile");
|
||||
@@ -85,7 +85,7 @@ namespace APKToolGUI
|
||||
RegistryKey apkinfo = shell.CreateSubKey("APKToolGUI.Apkinfo", RegistryKeyPermissionCheck.ReadWriteSubTree);
|
||||
apkinfo.SetValue("", Language.GetApkInfo, RegistryValueKind.String);
|
||||
apkinfo.SetValue("Icon", executablePath, RegistryValueKind.String);
|
||||
apkinfo.CreateSubKey("command").SetValue("", "\"" + executablePath + "\" \"apkinfo\" \"%1\"", RegistryValueKind.String);
|
||||
apkinfo.CreateSubKey("command").SetValue("", "\"" + executablePath + "\" \"viewinfo\" \"%1\"", RegistryValueKind.String);
|
||||
apkinfo.Close();
|
||||
|
||||
shell.Close();
|
||||
|
||||
@@ -262,6 +262,9 @@
|
||||
<setting name="ApktoolPath" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="Theme" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
</APKToolGUI.Properties.Settings>
|
||||
</userSettings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /></startup>
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Costura.Fody" version="5.7.0" targetFramework="net48" developmentDependency="true" />
|
||||
<package id="DarkNet" version="2.2.0" targetFramework="net48" />
|
||||
<package id="DotNetZip" version="1.16.0" targetFramework="net48" />
|
||||
<package id="Fody" version="6.6.4" targetFramework="net48" developmentDependency="true" />
|
||||
<package id="Microsoft.NETCore.Platforms" version="7.0.1" targetFramework="net48" />
|
||||
<package id="Fody" version="6.7.0" targetFramework="net48" developmentDependency="true" />
|
||||
<package id="Microsoft.NETCore.Platforms" version="7.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net48" />
|
||||
<package id="Microsoft-WindowsAPICodePack-Core" version="1.1.4" targetFramework="net48" />
|
||||
<package id="Microsoft-WindowsAPICodePack-Shell" version="1.1.4" targetFramework="net48" />
|
||||
<package id="NETStandard.Library" version="2.0.3" targetFramework="net48" />
|
||||
<package id="Ookii.Dialogs.WinForms" version="4.0.0" targetFramework="net48" />
|
||||
<package id="OSVersionExt" version="2.0.0" targetFramework="net48" />
|
||||
<package id="PortableSettingsProvider" version="0.2.4" targetFramework="net48" />
|
||||
<package id="Resource.Embedder" version="2.2.0" targetFramework="net48" />
|
||||
<package id="ResourceLoader" version="3.2.4" targetFramework="net48" />
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -4,6 +4,8 @@
|
||||
- Updated Hungarian language
|
||||
- Updated dependencies
|
||||
- Make log output read only
|
||||
- Updated resources: aapt.exe, aapt2.exe, apksigner.jar, zipalign.exe, adb.exe
|
||||
- Removed libaapt2_jni.dll
|
||||
|
||||
3.2.0.0
|
||||
- Added split APK merging (Build-in and APKEditor.jar) for decompilation. APKEditor.jar is set to default
|
||||
|
||||
Reference in New Issue
Block a user