Code Cleanup

This commit is contained in:
ema
2025-05-25 01:32:38 +08:00
parent 05a2a819b7
commit 2e8fd2bae7
22 changed files with 68 additions and 145 deletions

View File

@@ -29,27 +29,16 @@ namespace QuickLook.Plugin.PEViewer;
public partial class PEInfoPanel : UserControl
{
private bool _stop;
public PEInfoPanel()
{
InitializeComponent();
// apply global theme
Resources.MergedDictionaries[0].Clear();
string translationFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Translations.config");
totalSizeTitle.Text = TranslationHelper.Get("TOTAL_SIZE", translationFile);
fileVersionTitle.Text = TranslationHelper.Get("FILE_VERSION", translationFile);
productVersionTitle.Text = TranslationHelper.Get("PRODUCT_VERSION", translationFile);
}
public bool Stop
{
set => _stop = value;
get => _stop;
}
public void DisplayInfo(string path)
{
_ = Task.Run(() =>
@@ -71,8 +60,6 @@ public partial class PEInfoPanel : UserControl
var name = Path.GetFileName(path);
filename.Text = string.IsNullOrEmpty(name) ? path : name;
Stop = false;
_ = Task.Run(() =>
{
if (File.Exists(path))