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

# Line 15 | Line 15 | using System.Reflection;
15  
16   namespace RomCheater.Docking
17   {
18 <    public partial class FloatingRamDumperDialog : DockContent, IProcessConfig
18 >    public partial class FloatingRamDumperDialog : DockContent, IProcessConfig, IAcceptsPlugin<IConfigPlugin>
19      {
20          #region sub-classes
21          private const int BYTE_CORRECTION_VALUE = 23;
# Line 40 | Line 40 | namespace RomCheater.Docking
40          }
41  
42  
43 <        #region IProcessConfig Members'
43 >        #region IProcessConfig Members
44          public Process AcceptedProcess { get; set; }
45          #endregion
46          #region IAcceptsPlugin<IConfigPlugin> Members
47          public IConfigPlugin AcceptedPlugin { get; set; }
48          #endregion
49 <
50 <        private void radioBTNBytes_CheckedChanged(object sender, EventArgs e)
51 <        {
52 <            dumpSize = DumpSize.Bytes;
53 <        }
54 <
55 <        private void radioBTNKiloBytes_CheckedChanged(object sender, EventArgs e)
56 <        {
57 <            dumpSize = DumpSize.KiloBytes;
58 <        }
59 <
60 <        private void radioBTNMegaBytes_CheckedChanged(object sender, EventArgs e)
61 <        {
62 <            dumpSize = DumpSize.MegaBytes;
63 <        }
64 <
65 <        private void radioBTNGigaBytes_CheckedChanged(object sender, EventArgs e)
66 <        {
67 <            dumpSize = DumpSize.GigaBytes;
68 <        }
69 <
49 >        #region ram-dump specific
50 >        private void radioBTNBytes_CheckedChanged(object sender, EventArgs e) { dumpSize = DumpSize.Bytes; }
51 >        private void radioBTNKiloBytes_CheckedChanged(object sender, EventArgs e) { dumpSize = DumpSize.KiloBytes; }
52 >        private void radioBTNMegaBytes_CheckedChanged(object sender, EventArgs e) { dumpSize = DumpSize.MegaBytes; }
53 >        private void radioBTNGigaBytes_CheckedChanged(object sender, EventArgs e) { dumpSize = DumpSize.GigaBytes; }
54          private void btnCalcEndAddr_Click(object sender, EventArgs e)
55          {
56              ulong start = 0;
# Line 92 | Line 76 | namespace RomCheater.Docking
76                      break;
77              }
78          }
95
79          private void btnCalcStartAddr_Click(object sender, EventArgs e)
80          {
81              long start = 0;
# Line 102 | Line 85 | namespace RomCheater.Docking
85              {
86                  case DumpSize.Bytes:
87                      start = (long)((double)end - (Convert.ToDouble(txtDumpSize.Text) * 1.0)) + BYTE_CORRECTION_VALUE;
88 <                    txtStart.Value = (ulong)start;;
88 >                    txtStart.Value = (ulong)start; ;
89                      break;
90                  case DumpSize.KiloBytes:
91                      start = (long)((double)end - (Convert.ToDouble(txtDumpSize.Text) * 1000.0)) + BYTE_CORRECTION_VALUE;
92 <                    txtStart.Value = (ulong)start;;
92 >                    txtStart.Value = (ulong)start; ;
93                      break;
94                  case DumpSize.MegaBytes:
95                      start = (long)((double)end - (Convert.ToDouble(txtDumpSize.Text) * 1000000.0)) + BYTE_CORRECTION_VALUE;
96 <                    txtStart.Value = (ulong)start;;
96 >                    txtStart.Value = (ulong)start; ;
97                      break;
98                  case DumpSize.GigaBytes:
99                      start = (long)((double)end - (Convert.ToDouble(txtDumpSize.Text) * 1000000000.0)) + BYTE_CORRECTION_VALUE;
# Line 118 | Line 101 | namespace RomCheater.Docking
101                      break;
102              }
103          }
121
104          private void btnCalcDumpSize_Click(object sender, EventArgs e)
105          {
106              ulong start = txtStart.Value;
# Line 140 | Line 122 | namespace RomCheater.Docking
122                      break;
123              }
124          }
143
125          private void btnDumpRam_Click(object sender, EventArgs e)
126          {
127              if (this.AcceptedProcess == null)
# Line 152 | Line 133 | namespace RomCheater.Docking
133              if (result != DialogResult.OK) return;
134              DumpRam(txtStart.Value, txtEnd.Value, dumpsaver.FileName);
135          }
136 <
136 >        #endregion
137  
138          #region memory support
139          private void DumpRam(ulong start, ulong end, string filename)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines