mirror of
https://github.com/Baipyrus/ProxySwitcher.git
synced 2024-12-26 12:41:45 +00:00
hide powershell on toggle commands
This commit is contained in:
parent
9b4fb7af4d
commit
333b3d62fe
4
run.ps1
4
run.ps1
@ -31,7 +31,7 @@ $ctxEnable = New-Object System.Windows.Forms.ToolStripMenuItem
|
|||||||
$ctxEnable.Text = 'Enable Proxy'
|
$ctxEnable.Text = 'Enable Proxy'
|
||||||
$ctxEnable.Add_Click({
|
$ctxEnable.Add_Click({
|
||||||
$trayIcon.Icon = './assets/ICON_Enabled.ico'
|
$trayIcon.Icon = './assets/ICON_Enabled.ico'
|
||||||
Start-Process powershell.exe -ArgumentList '-Command', 'go run . set'
|
Start-Process powershell.exe -WindowStyle Hidden -ArgumentList '-Command', 'go run . set'
|
||||||
})
|
})
|
||||||
|
|
||||||
# Add "Disable Proxy Setting" menu item
|
# Add "Disable Proxy Setting" menu item
|
||||||
@ -39,7 +39,7 @@ $ctxDisable = New-Object System.Windows.Forms.ToolStripMenuItem
|
|||||||
$ctxDisable.Text = 'Disable Proxy'
|
$ctxDisable.Text = 'Disable Proxy'
|
||||||
$ctxDisable.Add_Click({
|
$ctxDisable.Add_Click({
|
||||||
$trayIcon.Icon = './assets/ICON_Disabled.ico'
|
$trayIcon.Icon = './assets/ICON_Disabled.ico'
|
||||||
Start-Process powershell.exe -ArgumentList '-Command', 'go run . unset'
|
Start-Process powershell.exe -WindowStyle Hidden -ArgumentList '-Command', 'go run . unset'
|
||||||
})
|
})
|
||||||
|
|
||||||
# Add "Save Proxy Setting" menu item
|
# Add "Save Proxy Setting" menu item
|
||||||
|
Loading…
Reference in New Issue
Block a user