OSDN Git Service

na-get-lib,AppliStation-GUI,ソフトリスト名を入れていない個所があったので修正。インストールダイアログで、ソフトリスト名を表示するようにした
authorttp <ttp@users.sourceforge.jp>
Sat, 30 May 2009 10:49:24 +0000 (19:49 +0900)
committerttp <ttp@users.sourceforge.jp>
Sat, 30 May 2009 10:49:24 +0000 (19:49 +0900)
AppliStation/InstallationConfirmForm.Designer.cs
AppliStation/InstallationConfirmForm.cs
na-get-lib/NaGet.Packages/PackageList.cs
na-get-lib/NaGet.SubCommands/NaGetUpdate.cs

index 145cb1b..28f1928 100644 (file)
@@ -50,6 +50,7 @@ namespace AppliStation
                        this.selectAllInstsStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
                        this.unselectAllInstsStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
                        this.instListViewSilentInstallImageList = new System.Windows.Forms.ImageList(this.components);\r
+                       this.pkgListNameColumnHeader = new System.Windows.Forms.ColumnHeader();\r
                        this.tableLayoutPanel1.SuspendLayout();\r
                        this.btnPanel.SuspendLayout();\r
                        this.instListViewContextMenuStrip.SuspendLayout();\r
@@ -137,7 +138,8 @@ namespace AppliStation
                                                                        this.nameColumnHeader,\r
                                                                        this.versionColumnHeader,\r
                                                                        this.currentVersionColumnHeader,\r
-                                                                       this.silentInstColumnHeader});\r
+                                                                       this.silentInstColumnHeader,\r
+                                                                       this.pkgListNameColumnHeader});\r
                        this.instsListView.ContextMenuStrip = this.instListViewContextMenuStrip;\r
                        this.instsListView.Dock = System.Windows.Forms.DockStyle.Fill;\r
                        this.instsListView.GridLines = true;\r
@@ -158,9 +160,9 @@ namespace AppliStation
                        this.instsListView.TabIndex = 2;\r
                        this.instsListView.UseCompatibleStateImageBehavior = false;\r
                        this.instsListView.View = System.Windows.Forms.View.Details;\r
-                       this.instsListView.DrawColumnHeader += new System.Windows.Forms.DrawListViewColumnHeaderEventHandler(this.InstsListViewDrawColumnHeader);\r
                        this.instsListView.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.InstsListViewItemChecked);\r
                        this.instsListView.DrawSubItem += new System.Windows.Forms.DrawListViewSubItemEventHandler(this.InstsListViewDrawSubItem);\r
+                       this.instsListView.DrawColumnHeader += new System.Windows.Forms.DrawListViewColumnHeaderEventHandler(this.InstsListViewDrawColumnHeader);\r
                        // \r
                        // nameColumnHeader\r
                        // \r
@@ -190,32 +192,32 @@ namespace AppliStation
                                                                        this.selectAllInstsStripMenuItem,\r
                                                                        this.unselectAllInstsStripMenuItem});\r
                        this.instListViewContextMenuStrip.Name = "packageListViewContextMenuStrip";\r
-                       this.instListViewContextMenuStrip.Size = new System.Drawing.Size(263, 76);\r
+                       this.instListViewContextMenuStrip.Size = new System.Drawing.Size(220, 76);\r
                        this.instListViewContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.InstsListViewContextMenuStripOpening);\r
                        // \r
                        // silentInstallStripMenuItem\r
                        // \r
                        this.silentInstallStripMenuItem.Name = "silentInstallStripMenuItem";\r
-                       this.silentInstallStripMenuItem.Size = new System.Drawing.Size(262, 22);\r
+                       this.silentInstallStripMenuItem.Size = new System.Drawing.Size(219, 22);\r
                        this.silentInstallStripMenuItem.Text = "サイレントインストールをする(&S)";\r
                        this.silentInstallStripMenuItem.Click += new System.EventHandler(this.SilentInstallStripMenuItemClick);\r
                        // \r
                        // instListToolStripSeparator\r
                        // \r
                        this.instListToolStripSeparator.Name = "instListToolStripSeparator";\r
-                       this.instListToolStripSeparator.Size = new System.Drawing.Size(259, 6);\r
+                       this.instListToolStripSeparator.Size = new System.Drawing.Size(216, 6);\r
                        // \r
                        // selectAllInstsStripMenuItem\r
                        // \r
                        this.selectAllInstsStripMenuItem.Name = "selectAllInstsStripMenuItem";\r
