OSDN Git Service

AppliStation-GUI,na-get-lib,ListView表示高速化などのパフォーマンス向上
authorttp <ttp@users.sourceforge.jp>
Sat, 31 Oct 2009 03:30:04 +0000 (12:30 +0900)
committerttp <ttp@users.sourceforge.jp>
Sat, 31 Oct 2009 03:30:04 +0000 (12:30 +0900)
AppliStation/PackageListView.cs
AppliStation/UserPrefForm.cs
na-get-lib/NaGet.Packages/PackageList.cs
na-get-lib/NaGet.SubCommands/NaGetUpdate.cs

index bfc7d25..481ed74 100644 (file)
@@ -142,6 +142,7 @@ namespace AppliStation
                        string ImageKeySystem = ImageCategory_ToString(ImageCategory.System);\r
                        string keyword = filteringKeyword ?? string.Empty;\r
                        \r
+                       this.BeginUpdate();\r
                        this.Items.Clear();\r
                        \r
                        // ソフトリストの中身のパッケージ\r
@@ -177,6 +178,8 @@ namespace AppliStation
                                }\r
                        }\r
                        \r
+                       this.EndUpdate();\r
+                       \r
                        this.Refresh();\r
                }\r
                \r
index d9b7baf..b9c3ba2 100644 (file)
@@ -312,7 +312,7 @@ namespace AppliStation
                /// 指定された設定オブジェクトをファイルとして保存する\r
                /// </summary>\r
                /// <param name="pref">設定ファイル</param>\r
-               private void commitNaGetLibPref(NaGet.NaGetLibPref pref)\r
+               private static void commitNaGetLibPref(NaGet.NaGetLibPref pref)\r
                {\r
                        // ファイルに書き込む\r
                        string path = NaGet.Env.PrefPath;\r
index cc27f11..e8f76fe 100644 (file)
@@ -173,7 +173,11 @@ namespace NaGet.Packages
                /// <returns>マッチしたパッケージのイテレータ</returns>\r
                public IEnumerable<TPackage> Search(string key)\r
                {\r
-                       return Search(GetPredicateForSearch(key));\r
+                       if (string.IsNullOrEmpty(key)) {\r
+                               return packageArrayList.AsReadOnly();\r
+                       } else {\r
+                               return Search(GetPredicateForSearch(key));\r
+                       }\r
                }\r
                \r
                /// <summary>\r
index 6198921..f105971 100644 (file)
@@ -129,7 +129,7 @@ namespace NaGet.SubCommands
                                                        // RepositoryReferenceの名前を読み込む // TODO RepositoryReferenceの名前を読み込む処理はここでいいのか?\r
                                                        repo.Name = (string.IsNullOrEmpty(pkgList.Name))? repo.Name : pkgList.Name;\r
                                                        \r
-                                                       avaiablePackageList.AddPackages(pkgList.Packages);\r
+                                                       avaiablePackageList.AddPackages(pkgList);\r
                                                } catch (InvalidOperationException) {\r
                                                        RaiseTaskSetEvent(NaGetTaskSetEventType.ERROR, string.Format("Repository {0} does not have a AppliStation Native XML softlist.", repo.Name ?? repo.Url.Href));\r
                                                }\r