mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-06-07 22:59:14 +08:00
Move stop proxy code
This commit is contained in:
parent
2a51fcb47d
commit
4bcd23389d
@ -168,19 +168,6 @@ namespace GrasscutterTools.Pages
|
|||||||
Settings.Default.RemoteUid = NUDRemotePlayerId.Value;
|
Settings.Default.RemoteUid = NUDRemotePlayerId.Value;
|
||||||
Settings.Default.Host = TxtHost.Text;
|
Settings.Default.Host = TxtHost.Text;
|
||||||
Settings.Default.TokenCache = Common.OC?.Token;
|
Settings.Default.TokenCache = Common.OC?.Token;
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Logger.I(TAG, "Stop Proxy");
|
|
||||||
ProxyHelper.StopProxy();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
#if DEBUG
|
|
||||||
MessageBox.Show(ex.ToString(), Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
||||||
#endif
|
|
||||||
Logger.E(TAG, "Stop Proxy Failed.", ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -46,6 +46,22 @@ namespace GrasscutterTools.Pages
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnClosed()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Logger.I(TAG, "Stop Proxy");
|
||||||
|
ProxyHelper.StopProxy();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
#if DEBUG
|
||||||
|
MessageBox.Show(ex.ToString(), Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
#endif
|
||||||
|
Logger.E(TAG, "Stop Proxy Failed.", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 点击启动GC服务器时触发
|
/// 点击启动GC服务器时触发
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user