-                       this.selectAllInstsStripMenuItem.Size = new System.Drawing.Size(262, 22);\r
+                       this.selectAllInstsStripMenuItem.Size = new System.Drawing.Size(219, 22);\r
                        this.selectAllInstsStripMenuItem.Text = "全て選択(&A)";\r
                        this.selectAllInstsStripMenuItem.Click += new System.EventHandler(this.SelectAllInstsStripMenuItemClick);\r
                        // \r
                        // unselectAllInstsStripMenuItem\r
                        // \r
                        this.unselectAllInstsStripMenuItem.Name = "unselectAllInstsStripMenuItem";\r
-                       this.unselectAllInstsStripMenuItem.Size = new System.Drawing.Size(262, 22);\r
+                       this.unselectAllInstsStripMenuItem.Size = new System.Drawing.Size(219, 22);\r
                        this.unselectAllInstsStripMenuItem.Text = "全ての選択を解除(&U)";\r
                        this.unselectAllInstsStripMenuItem.Click += new System.EventHandler(this.UnselectAllInstsStripMenuItemClick);\r
                        // \r
@@ -225,6 +227,10 @@ namespace AppliStation
                        this.instListViewSilentInstallImageList.TransparentColor = System.Drawing.Color.Transparent;\r
                        this.instListViewSilentInstallImageList.Images.SetKeyName(0, "automatic-install.png");\r
                        // \r
+                       // repoNameColumnHeader\r
+                       // \r
+                       this.pkgListNameColumnHeader.Text = "レポジトリ";\r
+                       // \r
                        // InstallationConfirmForm\r
                        // \r
                        this.AcceptButton = this.okButton;\r
@@ -247,6 +253,7 @@ namespace AppliStation
                        this.instListViewContextMenuStrip.ResumeLayout(false);\r
                        this.ResumeLayout(false);\r
                }\r
+               private System.Windows.Forms.ColumnHeader pkgListNameColumnHeader;\r
                private System.Windows.Forms.ImageList instListViewSilentInstallImageList;\r
                private System.Windows.Forms.ColumnHeader silentInstColumnHeader;\r
                private System.Windows.Forms.ToolStripSeparator instListToolStripSeparator;\r
index 7c06074..3a3c4a2 100644 (file)
@@ -105,6 +105,7 @@ namespace AppliStation
                                itemData[versionColumnHeader.Index]        = pkg.Version;\r
                                itemData[currentVersionColumnHeader.Index] = (curPkg != null)? curPkg.Version : "-";\r
                                // itemData[silentInstColumnHeader.Index] の設定は instViewUpdateSilentInstallView で\r
+                               itemData[pkgListNameColumnHeader.Index]    = pkg.PackageListName;\r
                                \r
                                ListViewItem item = new ListViewItem(itemData);\r
                                item.Tag = inst;\r
index 4de4b18..bbe3a5b 100644 (file)
@@ -69,6 +69,17 @@ namespace NaGet.Packages
                }\r
                \r
                /// <summary>\r
+               /// パッケージリストの各PackageListNameを設定する\r
+               /// </summary>\r
+               /// <param name="pkgList">設定するパッケージが入っているパッケージリスト</param>\r
+               public void FixPackageListName()\r
+               {\r
+                       foreach (TPackage pkg in packageArrayList) {\r
+                               pkg.PackageListName = this.Name;\r
+                       }\r
+               }\r
+               \r
+               /// <summary>\r
                /// パッケージをリストにマージ(追加)する\r
                /// </summary>\r
                /// <param name="package">追加するパッケージ</param>\r
index 0bcfe40..de47715 100644 (file)
@@ -121,6 +121,7 @@ namespace NaGet.SubCommands
                                        Downloader.Download(repo.Url.Href, tmpfileName);\r
                                        \r
                                        PackageList<Package> pkgList = NaGet.Utils.GetDeserializedObject<PackageList<Package>>(tmpfileName);\r
+                                       pkgList.FixPackageListName(); // PackageListNameとの紐付けを行う\r
                                        \r
                                        // RepositoryReferenceの名前を読み込む // TODO RepositoryReferenceの名前を読み込む処理はここでいいのか?\r
                                        repo.Name = (string.IsNullOrEmpty(pkgList.Name))? repo.Name : pkgList.Name;\r