OSDN Git Service

AppliStation-GUI,ランチャーメニュー上での例外発生を修復
authorttp <ttp@users.sourceforge.jp>
Sun, 7 Sep 2008 03:25:22 +0000 (03:25 +0000)
committerttp <ttp@users.sourceforge.jp>
Sun, 7 Sep 2008 03:25:22 +0000 (03:25 +0000)
 * 新アイテム選択時のぬるぽ
 * アプリケーション起動時のWin32Exception発生

git-svn-id: http://localhost/svn/AppliStation/trunk@969 34ed2c89-c49f-4a4b-abdb-c318350108cf

AppliStation/AppliStation.Util/ToolStripPetitLauncherMenuItem.cs

index 159fa27..8d7040c 100644 (file)
@@ -50,7 +50,10 @@ namespace AppliStation.Util
                                thread = null;\r
                        }\r
                        \r
-                       DropDownItems.Clear();\r
+                       try {\r
+                               DropDownItems.Clear();\r
+                       } catch (NullReferenceException) {\r
+                       }\r
                        if (Directory.Exists(baseFolderPath)) {\r
                                thread = new Thread(new ThreadStart(buildItems));\r
                                thread.Start();\r
@@ -172,7 +175,11 @@ namespace AppliStation.Util
                        \r
                        ProcessStartInfo procInfo = new ProcessStartInfo(item.Tag.ToString());\r
                        procInfo.WorkingDirectory = Path.GetDirectoryName(procInfo.FileName);\r
-                       Process.Start(procInfo);\r
+                       try {\r
+                               Process.Start(procInfo);\r
+                       } catch (Win32Exception ex) {\r
+                               MessageBox.Show(ex.Message, procInfo.FileName, MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+                       }\r
                }\r
                \r
                /// <summary>\r