OSDN Git Service

AppliStation-GUI,パッケージ情報パネルの表示の全般的改良。
authorttp <ttp@users.sourceforge.jp>
Sat, 10 May 2008 02:59:37 +0000 (02:59 +0000)
committerttp <ttp@users.sourceforge.jp>
Sat, 10 May 2008 02:59:37 +0000 (02:59 +0000)
git-svn-id: http://localhost/svn/AppliStation/trunk@898 34ed2c89-c49f-4a4b-abdb-c318350108cf

AppliStation/AppliStation.csproj
AppliStation/InstallerInfoForm.cs
AppliStation/PackageInfoForm.Designer.cs
AppliStation/PackageInfoForm.cs
AppliStation/PackageListViewForm.cs

index 19a005e..93be75b 100644 (file)
@@ -98,6 +98,9 @@
     <EmbeddedResource Include="AppliStation.Util\ExecutionProgressViewer.resx">\r
       <DependentUpon>ExecutionProgressViewer.cs</DependentUpon>\r
     </EmbeddedResource>\r
+    <EmbeddedResource Include="PackageInfoForm.resx">\r
+      <DependentUpon>PackageInfoForm.cs</DependentUpon>\r
+    </EmbeddedResource>\r
     <EmbeddedResource Include="PackageListViewForm.resx">\r
       <DependentUpon>PackageListViewForm.cs</DependentUpon>\r
     </EmbeddedResource>\r
index 118840d..8461fac 100644 (file)
@@ -37,8 +37,11 @@ namespace AppliStation
                        installerUrlTextBox.Text = (inst == null || inst.Url == null)?\r
                                string.Empty : inst.Url.Href;\r
                        \r
-                       osValueLabel.Text = (inst.Platform == null || string.IsNullOrEmpty(inst.Platform.Os))?\r
-                               "\94C\88Ó\82ÌWindows" : inst.Platform.Os;\r
+                       if (inst.Platform == null || string.IsNullOrEmpty(inst.Platform.Os)) {\r
+                               osValueLabel.Text = "\94C\88Ó\82ÌWindows";\r
+                       } else {\r
+                               osValueLabel.Text = inst.Platform.Os.Replace("WIN", string.Empty);\r
+                       }\r
                        \r
                        switch ((inst.Platform != null)? inst.Platform.Arch : System.Reflection.ProcessorArchitecture.X86) {\r
                                case System.Reflection.ProcessorArchitecture.Amd64:\r
index fec43c4..1bbb991 100644 (file)
                        this.tableLayoutPanel.Name = "tableLayoutPanel";\r
                        this.tableLayoutPanel.Padding = new System.Windows.Forms.Padding(8);\r
                        this.tableLayoutPanel.RowCount = 9;\r
-                       this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 38F));\r
-                       this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32F));\r
+                       this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
+                       this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
                        this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
                        this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
                        this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
index bba3912..c2321dd 100644 (file)
@@ -76,8 +76,8 @@ namespace AppliStation
                                urlLabel.Enabled = false;\r
                        }\r
                        tagsTextBox.Text = pkg.Tags;\r
-                       setLinkLabelFromLicense(licenseLinkLabel, pkg.License);\r
-                       typeValueLabel.Text = pkg.Type.ToString();\r
+                       setLinkLabelFromLicense(licenseLinkLabel, pkg.License, pkg.Url.Href);\r
+                       setTypeValueLabel(typeValueLabel, pkg.Type);\r
                        \r
                        tabControl1.TabPages.Clear();\r
                        if (pkg is InstalledPackage && string.IsNullOrEmpty(pkg.Version)) {\r
@@ -96,26 +96,36 @@ namespace AppliStation
                                        tabControl1.TabPages.Add(page);\r
                                }\r
                        }\r
+                       \r
+                       this.Size = new Size(this.Size.Width, (tabControl1.TabCount>0)? 380 : 250);\r
                }\r
                \r
