if (_errorDialog.ShowDialog(this,\r
"艦これに仕様変更があったか、受信内容が壊れています。",\r
_errorLog.GenerateErrorLog(url, request, response, e.ToString())) == DialogResult.Abort)\r
- Application.Exit();\r
+ Exit();\r
}\r
catch (LogIOException e)\r
{\r
// ReSharper disable once PossibleNullReferenceException\r
if (_errorDialog.ShowDialog(this, e.Message, e.InnerException.ToString()) == DialogResult.Abort)\r
- Application.Exit();\r
+ Exit();\r
}\r
catch (BattleResultError)\r
{\r
if (_errorDialog.ShowDialog(this, "戦闘結果の計算に誤りがあります。",\r
_errorLog.GenerateBattleErrorLog()) == DialogResult.Abort)\r
- Application.Exit();\r
+ Exit();\r
}\r
catch (Exception e)\r
{\r
if (_errorDialog.ShowDialog(this, "エラーが発生しました。",\r
_errorLog.GenerateErrorLog(url, request, response, e.ToString())) == DialogResult.Abort)\r
- Application.Exit();\r
+ Exit();\r
}\r
}\r
\r
+ private void Exit()\r
+ {\r
+ _proxyManager.Shutdown();\r
+ Environment.Exit(1);\r
+ }\r
+\r
private void WriteDebugLog(string url, string request, string response)\r
{\r
if (_debugLogFile != null)\r