/[RomCheater]/trunk/RomCheater/Docking/MemorySearch/AddressValuePairList.cs
ViewVC logotype

Diff of /trunk/RomCheater/Docking/MemorySearch/AddressValuePairList.cs

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

--- trunk/RomCheater/Docking/MemorySearch/AddressValuePairList.cs	2012/06/03 13:21:51	243
+++ trunk/RomCheater/Docking/MemorySearch/AddressValuePairList.cs	2012/06/03 16:09:05	249
@@ -423,7 +423,7 @@
 
                 SearchDataTypes ValueType = tmp_result.ValueType;
 
-                ResultDataType result = new ResultDataType(Convert.ToUInt32(Address, 16), Convert.ToBoolean(Frozen), Value, ValueType);
+                ResultDataType result = new ResultDataType(Convert.ToInt32(Address, 16), Convert.ToBoolean(Frozen), Value, ValueType);
                 result.IsFrozen = true;
                 this.Items[index].Tag = result;
                 ResultItem temp = (ResultItem)this.Items[index];
@@ -483,9 +483,10 @@
                 {
                     iter = (ResultItem)this.Items[index];
                 }
-                GenericMemoryProvider provider = new GenericMemoryProvider((IAcceptsProcessAndConfig)this);            
+                GenericMemoryProvider provider = new GenericMemoryProvider((IAcceptsProcessAndConfig)this);
+                provider.OpenProvider();
                 ResultDataType result = (ResultDataType)iter.Tag;
-                uint Address = result.Address;
+                int Address = result.Address;
                 byte[] bitData = new byte[] { };
                 switch (result.ValueType)
                 {
@@ -506,6 +507,7 @@
                         else { provider.PatchMemory(Address, Convert.ToInt64(result.Value)); }
                         break;
                 }
+                provider.CloseProvider();
             }
         }
 
@@ -652,38 +654,38 @@
             switch (bit_size)
             {
                 case SearchDataTypes._8bits:
-                    if (unsigned) { resulttype = new ResultDataType(Convert.ToUInt32(address, 16), _frozen, Convert.ToByte(value, 16)); }
-                    else { resulttype = new ResultDataType(Convert.ToUInt32(address, 16), _frozen, Convert.ToByte(value, 16)); }
+                    if (unsigned) { resulttype = new ResultDataType(Convert.ToInt32(address, 16), _frozen, Convert.ToByte(value, 16)); }
+                    else { resulttype = new ResultDataType(Convert.ToInt32(address, 16), _frozen, Convert.ToByte(value, 16)); }
                     break;
                 case SearchDataTypes._16bits:
-                    if (unsigned) { resulttype = new ResultDataType(Convert.ToUInt32(address, 16), _frozen, Convert.ToUInt16(value, 16)); }
-                    else { resulttype = new ResultDataType(Convert.ToUInt32(address, 16), _frozen, Convert.ToInt16(value, 16)); }
+                    if (unsigned) { resulttype = new ResultDataType(Convert.ToInt32(address, 16), _frozen, Convert.ToUInt16(value, 16)); }
+                    else { resulttype = new ResultDataType(Convert.ToInt32(address, 16), _frozen, Convert.ToInt16(value, 16)); }
                     break;
                 case SearchDataTypes._32bits:
-                    if (unsigned) { resulttype = new ResultDataType(Convert.ToUInt32(address, 16), _frozen, Convert.ToUInt32(value, 16)); }
-                    else { resulttype = new ResultDataType(Convert.ToUInt32(address, 16), _frozen, Convert.ToInt32(value, 16)); }
+                    if (unsigned) { resulttype = new ResultDataType(Convert.ToInt32(address, 16), _frozen, Convert.ToUInt32(value, 16)); }
+                    else { resulttype = new ResultDataType(Convert.ToInt32(address, 16), _frozen, Convert.ToInt32(value, 16)); }
                     break;
                 case SearchDataTypes._64bits:
-                    if (unsigned) { resulttype = new ResultDataType(Convert.ToUInt32(address, 16), _frozen, Convert.ToUInt64(value, 16)); }
-                    else { resulttype = new ResultDataType(Convert.ToUInt32(address, 16), _frozen, Convert.ToInt64(value, 16)); }
+                    if (unsigned) { resulttype = new ResultDataType(Convert.ToInt32(address, 16), _frozen, Convert.ToUInt64(value, 16)); }
+                    else { resulttype = new ResultDataType(Convert.ToInt32(address, 16), _frozen, Convert.ToInt64(value, 16)); }
                     break;
 
             }
             this.Tag = resulttype;
         }
-        public ResultItem(uint address)
+        public ResultItem(int address)
             : base()
         {
             this.initialize();
             this.SubItems.Add(string.Format("0x{0:x8}", address));
         }
-        public ResultItem(uint address, bool frozen)
+        public ResultItem(int address, bool frozen)
             : base()
         {
             this.initialize(frozen);
             this.SubItems.Add(string.Format("0x{0:x8}", address));
         }
-        public ResultItem(uint address, bool frozen, byte value)
+        public ResultItem(int address, bool frozen, byte value)
             : base()
         {
             this.initialize(frozen);
@@ -696,7 +698,7 @@
             ResultDataType resulttype = new ResultDataType(address, frozen, value);
             this.Tag = resulttype;
         }
-        public ResultItem(uint address, bool frozen, sbyte value)
+        public ResultItem(int address, bool frozen, sbyte value)
             : base()
         {
             this.initialize(frozen);
@@ -709,7 +711,7 @@
             ResultDataType resulttype = new ResultDataType(address, frozen, value);
             this.Tag = resulttype;
         }
-        public ResultItem(uint address, bool frozen, ushort value)
+        public ResultItem(int address, bool frozen, ushort value)
             : base()
         {
             this.initialize(frozen);
@@ -722,7 +724,7 @@
             ResultDataType resulttype = new ResultDataType(address, frozen, value);
             this.Tag = resulttype;
         }
-        public ResultItem(uint address, bool frozen, short value)
+        public ResultItem(int address, bool frozen, short value)
             : base()
         {
             this.initialize(frozen);
@@ -735,7 +737,7 @@
             ResultDataType resulttype = new ResultDataType(address, frozen, value);
             this.Tag = resulttype;
         }
-        public ResultItem(uint address, bool frozen, uint value)
+        public ResultItem(int address, bool frozen, uint value)
             : base()
         {
             this.initialize(frozen);
@@ -748,7 +750,7 @@
             ResultDataType resulttype = new ResultDataType(address, frozen, value);
             this.Tag = resulttype;
         }
-        public ResultItem(uint address, bool frozen, int value)
+        public ResultItem(int address, bool frozen, int value)
             : base()
         {
             this.initialize(frozen);
@@ -761,7 +763,7 @@
             ResultDataType resulttype = new ResultDataType(address, frozen, value);
             this.Tag = resulttype;
         }
-        public ResultItem(uint address, bool frozen, ulong value)
+        public ResultItem(int address, bool frozen, ulong value)
             : base()
         {
             this.initialize(frozen);
@@ -774,7 +776,7 @@
             ResultDataType resulttype = new ResultDataType(address, frozen, value);
             this.Tag = resulttype;
         }
-        public ResultItem(uint address, bool frozen, long value)
+        public ResultItem(int address, bool frozen, long value)
             : base()
         {
             this.initialize(frozen);

 

  ViewVC Help
Powered by ViewVC 1.1.22