OSDN Git Service

AppliStation-GUI,パッケージ情報パネルのインストーラ情報表示をバージョン取得失敗時に表示しないようにした
authorttp <ttp@users.sourceforge.jp>
Fri, 9 May 2008 11:23:42 +0000 (11:23 +0000)
committerttp <ttp@users.sourceforge.jp>
Fri, 9 May 2008 11:23:42 +0000 (11:23 +0000)
git-svn-id: http://localhost/svn/AppliStation/trunk@896 34ed2c89-c49f-4a4b-abdb-c318350108cf

AppliStation/PackageInfoForm.cs

index d2d2218..bba3912 100644 (file)
@@ -80,16 +80,21 @@ namespace AppliStation
                        typeValueLabel.Text = pkg.Type.ToString();\r
                        \r
                        tabControl1.TabPages.Clear();\r
-                       foreach (Installer inst in pkg.Installer) {\r
-                               TabPage page = new TabPage(string.Format("\83C\83\93\83X\83g\81[\83\89 \82»\82Ì{0}", tabControl1.TabCount+1));\r
-                               page.Dock = DockStyle.Fill;\r
-                               \r
-                               InstallerInfoForm instForm = new InstallerInfoForm();\r
-                               instForm.SelectedObject = inst;\r
-                               instForm.Dock = DockStyle.Fill;\r
-                               page.Controls.Add(instForm);\r
-                               \r
-                               tabControl1.TabPages.Add(page);\r
+                       if (pkg is InstalledPackage && string.IsNullOrEmpty(pkg.Version)) {\r
+                               tabControl1.Visible = false;\r
+                       } else {\r
+                               tabControl1.Visible = true;\r
+                               foreach (Installer inst in pkg.Installer) {\r
+                                       TabPage page = new TabPage(string.Format("\83C\83\93\83X\83g\81[\83\89 \82»\82Ì{0}", tabControl1.TabCount+1));\r
+                                       page.Dock = DockStyle.Fill;\r
+                                       \r
+                                       InstallerInfoForm instForm = new InstallerInfoForm();\r
+                                       instForm.SelectedObject = inst;\r
+                                       instForm.Dock = DockStyle.Fill;\r
+                                       page.Controls.Add(instForm);\r
+                                       \r
+                                       tabControl1.TabPages.Add(page);\r
+                               }\r
                        }\r
                }\r
                \r