diff --git a/ICON_Disabled.ico b/ICON_Disabled.ico new file mode 100644 index 0000000..ef49ffd Binary files /dev/null and b/ICON_Disabled.ico differ diff --git a/ICON_Disabled.png b/ICON_Disabled.png new file mode 100644 index 0000000..cdffa0d Binary files /dev/null and b/ICON_Disabled.png differ diff --git a/ICON_Enabled.ico b/ICON_Enabled.ico new file mode 100644 index 0000000..e63d553 Binary files /dev/null and b/ICON_Enabled.ico differ diff --git a/ICON_Enabled.png b/ICON_Enabled.png new file mode 100644 index 0000000..8505d54 Binary files /dev/null and b/ICON_Enabled.png differ diff --git a/run.ps1 b/run.ps1 index 9091af1..5b22cc2 100644 --- a/run.ps1 +++ b/run.ps1 @@ -5,7 +5,7 @@ Add-Type -AssemblyName System.Drawing # Create a new NotifyIcon $trayIcon = New-Object System.Windows.Forms.NotifyIcon # Use a default application icon -$trayIcon.Icon = [System.Drawing.SystemIcons]::Application +$trayIcon.Icon = './ICON_Disabled.ico' $trayIcon.Text = 'ProxySwitcher' $trayIcon.Visible = $true @@ -23,6 +23,7 @@ $ctxProperties.Add_Click({ $ctxEnable = New-Object System.Windows.Forms.ToolStripMenuItem $ctxEnable.Text = 'Enable Proxy' $ctxEnable.Add_Click({ + $trayIcon.Icon = './ICON_Enabled.ico' Start-Process powershell.exe -ArgumentList '-Command', 'go run . set' }) @@ -30,6 +31,7 @@ $ctxEnable.Add_Click({ $ctxDisable = New-Object System.Windows.Forms.ToolStripMenuItem $ctxDisable.Text = 'Disable Proxy' $ctxDisable.Add_Click({ + $trayIcon.Icon = './ICON_Disabled.ico' Start-Process powershell.exe -ArgumentList '-Command', 'go run . unset' })