mirror of
https://github.com/Baipyrus/ProxySwitcher.git
synced 2024-12-26 04:31:45 +00:00
bugfix: using executable instead of go runtime
This commit is contained in:
parent
5b7320e057
commit
48746e7c44
6
run.ps1
6
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 -WindowStyle Hidden -ArgumentList '-Command', 'go run . set'
|
Start-Process powershell.exe -WindowStyle Hidden -ArgumentList '-Command', '.\ProxySwitcher.exe set'
|
||||||
})
|
})
|
||||||
|
|
||||||
# Add "Disable Proxy Setting" menu item
|
# Add "Disable Proxy Setting" menu item
|
||||||
@ -39,14 +39,14 @@ $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 -WindowStyle Hidden -ArgumentList '-Command', 'go run . unset'
|
Start-Process powershell.exe -WindowStyle Hidden -ArgumentList '-Command', '.\ProxySwitcher.exe unset'
|
||||||
})
|
})
|
||||||
|
|
||||||
# Add "Save Proxy Setting" menu item
|
# Add "Save Proxy Setting" menu item
|
||||||
$ctxSave = New-Object System.Windows.Forms.ToolStripMenuItem
|
$ctxSave = New-Object System.Windows.Forms.ToolStripMenuItem
|
||||||
$ctxSave.Text = 'Save New Config'
|
$ctxSave.Text = 'Save New Config'
|
||||||
$ctxSave.Add_Click({
|
$ctxSave.Add_Click({
|
||||||
Start-Process powershell.exe -ArgumentList '-Command', 'go run . save'
|
Start-Process powershell.exe -ArgumentList '-Command', '.\ProxySwitcher.exe save'
|
||||||
})
|
})
|
||||||
|
|
||||||
# Add "Exit" menu item
|
# Add "Exit" menu item
|
||||||
|
Loading…
Reference in New Issue
Block a user