OSDN Git Service

Merge branch 'master' of ttp@git.sourceforge.jp:/gitroot/applistation/AppliStation
[applistation/AppliStation.git] / AppliStation / Program.cs
index b6acf53..e08ba09 100644 (file)
@@ -189,15 +189,15 @@ namespace AppliStation
                \r
                private static Form createAndOpenSplashScreen()\r
                {\r
-                       Form splashScreen = new Form();\r
-                       splashScreen.FormBorderStyle = FormBorderStyle.None;\r
-                       splashScreen.BackgroundImage = System.Drawing.Bitmap.FromFile(Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "SplashScreen.png"));\r
-                       splashScreen.Size = splashScreen.BackgroundImage.Size;\r
-                       splashScreen.ShowIcon = false;\r
-                       splashScreen.ShowInTaskbar = false;\r
-                       splashScreen.StartPosition = FormStartPosition.CenterScreen;\r
+                       System.Drawing.Bitmap bitmap;\r
+                       \r
+                       bitmap = new System.Drawing.Bitmap(Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "SplashScreen.png"));\r
+                       Form splashScreen = AppliStation.Util.SprashScreenLayered.CreateSprashScreenLayered(bitmap, System.Drawing.Color.Black);\r
+                       \r
+                       splashScreen.Text = "AppliStation";\r
+                       splashScreen.Icon = System.Drawing.Icon.ExtractAssociatedIcon(Application.ExecutablePath);\r
                        splashScreen.Show();\r
-               \r
+                       \r
                        return splashScreen;\r
                }\r
                \r
@@ -217,8 +217,11 @@ namespace AppliStation
                                ToolStripManager.VisualStylesEnabled = false; // ToolStripがLunaで青くならないように\r
                                Application.EnableVisualStyles(); // LunaやVistaのデザインを有効に\r
                                \r
-                               Application.ThreadException += AppliStation.Util.ExceptionDialogForm.Application_ThrowException;\r
-                               System.Threading.Thread.GetDomain().UnhandledException += AppliStation.Util.ExceptionDialogForm.Application_ThrowException;\r
+                               // デバッガがアタッチしていないなら、Exceptionを自力でハンドルする\r
+                               if (! System.Diagnostics.Debugger.IsAttached) {\r
+                                       Application.ThreadException += AppliStation.Util.ExceptionDialogForm.Application_ThrowException;\r
+                                       System.Threading.Thread.GetDomain().UnhandledException += AppliStation.Util.ExceptionDialogForm.Application_ThrowException;\r
+                               }\r
                                \r
                                Program prog = new Program();\r
                                prog.splashScreen = splashScreen;\r