mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Added check for empty file path
This commit is contained in:
parent
a208e5202c
commit
efefad0c02
1 changed files with 22 additions and 7 deletions
|
|
@ -419,14 +419,29 @@ private async void StatusPanelMessage(string type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StatusPanelFileInfo()
|
protected internal void StatusPanelFileInfo()
|
||||||
{
|
{
|
||||||
DateTime creation = File.GetLastWriteTime(filePath);
|
if (statusPanel.Visible)
|
||||||
statusPanelModifiedLabel.Text = "Modified: " + creation.ToString("dd.MM.yyyy");
|
{
|
||||||
statusPanelModifiedLabel.ToolTipText = creation.ToString();
|
if (statusPanelModifiedLabel.Visible)
|
||||||
long length = new FileInfo(filePath).Length;
|
{
|
||||||
statusPanelSizeLabel.Text = "Size: " + SizeSuffix(length).ToString();
|
if (!string.IsNullOrEmpty(filePath))
|
||||||
StatusPanelTextInfo();
|
{
|
||||||
|
DateTime creation = File.GetLastWriteTime(filePath);
|
||||||
|
statusPanelModifiedLabel.Text = "Modified: " + creation.ToString("dd.MM.yyyy");
|
||||||
|
statusPanelModifiedLabel.ToolTipText = creation.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (statusPanelSizeLabel.Visible)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(filePath))
|
||||||
|
{
|
||||||
|
long length = new FileInfo(filePath).Length;
|
||||||
|
statusPanelSizeLabel.Text = "Size: " + SizeSuffix(length).ToString();
|
||||||
|
StatusPanelTextInfo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StatusPanelTextInfo()
|
private void StatusPanelTextInfo()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue