OSDN Git Service

AppliStation-GUI,インストール除外リストの設定を設定ダイアログに追加
authorttp <ttp@users.sourceforge.jp>
Mon, 6 Dec 2010 12:50:47 +0000 (21:50 +0900)
committerttp <ttp@users.sourceforge.jp>
Thu, 9 Dec 2010 12:50:04 +0000 (21:50 +0900)
AppliStation/UserPrefForm.Designer.cs
AppliStation/UserPrefForm.cs

index eecfa7f..38d803b 100644 (file)
                        this.cacheFolderTextBox = new System.Windows.Forms.TextBox();\r
                        this.cacheFolderBrowseButton = new System.Windows.Forms.Button();\r
                        this.cacheFolderOpenLinkLabel = new System.Windows.Forms.LinkLabel();\r
+                       this.upgradeTabPage = new System.Windows.Forms.TabPage();\r
+                       this.upgradeTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();\r
+                       this.upgradeExcludeGroupBox = new System.Windows.Forms.GroupBox();\r
+                       this.upgradeExcludeTextBox = new System.Windows.Forms.TextBox();\r
                        this.toolTip = new System.Windows.Forms.ToolTip(this.components);\r
                        this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);\r
                        this.tableLayoutPanel.SuspendLayout();\r
@@ -80,6 +84,9 @@
                        this.installTableLayoutPanel.SuspendLayout();\r
                        this.cacheFolderGroupBox.SuspendLayout();\r
                        this.cacheFolderTableLayoutPanel.SuspendLayout();\r
+                       this.upgradeTabPage.SuspendLayout();\r
+                       this.upgradeTableLayoutPanel.SuspendLayout();\r
+                       this.upgradeExcludeGroupBox.SuspendLayout();\r
                        ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();\r
                        this.SuspendLayout();\r
                        // \r
                        this.tabControl.Controls.Add(this.reposListTabPage);\r
                        this.tabControl.Controls.Add(this.networkTabPage);\r
                        this.tabControl.Controls.Add(this.installTabPage);\r
+                       this.tabControl.Controls.Add(this.upgradeTabPage);\r
                        this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill;\r
                        this.tabControl.Location = new System.Drawing.Point(5, 5);\r
                        this.tabControl.Margin = new System.Windows.Forms.Padding(5);\r
                        // reposListTabPage\r
                        // \r
                        this.reposListTabPage.Controls.Add(this.repoTableLayoutPanel);\r
-                       this.reposListTabPage.Location = new System.Drawing.Point(4, 22);\r
+                       this.reposListTabPage.Location = new System.Drawing.Point(4, 21);\r
                        this.reposListTabPage.Name = "reposListTabPage";\r
                        this.reposListTabPage.Padding = new System.Windows.Forms.Padding(3);\r
-                       this.reposListTabPage.Size = new System.Drawing.Size(446, 214);\r
+                       this.reposListTabPage.Size = new System.Drawing.Size(446, 215);\r
                        this.reposListTabPage.TabIndex = 0;\r
                        this.reposListTabPage.Text = "レポジトリ";\r
-                       this.reposListTabPage.UseVisualStyleBackColor = true;\r
                        // \r
                        // repoTableLayoutPanel\r
                        // \r
                        this.repoTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
                        this.repoTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));\r
                        this.repoTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-                       this.repoTableLayoutPanel.Size = new System.Drawing.Size(440, 208);\r
+                       this.repoTableLayoutPanel.Size = new System.Drawing.Size(440, 209);\r
                        this.repoTableLayoutPanel.TabIndex = 1;\r
                        // \r
                        // repoListCheckedListBox\r
                        this.repoListCheckedListBox.Location = new System.Drawing.Point(3, 15);\r
                        this.repoListCheckedListBox.Name = "repoListCheckedListBox";\r
                        this.repoListCheckedListBox.ScrollAlwaysVisible = true;\r
-                       this.repoListCheckedListBox.Size = new System.Drawing.Size(347, 165);\r
+                       this.repoListCheckedListBox.Size = new System.Drawing.Size(347, 166);\r
                        this.repoListCheckedListBox.TabIndex = 1;\r
                        this.repoListCheckedListBox.SelectedIndexChanged += new System.EventHandler(this.RepoListCheckedListBoxSelectedIndexChanged);\r
                        this.repoListCheckedListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.RepoListCheckedListBoxItemCheck);\r
                        this.repoUrlTextBox.Dock = System.Windows.Forms.DockStyle.Fill;\r
                        this.repoUrlTextBox.Enabled = false;\r
                        this.repoUrlTextBox.ImeMode = System.Windows.Forms.ImeMode.Off;\r
