ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater/Docking/FloatingRamDumperDialog.cs
(Generate patch)

Comparing trunk/RomCheater/Docking/FloatingRamDumperDialog.cs (file contents):
Revision 195 by william, Mon May 28 08:49:42 2012 UTC vs.
Revision 196 by william, Thu May 31 05:52:41 2012 UTC

--- trunk/RomCheater/Docking/FloatingRamDumperDialog.cs	2012/05/28 10:37:53	195
+++ trunk/RomCheater/Docking/FloatingRamDumperDialog.cs	2012/05/31 05:52:41	196
@@ -15,7 +15,7 @@ using System.Reflection;
 
 namespace RomCheater.Docking
 {
-    public partial class FloatingRamDumperDialog : DockContent, IProcessConfig
+    public partial class FloatingRamDumperDialog : DockContent, IProcessConfig, IAcceptsPlugin<IConfigPlugin>
     {
         #region sub-classes
         private const int BYTE_CORRECTION_VALUE = 23;
@@ -40,33 +40,17 @@ namespace RomCheater.Docking
         }
 
 
-        #region IProcessConfig Members'
+        #region IProcessConfig Members
         public Process AcceptedProcess { get; set; }
         #endregion
         #region IAcceptsPlugin<IConfigPlugin> Members
         public IConfigPlugin AcceptedPlugin { get; set; }
         #endregion
-
-        private void radioBTNBytes_CheckedChanged(object sender, EventArgs e)
-        {
-            dumpSize = DumpSize.Bytes;
-        }
-
-        private void radioBTNKiloBytes_CheckedChanged(object sender, EventArgs e)
-        {
-            dumpSize = DumpSize.KiloBytes;
-        }
-
-        private void radioBTNMegaBytes_CheckedChanged(object sender, EventArgs e)
-        {
-            dumpSize = DumpSize.MegaBytes;
-        }
-
-        private void radioBTNGigaBytes_CheckedChanged(object sender, EventArgs e)
-        {
-            dumpSize = DumpSize.GigaBytes;
-        }
-
+        #region ram-dump specific
+        private void radioBTNBytes_CheckedChanged(object sender, EventArgs e) { dumpSize = DumpSize.Bytes; }
+        private void radioBTNKiloBytes_CheckedChanged(object sender, EventArgs e) { dumpSize = DumpSize.KiloBytes; }
+        private void radioBTNMegaBytes_CheckedChanged(object sender, EventArgs e) { dumpSize = DumpSize.MegaBytes; }
+        private void radioBTNGigaBytes_CheckedChanged(object sender, EventArgs e) { dumpSize = DumpSize.GigaBytes; }
         private void btnCalcEndAddr_Click(object sender, EventArgs e)
         {
             ulong start = 0;
@@ -92,7 +76,6 @@ namespace RomCheater.Docking
                     break;
             }
         }
-
         private void btnCalcStartAddr_Click(object sender, EventArgs e)
         {
             long start = 0;
@@ -102,15 +85,15 @@ namespace RomCheater.Docking
             {
                 case DumpSize.Bytes:
                     start = (long)((double)end - (Convert.ToDouble(txtDumpSize.Text) * 1.0)) + BYTE_CORRECTION_VALUE;
-                    txtStart.Value = (ulong)start;;
+                    txtStart.Value = (ulong)start; ;
                     break;
                 case DumpSize.KiloBytes:
                     start = (long)((double)end - (Convert.ToDouble(txtDumpSize.Text) * 1000.0)) + BYTE_CORRECTION_VALUE;
-                    txtStart.Value = (ulong)start;;
+                    txtStart.Value = (ulong)start; ;
                     break;
                 case DumpSize.MegaBytes:
                     start = (long)((double)end - (Convert.ToDouble(txtDumpSize.Text) * 1000000.0)) + BYTE_CORRECTION_VALUE;
-                    txtStart.Value = (ulong)start;;
+                    txtStart.Value = (ulong)start; ;
                     break;
                 case DumpSize.GigaBytes:
                     start = (long)((double)end - (Convert.ToDouble(txtDumpSize.Text) * 1000000000.0)) + BYTE_CORRECTION_VALUE;
@@ -118,7 +101,6 @@ namespace RomCheater.Docking
                     break;
             }
         }
-
         private void btnCalcDumpSize_Click(object sender, EventArgs e)
         {
             ulong start = txtStart.Value;
@@ -140,7 +122,6 @@ namespace RomCheater.Docking
                     break;
             }
         }
-
         private void btnDumpRam_Click(object sender, EventArgs e)
         {
             if (this.AcceptedProcess == null)
@@ -152,7 +133,7 @@ namespace RomCheater.Docking
             if (result != DialogResult.OK) return;
             DumpRam(txtStart.Value, txtEnd.Value, dumpsaver.FileName);
         }
-
+        #endregion
 
         #region memory support
         private void DumpRam(ulong start, ulong end, string filename)