-// Copyright (C) 2013, 2014 Kazuhiro Fujieda <fujieda@users.sourceforge.jp>\r
+// Copyright (C) 2013, 2014 Kazuhiro Fujieda <fujieda@users.osdn.me>\r
// \r
-// This program is part of KancolleSniffer.\r
+// Licensed under the Apache License, Version 2.0 (the "License");\r
+// you may not use this file except in compliance with the License.\r
+// You may obtain a copy of the License at\r
//\r
-// KancolleSniffer is free software: you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation, either version 3 of the License, or\r
-// (at your option) any later version.\r
+// http://www.apache.org/licenses/LICENSE-2.0\r
//\r
-// This program is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-//\r
-// You should have received a copy of the GNU General Public License\r
-// along with this program; if not, see <http://www.gnu.org/licenses/>.\r
+// Unless required by applicable law or agreed to in writing, software\r
+// distributed under the License is distributed on an "AS IS" BASIS,\r
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+// See the License for the specific language governing permissions and\r
+// limitations under the License.\r
\r
using System;\r
using System.Windows.Forms;\r
+using KancolleSniffer.Util;\r
\r
namespace KancolleSniffer\r
{\r
return;\r
Application.EnableVisualStyles();\r
Application.SetCompatibleTextRenderingDefault(false);\r
- Application.Run(new MainForm());\r
+ try\r
+ {\r
+ Application.Run(new MainForm());\r
+ }\r
+ catch (Exception ex)\r
+ {\r
+ var inner = ex.InnerException;\r
+ MessageBox.Show(ex.Message +\r
+ (inner == null\r
+ ? ""\r
+ : "\r\n" + inner.Message +\r
+ (inner.InnerException == null\r
+ ? ""\r
+ : "\r\n" + inner.InnerException.Message)),\r
+ "エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+ }\r
}\r
}\r
}
\ No newline at end of file