-                       this.repoUrlTextBox.Location = new System.Drawing.Point(122, 186);\r
+                       this.repoUrlTextBox.Location = new System.Drawing.Point(122, 187);\r
                        this.repoUrlTextBox.Name = "repoUrlTextBox";\r
                        this.repoUrlTextBox.Size = new System.Drawing.Size(315, 19);\r
                        this.repoUrlTextBox.TabIndex = 3;\r
                        this.repoUrlLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));\r
                        this.repoUrlLabel.AutoSize = true;\r
                        this.repoUrlLabel.Enabled = false;\r
-                       this.repoUrlLabel.Location = new System.Drawing.Point(3, 189);\r
+                       this.repoUrlLabel.Location = new System.Drawing.Point(3, 190);\r
                        this.repoUrlLabel.Name = "repoUrlLabel";\r
                        this.repoUrlLabel.Size = new System.Drawing.Size(113, 12);\r
                        this.repoUrlLabel.TabIndex = 2;\r
                        // networkTabPage\r
                        // \r
                        this.networkTabPage.Controls.Add(this.proxyGroupBox);\r
-                       this.networkTabPage.Location = new System.Drawing.Point(4, 22);\r
+                       this.networkTabPage.Location = new System.Drawing.Point(4, 21);\r
                        this.networkTabPage.Name = "networkTabPage";\r
                        this.networkTabPage.Padding = new System.Windows.Forms.Padding(3);\r
-                       this.networkTabPage.Size = new System.Drawing.Size(446, 214);\r
+                       this.networkTabPage.Size = new System.Drawing.Size(446, 215);\r
                        this.networkTabPage.TabIndex = 1;\r
                        this.networkTabPage.Text = "接続";\r
-                       this.networkTabPage.UseVisualStyleBackColor = true;\r
                        // \r
                        // proxyGroupBox\r
                        // \r
                        this.proxyGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;\r
                        this.proxyGroupBox.Location = new System.Drawing.Point(3, 3);\r
                        this.proxyGroupBox.Name = "proxyGroupBox";\r
-                       this.proxyGroupBox.Size = new System.Drawing.Size(440, 208);\r
+                       this.proxyGroupBox.Size = new System.Drawing.Size(440, 209);\r
                        this.proxyGroupBox.TabIndex = 1;\r
                        this.proxyGroupBox.TabStop = false;\r
                        this.proxyGroupBox.Text = "プロキシサーバー";\r
                        this.proxyTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
                        this.proxyTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
                        this.proxyTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));\r
-                       this.proxyTableLayoutPanel.Size = new System.Drawing.Size(434, 190);\r
+                       this.proxyTableLayoutPanel.Size = new System.Drawing.Size(434, 191);\r
                        this.proxyTableLayoutPanel.TabIndex = 0;\r
                        // \r
                        // proxySameAsIERadioButton\r
                        // installTabPage\r
                        // \r
                        this.installTabPage.Controls.Add(this.installTableLayoutPanel);\r
-                       this.installTabPage.Location = new System.Drawing.Point(4, 22);\r
+                       this.installTabPage.Location = new System.Drawing.Point(4, 21);\r
                        this.installTabPage.Name = "installTabPage";\r
                        this.installTabPage.Padding = new System.Windows.Forms.Padding(3);\r
-                       this.installTabPage.Size = new System.Drawing.Size(446, 214);\r
+                       this.installTabPage.Size = new System.Drawing.Size(446, 215);\r
                        this.installTabPage.TabIndex = 2;\r
                        this.installTabPage.Text = "インストール";\r
-                       this.installTabPage.UseVisualStyleBackColor = true;\r
                        // \r
                        // installTableLayoutPanel\r
                        // \r
                        this.installTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
                        this.installTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
                        this.installTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));\r
-                       this.installTableLayoutPanel.Size = new System.Drawing.Size(440, 208);\r
+                       this.installTableLayoutPanel.Size = new System.Drawing.Size(440, 209);\r
                        this.installTableLayoutPanel.TabIndex = 1;\r
                        // \r
                        // installScanInstallerFileCheckbox\r
                        this.cacheFolderOpenLinkLabel.VisitedLinkColor = System.Drawing.SystemColors.HotTrack;\r
                        this.cacheFolderOpenLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.CacheFolderOpenLinkLabelLinkClicked);\r
                        // \r
+                       // upgradeTabPage\r
+                       // \r
+                       this.upgradeTabPage.Controls.Add(this.upgradeTableLayoutPanel);\r
+                       this.upgradeTabPage.Location = new System.Drawing.Point(4, 21);\r
+                       this.upgradeTabPage.Name = "upgradeTabPage";\r
+                       this.upgradeTabPage.Padding = new System.Windows.Forms.Padding(3);\r
+                       this.upgradeTabPage.Size = new System.Drawing.Size(446, 215);\r
+                       this.upgradeTabPage.TabIndex = 3;\r
+                       this.upgradeTabPage.Text = "ソフト更新";\r
+                       // \r
+                       // upgradeTableLayoutPanel\r
+                       // \r
+                       this.upgradeTableLayoutPanel.ColumnCount = 1;\r
+                       this.upgradeTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));\r
+                       this.upgradeTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));\r
+                       this.upgradeTableLayoutPanel.Controls.Add(this.upgradeExcludeGroupBox, 0, 0);\r
+                       this.upgradeTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.upgradeTableLayoutPanel.Location = new System.Drawing.Point(3, 3);\r
+                       this.upgradeTableLayoutPanel.Name = "upgradeTableLayoutPanel";\r
+                       this.upgradeTableLayoutPanel.RowCount = 2;\r
+                       this.upgradeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));\r
+                       this.upgradeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));\r
+                       this.upgradeTableLayoutPanel.Size = new System.Drawing.Size(440, 209);\r
+                       this.upgradeTableLayoutPanel.TabIndex = 0;\r
+                       // \r
+                       // upgradeExcludeGroupBox\r
+                       // \r
+                       this.upgradeExcludeGroupBox.AutoSize = true;\r
+                       this.upgradeExcludeGroupBox.Controls.Add(this.upgradeExcludeTextBox);\r
+                       this.upgradeExcludeGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.upgradeExcludeGroupBox.Location = new System.Drawing.Point(3, 3);\r
+                       this.upgradeExcludeGroupBox.Name = "upgradeExcludeGroupBox";\r
+                       this.upgradeExcludeGroupBox.Size = new System.Drawing.Size(434, 98);\r
+                       this.upgradeExcludeGroupBox.TabIndex = 0;\r
+                       this.upgradeExcludeGroupBox.TabStop = false;\r
+                       this.upgradeExcludeGroupBox.Text = "ソフト更新から除外するソフト";\r
+                       // \r
+                       // upgradeExcludeTextBox\r
+                       // \r
+                       this.upgradeExcludeTextBox.Dock = System.Windows.Forms.DockStyle.Fill;\r
+                       this.upgradeExcludeTextBox.Location = new System.Drawing.Point(3, 15);\r
+                       this.upgradeExcludeTextBox.Multiline = true;\r
+                       this.upgradeExcludeTextBox.Name = "upgradeExcludeTextBox";\r
+                       this.upgradeExcludeTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;\r
+                       this.upgradeExcludeTextBox.Size = new System.Drawing.Size(428, 80);\r
+                       this.upgradeExcludeTextBox.TabIndex = 0;\r
+                       this.upgradeExcludeTextBox.WordWrap = false;\r
+                       // \r
                        // errorProvider\r
                        // \r
                        this.errorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.AlwaysBlink;\r
                        this.cacheFolderGroupBox.PerformLayout();\r
                        this.cacheFolderTableLayoutPanel.ResumeLayout(false);\r
                        this.cacheFolderTableLayoutPanel.PerformLayout();\r
+                       this.upgradeTabPage.ResumeLayout(false);\r
+                       this.upgradeTableLayoutPanel.ResumeLayout(false);\r
+                       this.upgradeTableLayoutPanel.PerformLayout();\r
+                       this.upgradeExcludeGroupBox.ResumeLayout(false);\r
+                       this.upgradeExcludeGroupBox.PerformLayout();\r
                        ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();\r
                        this.ResumeLayout(false);\r
                }\r
+               private System.Windows.Forms.TextBox upgradeExcludeTextBox;\r
+               private System.Windows.Forms.GroupBox upgradeExcludeGroupBox;\r
+               private System.Windows.Forms.TableLayoutPanel upgradeTableLayoutPanel;\r
+               private System.Windows.Forms.TabPage upgradeTabPage;\r
                private System.Windows.Forms.LinkLabel cacheFolderOpenLinkLabel;\r
                private System.Windows.Forms.Button cacheFolderBrowseButton;\r
                private System.Windows.Forms.TextBox cacheFolderTextBox;\r
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