OSDN Git Service

AppliStation-GUI,インストール確認ダイアログで、依存関係上必要なソフトを選択しなかったとき、そのアイテムを赤字で長示するようにした。
authorttp <ttp@users.sourceforge.jp>
Sun, 21 Sep 2008 07:32:12 +0000 (07:32 +0000)
committerttp <ttp@users.sourceforge.jp>
Sun, 21 Sep 2008 07:32:12 +0000 (07:32 +0000)
git-svn-id: http://localhost/svn/AppliStation/trunk@980 34ed2c89-c49f-4a4b-abdb-c318350108cf

AppliStation/InstallationConfirmForm.cs
AppliStation/InstallationConfirmForm.resx

index 5422480..55c7f22 100644 (file)
@@ -190,9 +190,12 @@ namespace AppliStation
                {\r
                        System.Windows.Forms.ListView.CheckedListViewItemCollection checkeds = instsListView.CheckedItems;\r
                        \r
+                       runasCheckBox.Checked = GetShouldUseRunas();\r
+                       updateUseRunas();\r
+                                               \r
                        okButton.Enabled = (checkeds != null) && (checkeds.Count > 0);\r
                        \r
-                       updateDependeciesIsNeeded();\r
+                       checkUnselectedDependencies();\r
                }\r
                                \r
                void InstsListViewContextMenuStripOpening(object sender, System.ComponentModel.CancelEventArgs e)\r
@@ -283,18 +286,29 @@ namespace AppliStation
                        }\r
                }\r
                \r
-               private void updateDependeciesIsNeeded()\r
+               /// <summary>\r
+               /// 依存関係を確認してGUIに反映させる。\r
+               /// 選択されていないが依存関係上必要なソフトを探し出す。\r
+               /// </summary>\r
+               /// <returns>選択されていないが依存関係上必要なソフトの個数(何もない場合はゼロ)</returns>\r
+               private uint checkUnselectedDependencies()\r
                {\r
+                       uint retVal = 0;\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
+                               if ((pkg.IndexOf(((Installation) item.Tag).InstalledPackage) >= 0) && !item.Checked) {\r
+                                       item.ForeColor = Color.Red;\r
+                                       retVal++;\r
+                               } else {\r
+                                       item.ForeColor = Color.Empty;\r
                                }\r
+                       \r
                        }\r
+                       return retVal;\r
                }\r
                \r
                /// <summary>\r
@@ -363,6 +377,5 @@ namespace AppliStation
                }\r
                \r
                #endregion\r
-\r
        }\r
 }\r
index a6858d8..201fa42 100644 (file)
     <value>\r
         AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w\r
         LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0\r
-        ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACu\r
+        ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACo\r
         BAAAAk1TRnQBSQFMAwEBAAEEAQABBAEAAQ4BAAEOAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABOAMA\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
-        AWkBOQ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PgMAASgDAAE4AwABDgMAAQEBAAEBBQABcBcAA/8BAAHgBwABwAcA\r
-        AYAHAAGABwABgAcAAYAHAAHABwABwAEMBgAB4AEcBgAB4AEcBgAB4AEcBgAB4AEcBgAB4AEcBgAB8AE8\r
-        BgAL\r
+        AQ4DAAEBAQABIAUAAUABDB4AAwIBAwMSARkBIgIhATEDLAFEAVwCUAGwAXkBPAFRAekBewE9AU8B6AF6\r
+        AUEBTAHkAXkBQwFNAeIBfAFDAU8B4wFVAk4BobAAAw4BEwFRAkwBlgFlAlABwgF1AU0BSgHWAXkCSAHc\r
+        AVYBIgGQAfsCRAHxAf8CUQHyAf8CJAHvAf8CRgHyAf8CTQHyAf8BfAFDAU8B46wAAwEBAgFbAlEBrQGd\r
+        AWIBOAH/AZsBXQEvAf8BmwFbASsB/wGcAVsBKwH/AUABOAG7Af8CPwHxAf8C2AH8Af8CbgH1Af8C2AH8\r
+        Af8CRgHyAf8BeQFDAU0B4qwAASICIQExAZYBVgElAfsBnwFdASwB/wGiAV8BLQH/AaQBYAEuAf8BqAFo\r
+        ATgB/wFCATwBwgH/AiQB7wH/Al4B9AH/AvgB/gH/Am4B9QH/AiQB7wH/AXkBQwFNAeKsAAM3AVoBpQFm\r
+        AToB/wGfAV0BLAH/AaoBZAEwAf8BrQFmATEB/wG6AYgBXQH/AUYBQQHHAf8CSAHyAf8C2wH8Af8CXgH0\r
+        Af8C2AH8Af8CUQHyAf8BeQFDAU0B4qwAAxQBHAGVAUYBMwHzAakBYwEwAf8BrwFnATIB/wG1AWsBMwH/\r
+        AdIBswGbAf8BSQFHAc8B/wI7AfEB/wJIAfIB/wIkAe8B/wI/AfEB/wJEAfEB/wF5AUMBTQHisAABVQJO\r
+        AaEBrQFqATkB/wGwAWgBMwH/AaUBcAFHAf8BmgKcAf8BTwFUAasB/wE9ATcBvAH/AUEBOAG7Af8BQgE6\r
+        AbwB/wF7ATgBVAHtAXcBSgFPAdoBTgJKAZGwAAMLAQ8BZwJQAcMBkQFzAVoB/wE4AYUBrwH/ASwBlAHS\r
+        Af8BKgGUAdMB/wErAXkBrQH/AXIBYwFbAf4BVQJOAaEDAQECvAADCgENAXgBRwFQAeoBNgGhAeIB/wE/\r
+        AaYB4wH/ATwBpAHjAf8BLAGcAeAB/wFmAVIBZgH0AxoBJMAAAT0CPAFoATkBowHiAf8BVAGvAeYB/wFv\r
+        AbwB6gH/AWoBuQHqAf8BSAGqAeUB/wEuAZ4B4QH/AUgCRgGCwAABSQJHAYMBQwGoAeQB/wFpAbkB6QH/\r
+        AZ0BzwHxAf8BkAHJAe8B/wFaAbIB5wH/ATIBoAHhAf8BUQJMAZbAAAM2AVkBPgGkAeIB/wFeAbQB6AH/\r
+        AYUBxAHtAf8BeAHAAewB/wFRAa4B5gH/ATEBnwHhAf8BQwJBAXXDAAEBAWQCUQG+AUcBqQHlAf8BUgGv\r
+        AeYB/wFOAawB5QH/AT4BpQHjAf8BbgJRAc4DBgEIxAADCgENAVMCTAGaAXACUAHQAXICTwHUAVUCTgGh\r
+        AxEBF7gAAUIBTQE+BwABPgMAASgDAAE4AwABDgMAAQEBAAEBBQABcBcAA/8BAAHgBwABwAcAAYAHAAGA\r
+        BwABgAcAAYAHAAHABwABwAEMBgAB4AEcBgAB4AEcBgAB4AEcBgAB4AEcBgAB4AEcBgAB8AE8BgAL\r
 </value>\r
   </data>\r
   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r