OSDN Git Service

AppliStation-GUI,ソフト更新をインストール除外リストの設定に対応。
authorttp <ttp@users.sourceforge.jp>
Thu, 9 Dec 2010 13:04:10 +0000 (22:04 +0900)
committerttp <ttp@users.sourceforge.jp>
Thu, 9 Dec 2010 13:04:10 +0000 (22:04 +0900)
AppliStation/PackageListViewForm.cs

index 5d3e318..e348e6f 100644 (file)
@@ -713,30 +713,10 @@ namespace AppliStation
                        // webGoogleSearchMenuItem always active.\r
                }\r
                \r
                        // webGoogleSearchMenuItem always active.\r
                }\r
                \r
-               private IEnumerable<Package> getUpdatedPackages(PackageList<InstalledPackage> installedPkgList, PackageList<Package> avaiablePkgList, IComparer<string> verComp)\r
-               {\r
-                       foreach (InstalledPackage pkg in installedPkgList) {\r
-                               Package avaiablePkg = avaiablePkgList.GetPackageForName(pkg.Name);\r
-                               \r
-                               if (avaiablePkg != null) {\r
-                                       if (verComp.Compare(pkg.Version, avaiablePkg.Version) < 0 &&\r
-                                           installedPkgList.GetPackageForPackage(pkg.Name, avaiablePkg.Version) == null) {\r
-                                               \r
-                                               yield return avaiablePkg;\r
-                                       }\r
-                               }\r
-                       }\r
-               }\r
-               \r
                void UpgradeToolStripButtonClick(object sender, EventArgs e)\r
                {\r
                void UpgradeToolStripButtonClick(object sender, EventArgs e)\r
                {\r
-                       List<Package> pkgs;\r
-                       VersionComparetor verComp = new VersionComparetor();\r
-                       PackageList<Package> avaiablePackageList = pkgListsMan.AvailablePkgList;\r
-                       \r
-                       pkgs = NaGet.Utils.MergeList(\r
-                               getUpdatedPackages(pkgListsMan.InstalledPkgList, avaiablePackageList, verComp),\r
-                               getUpdatedPackages(pkgListsMan.SystemInstalledPkgList, avaiablePackageList, verComp)\r
+                       List<Package> pkgs = new List<Package>(\r
+                               UpgradeFinder.GetUpgradePackages(pkgListsMan)\r
                        );\r
                        \r
                        if (pkgs.Count <= 0) {\r
                        );\r
                        \r
                        if (pkgs.Count <= 0) {\r