Skip to content

Commit

Permalink
feat(BatchRenamer): add icon
Browse files Browse the repository at this point in the history
  • Loading branch information
truemogician committed Oct 16, 2021
1 parent b4625b1 commit 1a0831c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions FilePropertyManager/BatchRenamer/ContextMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protected override ContextMenuStrip CreateMenu()
new ToolStripMenuItem(
"批量重命名",
null,
(_, _) => new MainWindow(SelectedItemPaths).Show()
(_, _) => new MainWindow(SelectedItemPaths).ShowDialog()
)
}
};
Expand All @@ -34,7 +34,7 @@ protected override ContextMenuStrip CreateMenu()
new ToolStripMenuItem(
"批量重命名",
null,
(_, _) => new MainWindow(Directory.GetFileSystemEntries(FolderPath)).Show()
(_, _) => new MainWindow(Directory.GetFileSystemEntries(FolderPath)).ShowDialog()
)
}
};
Expand Down
Binary file added FilePropertyManager/BatchRenamer/MainWindow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions FilePropertyManager/BatchRenamer/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Windows;
Expand All @@ -10,6 +11,7 @@
using System.Windows.Input;
using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using TrueMogician.Extensions.Enumerable;

#nullable enable
Expand Down Expand Up @@ -47,6 +49,7 @@ public MainWindow(IEnumerable<string> entities) {
)
.ToList();
InitializeComponent();
Icon = new BitmapImage(new Uri(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, "MainWindow.png")));
EntitiesBox.Document = new FlowDocument(EntitiesParagraph);
ResultsBox.Document = new FlowDocument(ResultsParagraph);
}
Expand Down

0 comments on commit 1a0831c

Please sign in to comment.