OSDN Git Service

AppliStation-GUI,インストール確認ダイアログで依存関係のインストールのチェッ7を外せないようにした。
authorttp <ttp@users.sourceforge.jp>
Sat, 13 Sep 2008 16:01:16 +0000 (16:01 +0000)
committerttp <ttp@users.sourceforge.jp>
Sat, 13 Sep 2008 16:01:16 +0000 (16:01 +0000)
 * もうちょっとマシなFeedbackのUIにするのが好ましい。
 * 意外にも依存関係解決に時間がかからないので、そこは省いてしまうことにした。

git-svn-id: http://localhost/svn/AppliStation/trunk@978 34ed2c89-c49f-4a4b-abdb-c318350108cf

AppliStation/InstallationConfirmForm.Designer.cs
AppliStation/InstallationConfirmForm.cs
AppliStation/InstallationConfirmForm.resx

index 9b3653a..145cb1b 100644 (file)
@@ -158,9 +158,9 @@ namespace AppliStation
                        this.instsListView.TabIndex = 2;\r
                        this.instsListView.UseCompatibleStateImageBehavior = false;\r
                        this.instsListView.View = System.Windows.Forms.View.Details;\r
+                       this.instsListView.DrawColumnHeader += new System.Windows.Forms.DrawListViewColumnHeaderEventHandler(this.InstsListViewDrawColumnHeader);\r
                        this.instsListView.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.InstsListViewItemChecked);\r
                        this.instsListView.DrawSubItem += new System.Windows.Forms.DrawListViewSubItemEventHandler(this.InstsListViewDrawSubItem);\r
-                       this.instsListView.DrawColumnHeader += new System.Windows.Forms.DrawListViewColumnHeaderEventHandler(this.InstsListViewDrawColumnHeader);\r
                        // \r
                        // nameColumnHeader\r
                        // \r
@@ -190,32 +190,32 @@ namespace AppliStation
                                                                        this.selectAllInstsStripMenuItem,\r
                                                                        this.unselectAllInstsStripMenuItem});\r
                        this.instListViewContextMenuStrip.Name = "packageListViewContextMenuStrip";\r
-                       this.instListViewContextMenuStrip.Size = new System.Drawing.Size(220, 76);\r
+                       this.instListViewContextMenuStrip.Size = new System.Drawing.Size(263, 76);\r
                        this.instListViewContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.InstsListViewContextMenuStripOpening);\r
                        // \r
                        // silentInstallStripMenuItem\r
                        // \r
                        this.silentInstallStripMenuItem.Name = "silentInstallStripMenuItem";\r
-                       this.silentInstallStripMenuItem.Size = new System.Drawing.Size(219, 22);\r
+                       this.silentInstallStripMenuItem.Size = new System.Drawing.Size(262, 22);\r
                        this.silentInstallStripMenuItem.Text = "サイレントインストールをする(&S)";\r
                        this.silentInstallStripMenuItem.Click += new System.EventHandler(this.SilentInstallStripMenuItemClick);\r
                        // \r
                        // instListToolStripSeparator\r
                        // \r
                        this.instListToolStripSeparator.Name = "instListToolStripSeparator";\r
-                       this.instListToolStripSeparator.Size = new System.Drawing.Size(216, 6);\r
+                       this.instListToolStripSeparator.Size = new System.Drawing.Size(259, 6);\r
                        // \r
                        // selectAllInstsStripMenuItem\r
                        // \r
                        this.selectAllInstsStripMenuItem.Name = "selectAllInstsStripMenuItem";\r
-                       this.selectAllInstsStripMenuItem.Size = new System.Drawing.Size(219, 22);\r
+                       this.selectAllInstsStripMenuItem.Size = new System.Drawing.Size(262, 22);\r
                        this.selectAllInstsStripMenuItem.Text = "全て選択(&A)";\r
                        this.selectAllInstsStripMenuItem.Click += new System.EventHandler(this.SelectAllInstsStripMenuItemClick);\r
                        // \r
                        // unselectAllInstsStripMenuItem\r
                        // \r
                        this.unselectAllInstsStripMenuItem.Name = "unselectAllInstsStripMenuItem";\r
-                       this.unselectAllInstsStripMenuItem.Size = new System.Drawing.Size(219, 22);\r
+                       this.unselectAllInstsStripMenuItem.Size = new System.Drawing.Size(262, 22);\r
                        this.unselectAllInstsStripMenuItem.Text = "全ての選択を解除(&U)";\r
                        this.unselectAllInstsStripMenuItem.Click += new System.EventHandler(this.UnselectAllInstsStripMenuItemClick);\r
                        // \r
index 5b60704..4127c7a 100644 (file)
@@ -189,6 +189,8 @@ namespace AppliStation
                        System.Windows.Forms.ListView.CheckedListViewItemCollection checkeds = instsListView.CheckedItems;\r
                        \r
                        okButton.Enabled = (checkeds != null) && (checkeds.Count > 0);\r
