Support .apk and .apk.1
Some checks are pending
MSBuild / build (push) Waiting to run
MSBuild / publish (push) Blocked by required conditions

This commit is contained in:
ema
2025-05-31 17:30:35 +08:00
parent 53d76cb0f8
commit 00829ec21b
15 changed files with 1602 additions and 43 deletions

View File

@@ -17,6 +17,7 @@
using QuickLook.Common.ExtensionMethods;
using QuickLook.Common.Helpers;
using QuickLook.Common.Plugin;
using QuickLook.Plugin.AppViewer.WgtPackageParser;
using System.Globalization;
using System.IO;
@@ -28,14 +29,18 @@ namespace QuickLook.Plugin.AppViewer;
public partial class WgtInfoPanel : UserControl, IAppInfoPanel
{
public WgtInfoPanel()
private ContextObject _context;
public WgtInfoPanel(ContextObject context)
{
_context = context;
DataContext = this;
InitializeComponent();
string translationFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Translations.config");
applicationNameTitle.Text = TranslationHelper.Get("APP_NAME", translationFile);
versionTitle.Text = TranslationHelper.Get("APP_VERSION", translationFile);
versionNameTitle.Text = TranslationHelper.Get("APP_VERSION_NAME", translationFile);
versionCodeTitle.Text = TranslationHelper.Get("APP_VERSION_CODE", translationFile);
totalSizeTitle.Text = TranslationHelper.Get("TOTAL_SIZE", translationFile);
modDateTitle.Text = TranslationHelper.Get("LAST_MODIFIED", translationFile);
@@ -58,11 +63,13 @@ public partial class WgtInfoPanel : UserControl, IAppInfoPanel
Dispatcher.Invoke(() =>
{
applicationName.Text = wgtInfo.AppNameLocale ?? wgtInfo.AppName;
version.Text = wgtInfo.AppVersion;
versionName.Text = wgtInfo.AppVersionName;
versionCode.Text = wgtInfo.AppVersionCode;
totalSize.Text = size.ToPrettySize(2);
modDate.Text = last.ToString(CultureInfo.CurrentCulture);
permissions.ItemsSource = wgtInfo.Permissions;
_context.IsBusy = false;
});
}
});