Add FileName & FilePath as public properties

This commit is contained in:
Jack251970 2025-08-17 14:18:18 +08:00
parent 9d3a0f0b70
commit 21299d153f

View file

@ -21,7 +21,8 @@ public partial class PreviewPanel : UserControl
{
private static readonly string ClassName = nameof(PreviewPanel);
private string FilePath { get; }
public string FilePath { get; }
public string FileName { get; }
public string FileSize { get; private set; } = Main.Context.API.GetTranslation("plugin_explorer_plugin_tooltip_more_info_unknown");
public string CreatedAt { get; } = "";
public string LastModifiedAt { get; } = "";
@ -57,11 +58,11 @@ public partial class PreviewPanel : UserControl
public PreviewPanel(Settings settings, string filePath, ResultType type)
{
InitializeComponent();
Settings = settings;
FilePath = filePath;
FileName = Path.GetFileName(filePath);
InitializeComponent();
if (Settings.ShowFileSizeInPreviewPanel)
{