/[RomCheater]/trunk/RomCheater/Docking/FloatingMemorySearcher.cs
ViewVC logotype

Diff of /trunk/RomCheater/Docking/FloatingMemorySearcher.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2012/06/03 22:01:05	275
+++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2012/06/03 22:30:23	277
@@ -70,6 +70,7 @@
             PATCH_RESULTS_LIST = 0x3001,
             UKNOWN_RESULTS_LIST = 0x3001
         }
+        SearchType SearchArgs;
         static int col_Found_Address = 1;
         static int col_Found_Value = 2;
         static int col_Found_Frozen = 3;
@@ -985,5 +986,33 @@
                 OnBrowseMemoryRegion(new BrowseMemoryRegionEvent(rdt.Address));
             }
         }
+
+        private void mnuAddedResults_Opening(object sender, CancelEventArgs e)
+        {
+            if (!(lstPatchList.Items.Count > 0)) { mnuItemRemoveResult.Visible = false; e.Cancel = true; }
+            if (!(lstPatchList.Items.Count > 0)) { mnuItemPatchSelectedEntry.Visible = false; e.Cancel = true; }
+            if (e.Cancel) return;
+            if (lstPatchList.Items.Count > 0) mnuItemRemoveResult.Visible = true;
+            if (lstPatchList.Items.Count > 0) mnuItemPatchSelectedEntry.Visible = true;
+
+            if (!(lstPatchList.Items.Count > 0)) { mnuItemFreezeSelectedPatches.Visible = false; e.Cancel = true; }
+            if (!(lstPatchList.Items.Count > 0)) { mnuItemThawSelectedPatches.Visible = false; e.Cancel = true; }
+            if (e.Cancel) return;
+
+            if (lstPatchList.Items.Count > 0) mnuItemFreezeSelectedPatches.Visible = true;
+            if (lstPatchList.Items.Count > 0) mnuItemThawSelectedPatches.Visible = true;
+
+            if (lstPatchList.SelectedItems.Count == 0) e.Cancel = true;
+            if (e.Cancel) return;
+
+        }
+
+        private void mnuResults_Opening(object sender, CancelEventArgs e)
+        {
+            if (!(lstResults.Items.Count > 0)) e.Cancel = true;
+            if (lstResults.SelectedItems.Count == 0) e.Cancel = true;
+            if (SearchArgs == null) e.Cancel = true;
+            if (e.Cancel) return;
+        }
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22