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

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

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

--- 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 @@
 
 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 @@
         }
 
 
-        #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 @@
                     break;
             }
         }
-
         private void btnCalcStartAddr_Click(object sender, EventArgs e)
         {
             long start = 0;
@@ -102,15 +85,15 @@
             {
                 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 @@
                     break;
             }
         }
-
         private void btnCalcDumpSize_Click(object sender, EventArgs e)
         {
             ulong start = txtStart.Value;
@@ -140,7 +122,6 @@
                     break;
             }
         }
-
         private void btnDumpRam_Click(object sender, EventArgs e)
         {
             if (this.AcceptedProcess == null)
@@ -152,7 +133,7 @@
             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)

 

  ViewVC Help
Powered by ViewVC 1.1.22