-               private static void setLinkLabelFromLicense(LinkLabel linklabel, string license)\r
+               private static void setLinkLabelFromLicense(LinkLabel linklabel, string license, string publicSiteUrl)\r
                {\r
                        linklabel.Enabled = true;\r
                        switch (license ?? string.Empty) {\r
                                case "":\r
-                                       linklabel.Text = "\83t\83\8a\81[\83\\83t\83g\83E\83F\83A (\96³\8f\9e)";\r
-                                       linklabel.Enabled = false;\r
+                                       if (string.IsNullOrEmpty(publicSiteUrl)) {\r
+                                               linklabel.Text = "\83t\83\8a\81[\83\\83t\83g\83E\83F\83A (\96³\8f\9e)";\r
+                                               linklabel.Enabled = false;\r
+                                       } else {\r
+                                               linklabel.Text = "\83t\83\8a\81[\83\\83t\83g\83E\83F\83A (\8fÚ\8d×\82Í\8cö\8e®\83T\83C\83g\82È\82Ç\82Å\8am\94F\82µ\82Ä\82­\82¾\82³\82¢)";\r
+                                               addLinkToLinkLabel(linklabel, "\8cö\8e®\83T\83C\83g", publicSiteUrl);\r
+                                       }\r
                                        break;\r
+                               #region \83I\81[\83v\83\93\83\\81[\83X\82©\82Â\83R\83s\81[\83\8c\83t\83g\r
                                case "GPL":\r
                                        linklabel.Text = "GPL (\83I\81[\83v\83\93\83\\81[\83X)";\r
                                        addLinkToLinkLabel(linklabel, "GPL", @"http://www.gnu.org/licenses/gpl.ja.html");\r
                                        addLinkToLinkLabel(linklabel, "\83I\81[\83v\83\93\83\\81[\83X", @"http://creativecommons.org/licenses/GPL/2.0/deed.ja");\r
                                        break;\r
                                case "GPLv2":\r
+                               case "GPLv2+":\r
                                        linklabel.Text = "GPLv2 (\83I\81[\83v\83\93\83\\81[\83X)";\r
                                        addLinkToLinkLabel(linklabel, "GPLv2", @"http://www.gnu.org/licenses/gpl-2.0.html");\r
                                        break;\r
                                case "GPLv3":\r
+                               case "GPLv3+":\r
                                        linklabel.Text = "GPLv3 (\83I\81[\83v\83\93\83\\81[\83X)";\r
                                        addLinkToLinkLabel(linklabel, "GPLv3", @"http://www.gnu.org/licenses/gpl-3.0.html");\r
                                        break;\r
@@ -125,10 +135,12 @@ namespace AppliStation
                                        addLinkToLinkLabel(linklabel, "\83I\81[\83v\83\93\83\\81[\83X", @"http://creativecommons.org/licenses/LGPL/2.1/deed.ja");\r
                                        break;\r
                                case "LGPLv2":\r
+                               case "LGPLv2+":\r
                                        linklabel.Text = "LGPLv2 (\83I\81[\83v\83\93\83\\81[\83X)";\r
                                        addLinkToLinkLabel(linklabel, "LGPLv2", @"http://www.gnu.org/licenses/lgpl-2.1.html");\r
                                        break;\r
                                case "LGPLv3":\r
+                               case "LGPLv3+":\r
                                        linklabel.Text = "LGPLv3 (\83I\81[\83v\83\93\83\\81[\83X)";\r
                                        addLinkToLinkLabel(linklabel, "LGPLv3", @"http://www.gnu.org/licenses/lgpl-3.0.html");\r
                                        break;\r
@@ -140,6 +152,8 @@ namespace AppliStation
                                        linklabel.Text = "CPL (\83I\81[\83v\83\93\83\\81[\83X)";\r
                                        linklabel.Links.Add(0, linklabel.Text.Length, @"http://sourceforge.jp/projects/opensource/wiki/licenses%2FCommon_Public_License");\r
                                        break;\r
+                               #endregion\r
+                               #region \83I\81[\83v\83\93\83\\81[\83X\82¾\82ª\81A\83R\83s\81[\83\8c\83t\83g\82Å\82È\82¢\r
                                case "MIT":\r
                                        linklabel.Text = "MIT\83\89\83C\83Z\83\93\83X (\83I\81[\83v\83\93\83\\81[\83X)";\r
                                        addLinkToLinkLabel(linklabel, "MIT\83\89\83C\83Z\83\93\83X", @"http://www.opensource.org/licenses/mit-license.php");\r
@@ -148,12 +162,17 @@ namespace AppliStation
                                        linklabel.Text = "\8fC\90³\8dÏBSD\83\89\83C\83Z\83\93\83X (\83I\81[\83v\83\93\83\\81[\83X)";\r
                                        addLinkToLinkLabel(linklabel, "BSD\83\89\83C\83Z\83\93\83X", @"http://www.opensource.org/licenses/bsd-license.php");\r
                                        break;\r
+                               case "Artistic":\r
+                                       linklabel.Text = "Artistic\83\89\83C\83Z\83\93\83X (\83I\81[\83v\83\93\83\\81[\83X)";\r
+                                       addLinkToLinkLabel(linklabel, "Artistic\83\89\83C\83Z\83\93\83X", @"http://www.perlfoundation.org/artistic_license_2_0");\r
+                                       break;\r
+                               #endregion\r
                                case "NYSL":\r
                                        linklabel.Text = "\8eÏ\82é\82È\82è\8fÄ\82­\82È\82è\8dD\82«\82É\82µ\82ë\83\89\83C\83Z\83\93\83X";\r
                                        linklabel.Links.Add(0, linklabel.Text.Length, @"http://www.kmonos.net/nysl/");\r
                                        break;\r
                                case "Public Domain":\r
-                                       linklabel.Text = "\83p\83u\83\8a\83b\83N\83h\83\81\83C\83\93 (\92\98\8dì\8c \94ñ\93K\97p)";\r
+                                       linklabel.Text = "\83p\83u\83\8a\83b\83N\83h\83\81\83C\83\93 (\92\98\8dì\8c \8bA\91®\82È\82µ)";\r
                                        linklabel.Links.Add(0, linklabel.Text.Length, @"http://e-words.jp/w/E38391E38396E383AAE38383E382AFE38389E383A1E382A4E383B3.html");\r
                                        break;\r
                                default:\r
@@ -169,6 +188,24 @@ namespace AppliStation
                        \r
                }\r
                \r
+               private static void setTypeValueLabel(Label typeValueLabel, InstallerType instType)\r
+               {\r
+                       switch (instType) {\r
+                               case InstallerType.ARCHIVE:\r
+                                       typeValueLabel.Text = "\8e©\8cÈ\89ð\93\80\8f\91\8cÉ\82Ü\82½\82Í\8f\91\8cÉ";\r
+                                       break;\r
+                               case InstallerType.EXEC_INSTALLER:\r
+                                       typeValueLabel.Text = "\83C\83\93\83X\83g\81[\83\89\8c`\8e®";\r
+                                       break;\r
+                               case InstallerType.MSI_PACKAGE:\r
+                                       typeValueLabel.Text = "MSI\83t\83@\83C\83\8b\8c`\8e®";\r
+                                       break;\r
+                               default:\r
+                                       typeValueLabel.Text = "\95s\96¾\82È\83C\83\93\83X\83g\81[\83\8b\8c`\8e®(\83C\83\93\83X\83g\81[\83\8b\95s\94\)";\r
+                                       break;\r
+                       }\r
+               }\r
+               \r
                /// <summary>\r
                /// \83\8a\83\93\83N\83\89\83x\83\8b\82Ì\83\8a\83\93\83N\91}\93ü\95Ö\97\98\83\81\83\\83b\83h\r
                /// </summary>\r
index ff86c68..a5a0de0 100644 (file)
@@ -499,7 +499,6 @@ namespace AppliStation
                                PackageInfoForm form = new PackageInfoForm();\r
                                form.SelectedObject = pkg;\r
                                form.Text = pkg.ToString() + "\82Ì\83v\83\8d\83p\83e\83B";\r
-                               form.AutoSize = true;\r
                                \r
                                form.ShowDialog(this);\r
 \r