+                       \r
+                       updateDependeciesIsNeeded();\r
                }\r
                                \r
                void InstsListViewContextMenuStripOpening(object sender, System.ComponentModel.CancelEventArgs e)\r
@@ -251,7 +253,7 @@ namespace AppliStation
                {\r
                        System.Threading.Thread thread = new System.Threading.Thread(\r
                                new System.Threading.ThreadStart(resolveDependecies));\r
-                       thread.Start();\r
+                       thread.Start(); \r
                }\r
                \r
                /// <summary>\r
@@ -270,7 +272,25 @@ namespace AppliStation
                                \r
                                requiredInstallations = dependencies;\r
                                \r
-                               updateInstsListView();\r
+                               if (InvokeRequired) {\r
+                                       Invoke(new MethodInvoker(updateInstsListView));\r
+                               } else {\r
+                                       updateInstsListView();\r
+                               }\r
+                       }\r
+               }\r
+               \r
+               private void updateDependeciesIsNeeded()\r
+               {\r
+                       List<Package> pkg = new List<Package>();\r
+                       foreach (Installation inst in DependeciesResolver.CreateRequiresInstallations(CheckedInstallations, pkgListMan)) {\r
+                               pkg.Add(inst.InstalledPackage);\r
+                       }\r
+                       \r
+                       foreach (ListViewItem item in instsListView.Items) {\r
+                               if (pkg.IndexOf(((Installation) item.Tag).InstalledPackage) >= 0) {\r
+                                       item.Checked = true;\r
+                               }\r
                        }\r
                }\r
                \r
index ed303b4..a6858d8 100644 (file)
     <value>\r
         AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w\r
         LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0\r
-        ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADQ\r
+        ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACu\r
         BAAAAk1TRnQBSQFMAwEBAAEEAQABBAEAAQ4BAAEOAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABOAMA\r
-        AQ4DAAEBAQABIAUAAUABDB4AAdECAAEDAcACAgEZAbECBgExAacCDAFEAY4CLQGwAYoBJQFHAekBkAEj\r
-        AUUB6AGQASYBPwHkAZYBKAE6AeIBlAEmAUEB4wGOAisBobAAAcQCAQETAY4CJwGWAZMCLgHCAZsBLAEo\r
-        AdYBnAIpAdwBVgEiAZMB+wJHAfEB/wJUAfIB/wInAe8B/wJJAfIB/wJQAfIB/wGUASYBQQHjrAAB0QIA\r
-        AQIBjwItAa0BnQFlATsB/wGbAWABMgH/AZsBXgEuAf8BnAFeAS4B/wFDATsBuwH/AkIB8QH/AtgB/AH/\r
-        AnEB9QH/AtgB/AH/AkkB8gH/AZYBKAE6AeKsAAGxAgYBMQGcAVYBJQH7AZ8BYAEvAf8BogFiATAB/wGk\r
-        AWMBMQH/AagBawE7Af8BRQE/AcIB/wInAe8B/wJhAfQB/wL4Af4B/wJxAfUB/wInAe8B/wGWASgBOgHi\r
-        rAABnQITAVoBpQFpAT0B/wGfAWABLwH/AaoBZwEzAf8BrQFpATQB/wG6AYgBYAH/AUkBRAHHAf8CSwHy\r
-        Af8C2wH8Af8CYQH0Af8C2AH8Af8CVAHyAf8BlgEoAToB4qwAAb4CAgEcAagBPgEmAfMBqQFmATMB/wGv\r
-        AWoBNQH/AbUBbgE2Af8B0gGzAZsB/wFMAUoBzwH/Aj4B8QH/AksB8gH/AicB7wH/AkIB8QH/AkcB8QH/\r
-        AZYBKAE6AeKwAAGOAisBoQGtAW0BPAH/AbABawE2Af8BpQFzAUoB/wGaApwB/wFSAVcBqwH/AUABOgG8\r
-        Af8BRAE7AbsB/wFFAT0BvAH/AYkBJQFRAe0BmAEqATYB2gGOAicBkbAAAcgCAQEPAZUCLgHDAZEBdgFd\r
-        Af8BOwGFAa8B/wEvAZQB0gH/AS0BlAHTAf8BLgF8Aa0B/wFyAWMBWwH+AY4CKwGhAdECAAECvAAByQIB\r
-        AQ0BiAE5AUcB6gE5AaEB4gH/AUIBpgHjAf8BPwGkAeMB/wEvAZwB4AH/AWsBTgFtAfQBuQIEASTAAAGY\r
-        AhgBaAE8AaMB4gH/AVcBrwHmAf8BcgG8AeoB/wFtAbkB6gH/AUsBqgHlAf8BMQGeAeEB/wGQAiIBgsAA\r
-        AZECIgGDAUYBqAHkAf8BbAG5AekB/wGdAc8B8QH/AZAByQHvAf8BXQGyAecB/wE1AaAB4QH/AY4CJwGW\r
-        wAABnQISAVkBQQGkAeIB/wFhAbQB6AH/AYUBxAHtAf8BewHAAewB/wFUAa4B5gH/ATQBnwHhAf8BkwId\r
-        AXXAAAHSAgABAQGUAi8BvgFKAakB5QH/AVUBrwHmAf8BUQGsAeUB/wFBAaUB4wH/AZcBLwEwAc4BzAIA\r
-        AQjEAAHJAgEBDQGPAioBmgGYAS4BMQHQAZkBLwE0AdQBjgIrAaEBwgICARe4AAFCAU0BPgcAAT4DAAEo\r
-        AwABOAMAAQ4DAAEBAQABAQUAAXAXAAP/AQAB4AcAAcAHAAGABwABgAcAAYAHAAGABwABwAcAAcABDAYA\r
-        AeABHAYAAeABHAYAAeABHAYAAeABHAYAAeABHAYAAfABPAYACw==\r
+        AQ4DAAEBAQABIAUAAUABDB4AAwIBAwMSARkBIgIhATEBLQIsAUQBYgJLAbABfgE3AU8B6QGBATcBTQHo\r
+        AYABOgFJAeQBgQE8AUgB4gGCATwBSwHjAVsCSwGhsAADDgETAVYCSQGWAW0CSwHCAX0BRgFDAdYBggJB\r
+        AdwBVgEiAZEB+wJFAfEB/wJSAfIB/wIlAe8B/wJHAfIB/wJOAfIB/wGCATwBSwHjrAADAQECAWECTAGt\r
+        AZ0BYwE5Af8BmwFeATAB/wGbAVwBLAH/AZwBXAEsAf8BQQE5AbsB/wJAAfEB/wLYAfwB/wJvAfUB/wLY\r
+        AfwB/wJHAfIB/wGBATwBSAHirAABIgIhATEBmAFWASUB+wGfAV4BLQH/AaIBYAEuAf8BpAFhAS8B/wGo\r
+        AWkBOQH/AUMBPQHCAf8CJQHvAf8CXwH0Af8C+AH+Af8CbwH1Af8CJQHvAf8BgQE8AUgB4qwAATgCNgFa\r
+        AaUBZwE7Af8BnwFeAS0B/wGqAWUBMQH/Aa0BZwEyAf8BugGIAV4B/wFHAUIBxwH/AkkB8gH/AtsB/AH/\r
+        Al8B9AH/AtgB/AH/AlIB8gH/AYEBPAFIAeKsAAMUARwBmgFDAS4B8wGpAWQBMQH/Aa8BaAEzAf8BtQFs\r
+        ATQB/wHSAbMBmwH/AUoBSAHPAf8CPAHxAf8CSQHyAf8CJQHvAf8CQAHxAf8CRQHxAf8BgQE8AUgB4rAA\r
+        AVsCSwGhAa0BawE6Af8BsAFpATQB/wGlAXEBSAH/AZoCnAH/AVABVQGrAf8BPgE4AbwB/wFCATkBuwH/\r
+        AUMBOwG8Af8BfwEzAVMB7QF+AUQBSQHaAVMCRwGRsAADCwEPAW8CSQHDAZEBdAFbAf8BOQGFAa8B/wEt\r
+        AZQB0gH/ASsBlAHTAf8BLAF6Aa0B/wFyAWMBWwH+AVsCSwGhAwEBArwAAwoBDQF8AUMBTQHqATcBoQHi\r
+        Af8BQAGmAeMB/wE9AaQB4wH/AS0BnAHgAf8BZwFRAWcB9AMaASTAAAE/AjwBaAE6AaMB4gH/AVUBrwHm\r
+        Af8BcAG8AeoB/wFrAbkB6gH/AUkBqgHlAf8BLwGeAeEB/wFLAkQBgsAAAU0CRQGDAUQBqAHkAf8BagG5\r
+        AekB/wGdAc8B8QH/AZAByQHvAf8BWwGyAecB/wEzAaAB4QH/AVYCSQGWwAABNwI1AVkBPwGkAeIB/wFf\r
+        AbQB6AH/AYUBxAHtAf8BeQHAAewB/wFSAa4B5gH/ATIBnwHhAf8BRQJAAXXDAAEBAWwCSwG+AUgBqQHl\r
+        Af8BUwGvAeYB/wFPAawB5QH/AT8BpQHjAf8BdwJKAc4DBgEIxAADCgENAVgCSQGaAXgCSQHQAXoCSAHU\r
+        AVsCSwGhAxEBF7gAAUIBTQE+BwABPgMAASgDAAE4AwABDgMAAQEBAAEBBQABcBcAA/8BAAHgBwABwAcA\r
+        AYAHAAGABwABgAcAAYAHAAHABwABwAEMBgAB4AEcBgAB4AEcBgAB4AEcBgAB4AEcBgAB4AEcBgAB8AE8\r
+        BgAL\r
 </value>\r
   </data>\r
   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r