OSDN Git Service

AppliStation-GUI,インストール除外リストの設定を設定ダイアログに追加
[applistation/AppliStation.git] / AppliStation / UserPrefForm.cs
index 9478094..8005bf3 100644 (file)
@@ -27,6 +27,7 @@ namespace AppliStation
                        InitializeComponent();\r
                        \r
                        this.openInternetOptionLinkAdminLabel.Visible = ! NaGet.Utils.IsAdministrators();\r
+                       AppliStation.Util.NativeMethods.LinkLabel_SetElevationRequiredState(this.openInternetOptionLinkAdminLabel, true);\r
                        \r
                        loadCurrentPref();\r
                }\r
@@ -43,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
@@ -168,7 +170,7 @@ namespace AppliStation
                        }\r
                }\r
                \r
-               void RepoUrlTextBoxLeave(object sender, EventArgs e)\r
+               void RepoUrlTextBoxValidated(object sender, EventArgs e)\r
                {\r
                        int selectedIndex = repoListCheckedListBox.SelectedIndex;\r
                        if ((0 <= selectedIndex) && (selectedIndex < repos.Count)) {\r
@@ -329,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
@@ -350,6 +383,7 @@ namespace AppliStation
                        commitRepositoryListSetting();\r
                        commitProxySetting(pref);\r
                        commitInstallSetting(pref);\r
+                       commitUpgradeSetting(pref);\r
                        \r
                        commitNaGetLibPref(pref);\r
                }\r