Skip to content

Commit

Permalink
feat: open container folder in tray menu
Browse files Browse the repository at this point in the history
  • Loading branch information
deximy committed Mar 3, 2023
1 parent a094233 commit 9b90194
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion SteamServerFilter/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace SteamServerFilter
using System.Diagnostics;

namespace SteamServerFilter
{
class Program
{
Expand Down Expand Up @@ -45,6 +47,7 @@ static void InitTrayContextMenu()
InitStartupSettingItem(),
InitStrictModeItem(),
InitReloadRulesItem(),
InitOpenContainerFolderItem(),
InitExitItem(tray_icon)
}
);
Expand Down Expand Up @@ -107,6 +110,17 @@ static ToolStripMenuItem InitReloadRulesItem()
return reload_rules_item;
}

static ToolStripMenuItem InitOpenContainerFolderItem()
{
var open_container_folder = new ToolStripMenuItem() {
Text = "打开所在文件夹",
};
open_container_folder.Click += (sender, e) => {
Process.Start("explorer.exe", AppDomain.CurrentDomain.BaseDirectory);
};
return open_container_folder;
}

static ToolStripMenuItem InitExitItem(NotifyIcon tray_icon)
{
var exit_item = new ToolStripMenuItem() {
Expand Down

0 comments on commit 9b90194

Please sign in to comment.