OSDN Git Service

na-get-lib,ダウンロード後にファイル名が引き継がれずインストールなどが動作していなかったのを修正
[applistation/AppliStation.git] / AppliStation / UserPrefForm.cs
index 4042f6a..8005bf3 100644 (file)
@@ -44,6 +44,7 @@ namespace AppliStation
                        this.EnableScanInstallerFile = userPref.EnableScanInstallerFile;\r
                        this.InstallOnBackground = userPref.InstallOnBackground;\r
                        this.CacheFolder = userPref.CacheFolder;\r
+                       this.ExcludeUpdatePackageNames = userPref.ExcludeUpdatePackageNames;\r
                }\r
                \r
                #region レポジトリリスト設定関連\r
@@ -330,6 +331,37 @@ namespace AppliStation
                \r
                #endregion\r
                \r
+               #region ソフト更新設定関連\r
+               \r
+               \r
+               public string[] ExcludeUpdatePackageNames {\r
+                       set {\r
+                               this.upgradeExcludeTextBox.Lines = value;\r
+                       }\r
+                       get {\r
+                               List<string> list = new List<string>();\r
+                               \r
+                               foreach (string line in this.upgradeExcludeTextBox.Lines) {\r
+                                       if (!string.IsNullOrEmpty(line)) {\r
+                                               list.Add(line);\r
+                                       }\r
+                               }\r
+                               \r
+                               return list.ToArray();\r
+                       }\r
+               }\r
+               \r
+               /// <summary>\r
+               /// ソフト更新関連設定を、指定された設定オブジェクトに設定する。\r
+               /// </summary>\r
+               /// <param name="pref">設定オブジェクト</param>\r
+               private void commitUpgradeSetting(NaGet.NaGetLibPref pref)\r
+               {\r
+                       pref.ExcludeUpdatePackageNames = this.ExcludeUpdatePackageNames;\r
+               }\r
+               \r
+               #endregion\r
+               \r
                /// <summary>\r
                /// 指定された設定オブジェクトをファイルとして保存する\r
                /// </summary>\r
@@ -351,6 +383,7 @@ namespace AppliStation
                        commitRepositoryListSetting();\r
                        commitProxySetting(pref);\r
                        commitInstallSetting(pref);\r
+                       commitUpgradeSetting(pref);\r
                        \r
                        commitNaGetLibPref(pref);\r
                }\r