OSDN Git Service

AppliStation-GUI,インストール除外リストの設定を設定ダイアログに追加
[applistation/AppliStation.git] / AppliStation / PackageListViewForm.cs
index 5e4dedb..5d3e318 100644 (file)
@@ -108,6 +108,7 @@ namespace AppliStation
                        webResourceToolStripMenuItem.Visible = (pkgCount == 1);\r
                        uninstallToolStripMenuItem.Visible = uninstallBtnEnabled;\r
                        installToolStripMenuItem.Visible = installBtnEnabled;\r
+                       downloadToolStripMenuItem.Visible = (pkgCount > 0);\r
                        \r
                        // detailBoxのメッセージ設定\r
                        switch (pkgCount) {\r
@@ -547,6 +548,27 @@ namespace AppliStation
                        }\r
                }\r
                \r
+               internal void downloadActionInvoke(Installation[] pkgs)\r
+               {\r
+                       AppliStation.Util.ExecutionProgressViewer prog = new AppliStation.Util.ExecutionProgressViewer();\r
+                       prog.Shown += delegate(object sender2, EventArgs e2) {\r
+                               NaGet.SubCommands.NaGetDownloadToCache tasks = new NaGet.SubCommands.NaGetDownloadToCache(pkgListsMan, pkgs);\r
+                               prog.SetTaskSet(tasks);\r
+                               prog.Refresh();\r
+                               prog.StartTaskSet();\r
+                       };\r
+                       prog.Text = string.Format("キャッシュへのダウンロード");\r
+                       prog.ShowDialog(this);\r
+               }\r
+               \r
+               void DownloadToolStripMenuItemClick(object sender, EventArgs e)\r
+               {\r
+                       Installation[] insts = Installation.ConvertInstallations( NaGet.Utils.IEnumerable2Array(packageListView.SelectedPackages) );\r
+                       \r
+                       downloadActionInvoke(insts);\r
+                       \r
+                       UpdatePackageList();\r
+               }\r
                \r
                void WebOfficialMenuItemClick(object sender, EventArgs e)\r
                {\r