Skip to content

Commit e433e93

Browse files
committed
Replace VisualBasic reference with the QuickLibrary.FileMan
1 parent 2d73024 commit e433e93

16 files changed

+7
-34
lines changed
-3.5 KB
Binary file not shown.

β€Žquick-picture-viewer/Converter.csβ€Ž

Lines changed: 0 additions & 25 deletions
This file was deleted.

β€Žquick-picture-viewer/InfoForm.csβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ private void InfoForm_Load(object sender, EventArgs e)
124124
folderTextBox.Text = directoryName;
125125
fullPathTextBox.Text = path;
126126

127-
diskSizeTextBox.Text = Converter.PathToSize(path);
127+
diskSizeTextBox.Text = FileMan.GetFileSizeStr(path);
128128
extensionTextBox.Text = Path.GetExtension(path).Substring(1, Path.GetExtension(path).Length - 1).ToUpper();
129129

130130
createdTextBox.Text = File.GetCreationTime(path).ToShortDateString() + " - " + File.GetCreationTime(path).ToLongTimeString();

β€Žquick-picture-viewer/MainForm.csβ€Ž

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
ο»Ώusing Microsoft.VisualBasic.FileIO;
2-
using QuickLibrary;
1+
ο»Ώusing QuickLibrary;
32
using System;
43
using System.Collections.Generic;
54
using System.Diagnostics;
@@ -568,7 +567,7 @@ public void openImage(Bitmap bitmap, string directoryName, string fileName)
568567
private void UpdateSizeLabel()
569568
{
570569
sizeLabel.Text = " " + LangMan.Get("size") + ": " + originalImage.Width.ToString() + " x " + originalImage.Height.ToString();
571-
if (currentFolder != null) sizeLabel.Text += " (" + Converter.PathToSize(Path.Combine(currentFolder, currentFile)) + ")";
570+
if (currentFolder != null) sizeLabel.Text += " (" + FileMan.GetFileSizeStr(Path.Combine(currentFolder, currentFile)) + ")";
572571
}
573572

574573
private void CheckAutoZoomNeeded()
@@ -1321,15 +1320,15 @@ private void deleteButton_Click(object sender, EventArgs e)
13211320
if (d == DialogResult.Yes)
13221321
{
13231322
string path = Path.Combine(currentFolder, currentFile);
1324-
if (FileSystem.FileExists(path))
1323+
if (File.Exists(path))
13251324
{
13261325
originalImage.Dispose();
13271326
originalImage = null;
13281327
pictureBox.Image.Dispose();
13291328
pictureBox.Image = null;
13301329

13311330
if (NextFile() <= 1) closeFile();
1332-
FileSystem.DeleteFile(path, UIOption.OnlyErrorDialogs, RecycleOption.SendToRecycleBin, UICancelOption.DoNothing);
1331+
FileMan.MoveFileOrFolderToRecycleBin(path);
13331332
}
13341333
else
13351334
{
@@ -2336,7 +2335,7 @@ private void wallpaperBtn_Click(object sender, EventArgs e)
23362335
private void directoryLabel_Click(object sender, EventArgs e)
23372336
{
23382337
string path = Path.Combine(currentFolder, currentFile);
2339-
if (FileSystem.FileExists(path))
2338+
if (File.Exists(path))
23402339
{
23412340
string argument = "/select, \"" + path + "\"";
23422341
Process.Start("explorer.exe", argument);
1 KB
Binary file not shown.
2 KB
Binary file not shown.
-512 Bytes
Binary file not shown.
-4 KB
Binary file not shown.
Binary file not shown.

β€Žquick-picture-viewer/obj/Debug/build.forceβ€Ž

Whitespace-only changes.

0 commit comments

Comments
Β (0)