Old Cheat system gone and deleted!
This commit is contained in:
parent
d4323a8ea5
commit
1cf87f33d8
|
@ -920,15 +920,6 @@
|
|||
<Compile Include="TI83tools\TI83KeyPad.Designer.cs">
|
||||
<DependentUpon>TI83KeyPad.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Cheat.cs" />
|
||||
<Compile Include="tools\CheatList.cs" />
|
||||
<Compile Include="tools\Cheats.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Cheats.Designer.cs">
|
||||
<DependentUpon>Cheats.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\MemoryPulse.cs" />
|
||||
<Compile Include="tools\MemoryViewer.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
|
@ -1033,10 +1024,6 @@
|
|||
<DependentUpon>TI83KeyPad.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Cheats.resx">
|
||||
<DependentUpon>Cheats.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\TraceLogger.resx">
|
||||
<DependentUpon>TraceLogger.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
|
@ -920,15 +920,6 @@
|
|||
<Compile Include="TI83tools\TI83KeyPad.Designer.cs">
|
||||
<DependentUpon>TI83KeyPad.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Cheat.cs" />
|
||||
<Compile Include="tools\CheatList.cs" />
|
||||
<Compile Include="tools\Cheats.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Cheats.Designer.cs">
|
||||
<DependentUpon>Cheats.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\MemoryPulse.cs" />
|
||||
<Compile Include="tools\MemoryViewer.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
|
@ -1033,10 +1024,6 @@
|
|||
<DependentUpon>TI83KeyPad.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Cheats.resx">
|
||||
<DependentUpon>Cheats.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\TraceLogger.resx">
|
||||
<DependentUpon>TraceLogger.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
|
@ -224,58 +224,58 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (Global.Emulator is Genesis)
|
||||
{
|
||||
LegacyCheat c = new LegacyCheat();
|
||||
LegacyCheat d = new LegacyCheat();
|
||||
if (cheatname.Text.Length > 0)
|
||||
string NAME;
|
||||
int ADDRESS = 0;
|
||||
int VALUE = 0;
|
||||
int romDataDomainIndex = 0;
|
||||
|
||||
|
||||
if (!String.IsNullOrWhiteSpace(cheatname.Text))
|
||||
{
|
||||
c.Name = cheatname.Text + " Part 1";
|
||||
d.Name = cheatname.Text + " Part 2";
|
||||
NAME = cheatname.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
Processing = true;
|
||||
GGCodeMaskBox.TextMaskFormat = MaskFormat.IncludeLiterals;
|
||||
c.Name = GGCodeMaskBox.Text + " Part 1";
|
||||
d.Name = GGCodeMaskBox.Text + " Part 2";
|
||||
NAME = GGCodeMaskBox.Text;
|
||||
GGCodeMaskBox.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals;
|
||||
Processing = false;
|
||||
}
|
||||
|
||||
if (String.IsNullOrWhiteSpace(AddressBox.Text))
|
||||
if (!String.IsNullOrWhiteSpace(AddressBox.Text))
|
||||
{
|
||||
c.Address = 0;
|
||||
d.Address = 0 + 1;
|
||||
ADDRESS = int.Parse(AddressBox.Text, NumberStyles.HexNumber);
|
||||
}
|
||||
else
|
||||
{
|
||||
c.Address = int.Parse(AddressBox.Text, NumberStyles.HexNumber);
|
||||
d.Address = c.Address + 1;
|
||||
}
|
||||
if (String.IsNullOrWhiteSpace(ValueBox.Text))
|
||||
{
|
||||
c.Value = 0;
|
||||
d.Value = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
c.Value = (byte)((int.Parse(ValueBox.Text, NumberStyles.HexNumber) & 0xFF00) >> 8);
|
||||
d.Value = (byte)(int.Parse(ValueBox.Text, NumberStyles.HexNumber) & 0x00FF);
|
||||
}
|
||||
c.Compare = null;
|
||||
d.Compare = null;
|
||||
for (int x = 0; x < Global.Emulator.MemoryDomains.Count; x++)
|
||||
|
||||
if (Global.Emulator.MemoryDomains[x].ToString() == "Rom Data")
|
||||
if (!String.IsNullOrWhiteSpace(ValueBox.Text))
|
||||
{
|
||||
VALUE = ValueBox.ToRawInt();
|
||||
}
|
||||
|
||||
for (int i = 0; i < Global.Emulator.MemoryDomains.Count; i++)
|
||||
{
|
||||
if (Global.Emulator.MemoryDomains[i].ToString() == "Rom Data")
|
||||
{
|
||||
c.Domain = Global.Emulator.MemoryDomains[x];
|
||||
c.Enable();
|
||||
Global.CheatList_Legacy.Add(c);
|
||||
d.Domain = Global.Emulator.MemoryDomains[x];
|
||||
d.Enable();
|
||||
Global.CheatList_Legacy.Add(d);
|
||||
break;
|
||||
romDataDomainIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
Watch watch = Watch.GenerateWatch(
|
||||
Global.Emulator.MemoryDomains[romDataDomainIndex],
|
||||
ADDRESS,
|
||||
Watch.WatchSize.Word,
|
||||
Watch.DisplayType.Hex,
|
||||
NAME,
|
||||
bigEndian: true
|
||||
);
|
||||
|
||||
Global.CheatList.Add(new Cheat(
|
||||
watch,
|
||||
VALUE,
|
||||
compare: null,
|
||||
enabled: true
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ namespace BizHawk.MultiClient
|
|||
public static IEmulator Emulator;
|
||||
public static CoreComm CoreComm;
|
||||
public static GameInfo Game;
|
||||
public static LegacyCheatList CheatList_Legacy;
|
||||
public static CheatList CheatList;
|
||||
|
||||
public static Controller NullControls;
|
||||
|
|
|
@ -96,7 +96,7 @@ namespace BizHawk.MultiClient
|
|||
private GBtools.GBGPUView _gbgpuview = null;
|
||||
private GBAtools.GBAGPUView _gbagpuview = null;
|
||||
private PCEBGViewer _pcebgviewer = null;
|
||||
private NewCheatForm _cheats = null;
|
||||
private Cheats _cheats = null;
|
||||
private ToolBox _toolbox = null;
|
||||
private TI83KeyPad _ti83pad = null;
|
||||
private TAStudio _tastudio = null;
|
||||
|
@ -174,7 +174,6 @@ namespace BizHawk.MultiClient
|
|||
|
||||
FFMpeg.FFMpegPath = PathManager.MakeProgramRelativePath(Global.Config.FFMpegPath);
|
||||
|
||||
Global.CheatList_Legacy = new LegacyCheatList();
|
||||
Global.CheatList = new CheatList();
|
||||
UpdateStatusSlots();
|
||||
UpdateKeyPriorityIcon();
|
||||
|
@ -2870,12 +2869,12 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (_cheats == null)
|
||||
{
|
||||
_cheats = new NewCheatForm();
|
||||
_cheats = new Cheats();
|
||||
}
|
||||
|
||||
if (!_cheats.IsHandleCreated || _cheats.IsDisposed)
|
||||
{
|
||||
_cheats = new NewCheatForm();
|
||||
_cheats = new Cheats();
|
||||
_cheats.Show();
|
||||
}
|
||||
else
|
||||
|
|
|
@ -293,40 +293,58 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (Global.Emulator is LibsnesCore)
|
||||
{
|
||||
LegacyCheat c = new LegacyCheat();
|
||||
if (cheatname.Text.Length > 0)
|
||||
c.Name = cheatname.Text;
|
||||
string NAME;
|
||||
int ADDRESS = 0;
|
||||
int VALUE = 0;
|
||||
int sysBusIndex = 0;
|
||||
|
||||
if (!String.IsNullOrWhiteSpace(cheatname.Text))
|
||||
{
|
||||
NAME = cheatname.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
Processing = true;
|
||||
GGCodeMaskBox.TextMaskFormat = MaskFormat.IncludeLiterals;
|
||||
c.Name = GGCodeMaskBox.Text;
|
||||
NAME = GGCodeMaskBox.Text;
|
||||
GGCodeMaskBox.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals;
|
||||
Processing = false;
|
||||
}
|
||||
|
||||
if (String.IsNullOrWhiteSpace(AddressBox.Text))
|
||||
c.Address = 0;
|
||||
else
|
||||
if (!String.IsNullOrWhiteSpace(AddressBox.Text))
|
||||
{
|
||||
c.Address = int.Parse(AddressBox.Text, NumberStyles.HexNumber);
|
||||
c.Address += 0x8000;
|
||||
ADDRESS = int.Parse(AddressBox.Text, NumberStyles.HexNumber);
|
||||
ADDRESS += 0x8000;
|
||||
}
|
||||
if (!String.IsNullOrWhiteSpace(ValueBox.Text))
|
||||
{
|
||||
VALUE = (byte)(int.Parse(ValueBox.Text, NumberStyles.HexNumber));
|
||||
}
|
||||
if (String.IsNullOrWhiteSpace(ValueBox.Text))
|
||||
c.Value = 0;
|
||||
else
|
||||
c.Value = (byte)(int.Parse(ValueBox.Text, NumberStyles.HexNumber));
|
||||
|
||||
c.Compare = null;
|
||||
for (int x = 0; x < Global.Emulator.MemoryDomains.Count; x++)
|
||||
|
||||
if (Global.Emulator.MemoryDomains[x].ToString() == "BUS")
|
||||
for (int i = 0; i < Global.Emulator.MemoryDomains.Count; i++)
|
||||
{
|
||||
if (Global.Emulator.MemoryDomains[i].ToString() == "BUS")
|
||||
{
|
||||
c.Domain = Global.Emulator.MemoryDomains[x];
|
||||
c.Enable();
|
||||
Global.CheatList_Legacy.Add(c);
|
||||
sysBusIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Watch watch = Watch.GenerateWatch(
|
||||
Global.Emulator.MemoryDomains[sysBusIndex],
|
||||
ADDRESS,
|
||||
Watch.WatchSize.Byte,
|
||||
Watch.DisplayType.Hex,
|
||||
NAME,
|
||||
bigEndian: false
|
||||
);
|
||||
|
||||
Global.CheatList.Add(new Cheat(
|
||||
watch,
|
||||
VALUE,
|
||||
compare: null,
|
||||
enabled: true
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,116 +0,0 @@
|
|||
using BizHawk.Emulation.Consoles.Nintendo;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public class LegacyCheat
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public int Address { get; set; }
|
||||
public byte Value { get; set; }
|
||||
public byte? Compare { get; set; }
|
||||
public MemoryDomain Domain { get; set; }
|
||||
|
||||
private bool enabled;
|
||||
|
||||
public LegacyCheat()
|
||||
{
|
||||
Name = "";
|
||||
Address = 0;
|
||||
Value = 0;
|
||||
Compare = null;
|
||||
enabled = false;
|
||||
Domain = new MemoryDomain("NULL", 1, Endian.Little, addr => 0, (a, v) => { });
|
||||
}
|
||||
|
||||
public LegacyCheat(LegacyCheat c)
|
||||
{
|
||||
Name = c.Name;
|
||||
Address = c.Address;
|
||||
Value = c.Value;
|
||||
enabled = c.enabled;
|
||||
Domain = c.Domain;
|
||||
Compare = c.Compare;
|
||||
if (enabled)
|
||||
{
|
||||
Enable();
|
||||
}
|
||||
else
|
||||
{
|
||||
Disable();
|
||||
}
|
||||
}
|
||||
|
||||
public LegacyCheat(string cname, int addr, byte val, bool e, MemoryDomain d, byte? comp = null)
|
||||
{
|
||||
Name = cname;
|
||||
Address = addr;
|
||||
Value = val;
|
||||
enabled = e;
|
||||
Domain = d;
|
||||
Compare = comp;
|
||||
if (enabled)
|
||||
{
|
||||
Enable();
|
||||
}
|
||||
else
|
||||
{
|
||||
Disable();
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSeparator
|
||||
{
|
||||
get
|
||||
{
|
||||
return Address == -1; //TODO: make this a nullable instead
|
||||
}
|
||||
}
|
||||
|
||||
public void Enable()
|
||||
{
|
||||
enabled = true;
|
||||
if (Global.Emulator is NES && Domain == Global.Emulator.MemoryDomains[1])
|
||||
{
|
||||
(Global.Emulator as NES).ApplyGameGenie(Address, Value, Compare);
|
||||
}
|
||||
else
|
||||
{
|
||||
MemoryPulse.Add(Domain, Address, Value, Compare);
|
||||
}
|
||||
|
||||
Global.MainForm.UpdateCheatStatus();
|
||||
}
|
||||
|
||||
public void Disable()
|
||||
{
|
||||
enabled = false;
|
||||
DisposeOfCheat();
|
||||
Global.MainForm.UpdateCheatStatus();
|
||||
}
|
||||
|
||||
public void DisposeOfCheat()
|
||||
{
|
||||
if (Global.Emulator is NES && Domain == Global.Emulator.MemoryDomains[1])
|
||||
{
|
||||
(Global.Emulator as NES).RemoveGameGenie(Address);
|
||||
}
|
||||
else
|
||||
{
|
||||
MemoryPulse.Remove(Domain, Address);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return enabled;
|
||||
}
|
||||
}
|
||||
|
||||
~LegacyCheat()
|
||||
{
|
||||
DisposeOfCheat();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,380 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Globalization;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public class LegacyCheatList : IEnumerable<LegacyCheat>
|
||||
{
|
||||
private List<LegacyCheat> cheatList = new List<LegacyCheat>();
|
||||
public string CurrentCheatFile = "";
|
||||
public bool Changes = false;
|
||||
public int Count { get { return cheatList.Count; } }
|
||||
|
||||
public bool LoadCheatFile(string path, bool append)
|
||||
{
|
||||
var file = new FileInfo(path);
|
||||
if (file.Exists == false) return false;
|
||||
|
||||
int cheatcount = 0;
|
||||
using (StreamReader sr = file.OpenText())
|
||||
{
|
||||
if (!append) CurrentCheatFile = path;
|
||||
|
||||
string s;
|
||||
|
||||
if (append == false)
|
||||
{
|
||||
Clear(); //Wipe existing list and read from file
|
||||
}
|
||||
while ((s = sr.ReadLine()) != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (s.Length < 6) continue;
|
||||
LegacyCheat c = new LegacyCheat();
|
||||
string temp = s.Substring(0, s.IndexOf('\t'));
|
||||
c.Address = int.Parse(temp, NumberStyles.HexNumber);
|
||||
|
||||
int y = s.IndexOf('\t') + 1;
|
||||
s = s.Substring(y, s.Length - y); //Value
|
||||
temp = s.Substring(0, 2);
|
||||
c.Value = byte.Parse(temp, NumberStyles.HexNumber);
|
||||
|
||||
bool comparefailed = false; //adelikat: This is a hack for 1.0.6 to support .cht files made in previous versions before the compare value was implemented
|
||||
y = s.IndexOf('\t') + 1;
|
||||
s = s.Substring(y, s.Length - y); //Compare
|
||||
temp = s.Substring(0, s.IndexOf('\t'));
|
||||
try
|
||||
{
|
||||
if (temp == "N")
|
||||
{
|
||||
c.Compare = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
c.Compare = byte.Parse(temp, NumberStyles.HexNumber);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
comparefailed = true;
|
||||
c.Domain = SetDomain(temp);
|
||||
}
|
||||
|
||||
if (!comparefailed)
|
||||
{
|
||||
y = s.IndexOf('\t') + 1;
|
||||
s = s.Substring(y, s.Length - y); //Memory Domain
|
||||
temp = s.Substring(0, s.IndexOf('\t'));
|
||||
c.Domain = SetDomain(temp);
|
||||
}
|
||||
|
||||
y = s.IndexOf('\t') + 1;
|
||||
s = s.Substring(y, s.Length - y); //Enabled
|
||||
y = int.Parse(s[0].ToString());
|
||||
|
||||
if (y == 0)
|
||||
{
|
||||
c.Disable();
|
||||
}
|
||||
else
|
||||
{
|
||||
c.Enable();
|
||||
}
|
||||
|
||||
y = s.IndexOf('\t') + 1;
|
||||
s = s.Substring(y, s.Length - y); //Name
|
||||
c.Name = s;
|
||||
|
||||
cheatcount++;
|
||||
cheatList.Add(c);
|
||||
}
|
||||
catch
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (Global.Config.DisableCheatsOnLoad)
|
||||
{
|
||||
foreach (LegacyCheat t in cheatList)
|
||||
{
|
||||
t.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
if (cheatcount > 0)
|
||||
{
|
||||
Changes = false;
|
||||
Global.Config.RecentCheats.Add(file.FullName);
|
||||
Global.MainForm.UpdateCheatStatus();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void NotSupportedError()
|
||||
{
|
||||
MessageBox.Show("Unable to enable cheat for this platform, cheats are not supported for " + Global.Emulator.SystemId, "Cheat error",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
|
||||
private MemoryDomain SetDomain(string name)
|
||||
{
|
||||
//Attempts to find the memory domain by name, if it fails, it defaults to index 0
|
||||
foreach (MemoryDomain t in Global.Emulator.MemoryDomains)
|
||||
{
|
||||
if (t.Name == name)
|
||||
{
|
||||
return t;
|
||||
}
|
||||
}
|
||||
return Global.Emulator.MemoryDomains[0];
|
||||
}
|
||||
|
||||
public IEnumerator<LegacyCheat> GetEnumerator()
|
||||
{
|
||||
return cheatList.GetEnumerator();
|
||||
}
|
||||
|
||||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
|
||||
public bool IsActiveCheat(MemoryDomain d, int address)
|
||||
{
|
||||
return cheatList.Any(t => t.Address == address && t.Domain.Name == d.Name);
|
||||
}
|
||||
|
||||
public void Remove(MemoryDomain d, int address)
|
||||
{
|
||||
for (int x = 0; x < cheatList.Count; x++)
|
||||
{
|
||||
if (cheatList[x].Address == address && cheatList[x].Domain.Name == d.Name)
|
||||
{
|
||||
cheatList.Remove(cheatList[x]);
|
||||
}
|
||||
}
|
||||
|
||||
Global.OSD.AddMessage("Cheat removed");
|
||||
}
|
||||
|
||||
public void DisableAll()
|
||||
{
|
||||
foreach (LegacyCheat c in cheatList)
|
||||
{
|
||||
c.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
public string CheatsPath
|
||||
{
|
||||
get
|
||||
{
|
||||
PathEntry pathEntry = Global.Config.PathEntries[Global.Emulator.SystemId, "Cheats"];
|
||||
if (pathEntry == null)
|
||||
{
|
||||
pathEntry = Global.Config.PathEntries[Global.Emulator.SystemId, "Base"];
|
||||
}
|
||||
string path = pathEntry.Path;
|
||||
|
||||
var f = new FileInfo(path);
|
||||
if (f.Directory != null && f.Directory.Exists == false)
|
||||
{
|
||||
f.Directory.Create();
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
public bool SaveCheatFile(string path)
|
||||
{
|
||||
FileInfo file = new FileInfo(path);
|
||||
if (file.Directory != null && !file.Directory.Exists)
|
||||
{
|
||||
file.Directory.Create();
|
||||
}
|
||||
|
||||
using (StreamWriter sw = new StreamWriter(path))
|
||||
{
|
||||
string str = "";
|
||||
|
||||
foreach (LegacyCheat t in cheatList)
|
||||
{
|
||||
str += FormatAddress(t.Address) + "\t";
|
||||
str += String.Format("{0:X2}", t.Value) + "\t";
|
||||
|
||||
if (t.Compare == null)
|
||||
{
|
||||
str += "N\t";
|
||||
}
|
||||
else
|
||||
{
|
||||
str += String.Format("{0:X2}", t.Compare) + "\t";
|
||||
}
|
||||
|
||||
str += t.Domain.Name + "\t";
|
||||
|
||||
if (t.IsEnabled)
|
||||
{
|
||||
str += "1\t";
|
||||
}
|
||||
else
|
||||
{
|
||||
str += "0\t";
|
||||
}
|
||||
|
||||
str += t.Name + "\n";
|
||||
}
|
||||
|
||||
sw.WriteLine(str);
|
||||
}
|
||||
Changes = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public string FormatAddress(int address)
|
||||
{
|
||||
return String.Format("{0:X" + GetNumDigits((Global.Emulator.MainMemory.Size - 1)).ToString() + "}", address);
|
||||
}
|
||||
|
||||
|
||||
public void SaveSettings()
|
||||
{
|
||||
if (Global.Config.CheatsAutoSaveOnClose)
|
||||
{
|
||||
if (Changes && cheatList.Count > 0)
|
||||
{
|
||||
if (CurrentCheatFile.Length == 0)
|
||||
CurrentCheatFile = DefaultFilename;
|
||||
|
||||
SaveCheatFile(Global.CheatList_Legacy.CurrentCheatFile);
|
||||
}
|
||||
else if (cheatList.Count == 0 && CurrentCheatFile.Length > 0)
|
||||
{
|
||||
var file = new FileInfo(CurrentCheatFile);
|
||||
file.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string DefaultFilename
|
||||
{
|
||||
get
|
||||
{
|
||||
return Path.Combine(Global.CheatList_Legacy.CheatsPath, PathManager.FilesystemSafeName(Global.Game) + ".cht");
|
||||
}
|
||||
}
|
||||
|
||||
private int GetNumDigits(Int32 i)
|
||||
{
|
||||
if (i < 0x10000) return 4;
|
||||
if (i < 0x1000000) return 6;
|
||||
else return 8;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks for a .cht file that matches the name of the ROM loaded
|
||||
/// It is up to the caller to determine which directory it looks
|
||||
/// </summary>
|
||||
public bool AttemptLoadCheatFile()
|
||||
{
|
||||
string CheatFile = DefaultFilename;
|
||||
var file = new FileInfo(CheatFile);
|
||||
|
||||
if (file.Exists == false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
bool loaded = LoadCheatFile(CheatFile, false);
|
||||
if (loaded)
|
||||
{
|
||||
Global.MainForm.UpdateCheatStatus();
|
||||
}
|
||||
return loaded;
|
||||
}
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
cheatList.Clear();
|
||||
MemoryPulse.Clear();
|
||||
Global.MainForm.UpdateCheatStatus();
|
||||
}
|
||||
|
||||
public void Remove(LegacyCheat c)
|
||||
{
|
||||
c.DisposeOfCheat();
|
||||
cheatList.Remove(c);
|
||||
Global.MainForm.UpdateCheatStatus();
|
||||
}
|
||||
|
||||
public void RemoveCheat(MemoryDomain domain, int address)
|
||||
{
|
||||
for (int x = 0; x < cheatList.Count; x++)
|
||||
{
|
||||
if (cheatList[x].Domain == domain && cheatList[x].Address == address)
|
||||
{
|
||||
MemoryPulse.Remove(domain, address);
|
||||
cheatList.Remove(cheatList[x]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Add(LegacyCheat c)
|
||||
{
|
||||
if (c != null)
|
||||
{
|
||||
cheatList.Add(c);
|
||||
Global.MainForm.UpdateCheatStatus();
|
||||
}
|
||||
}
|
||||
|
||||
public LegacyCheat this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return cheatList[index];
|
||||
}
|
||||
}
|
||||
|
||||
public void Insert(int index, LegacyCheat item)
|
||||
{
|
||||
cheatList.Insert(index, item);
|
||||
Global.MainForm.UpdateCheatStatus();
|
||||
}
|
||||
|
||||
public bool HasActiveCheats
|
||||
{
|
||||
get { return cheatList.Any(t => t.IsEnabled); }
|
||||
}
|
||||
|
||||
public int ActiveCheatCount
|
||||
{
|
||||
get
|
||||
{
|
||||
if (HasActiveCheats)
|
||||
{
|
||||
return cheatList.Where(x => x.IsEnabled).Count();
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,912 +0,0 @@
|
|||
namespace BizHawk.MultiClient
|
||||
{
|
||||
partial class Cheats
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Cheats));
|
||||
this.CheatsMenu = new MenuStripEx();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.appendFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.recentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cheatsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.addCheatToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.removeCheatToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.duplicateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.insertSeparatorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.moveUpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.moveDownToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.disableAllCheatsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.openGameGenieEncoderDecoderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.LoadCheatFileByGameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveCheatsOnCloseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.CheatsOnOffLoadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.showValuesAsHexToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.autoloadDialogToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveWindowPositionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.restoreWindowSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStrip1 = new ToolStripEx();
|
||||
this.newToolStripButton = new System.Windows.Forms.ToolStripButton();
|
||||
this.openToolStripButton = new System.Windows.Forms.ToolStripButton();
|
||||
this.saveToolStripButton = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.cutToolStripButton = new System.Windows.Forms.ToolStripButton();
|
||||
this.copyToolStripButton = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripButtonSeparator = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripButtonMoveUp = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripButtonMoveDown = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripButtonLoadGameGenie = new System.Windows.Forms.ToolStripButton();
|
||||
this.MessageLabel = new System.Windows.Forms.Label();
|
||||
this.AddCheatGroup = new System.Windows.Forms.GroupBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.CompareBox = new System.Windows.Forms.TextBox();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.EditButton = new System.Windows.Forms.Button();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.DomainComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.AddCheatButton = new System.Windows.Forms.Button();
|
||||
this.ValueBox = new System.Windows.Forms.TextBox();
|
||||
this.AddressBox = new System.Windows.Forms.TextBox();
|
||||
this.NameBox = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.NumCheatsLabel = new System.Windows.Forms.Label();
|
||||
this.CheatListView = new BizHawk.VirtualListView();
|
||||
this.CheatName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.Address = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.Value = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.Compare = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.On = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.Domain = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.toggleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.removeSelectedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.disableAllCheatsToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.CheatsMenu.SuspendLayout();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.AddCheatGroup.SuspendLayout();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// CheatsMenu
|
||||
//
|
||||
this.CheatsMenu.ClickThrough = true;
|
||||
this.CheatsMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.cheatsToolStripMenuItem,
|
||||
this.optionsToolStripMenuItem});
|
||||
this.CheatsMenu.Location = new System.Drawing.Point(0, 0);
|
||||
this.CheatsMenu.Name = "CheatsMenu";
|
||||
this.CheatsMenu.Size = new System.Drawing.Size(587, 24);
|
||||
this.CheatsMenu.TabIndex = 1;
|
||||
this.CheatsMenu.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.newToolStripMenuItem,
|
||||
this.openToolStripMenuItem,
|
||||
this.saveToolStripMenuItem,
|
||||
this.saveAsToolStripMenuItem,
|
||||
this.appendFileToolStripMenuItem,
|
||||
this.recentToolStripMenuItem,
|
||||
this.toolStripSeparator1,
|
||||
this.exitToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "&File";
|
||||
this.fileToolStripMenuItem.DropDownOpened += new System.EventHandler(this.fileToolStripMenuItem_DropDownOpened);
|
||||
//
|
||||
// newToolStripMenuItem
|
||||
//
|
||||
this.newToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.NewFile;
|
||||
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
|
||||
this.newToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
|
||||
this.newToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.newToolStripMenuItem.Text = "&New";
|
||||
this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
|
||||
//
|
||||
// openToolStripMenuItem
|
||||
//
|
||||
this.openToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.OpenFile;
|
||||
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
|
||||
this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
|
||||
this.openToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.openToolStripMenuItem.Text = "&Open...";
|
||||
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
|
||||
//
|
||||
// saveToolStripMenuItem
|
||||
//
|
||||
this.saveToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.SaveAs;
|
||||
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
|
||||
this.saveToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
|
||||
this.saveToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.saveToolStripMenuItem.Text = "&Save";
|
||||
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
|
||||
//
|
||||
// saveAsToolStripMenuItem
|
||||
//
|
||||
this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
|
||||
this.saveAsToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
|
||||
| System.Windows.Forms.Keys.S)));
|
||||
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.saveAsToolStripMenuItem.Text = "Save &As...";
|
||||
this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.saveAsToolStripMenuItem_Click);
|
||||
//
|
||||
// appendFileToolStripMenuItem
|
||||
//
|
||||
this.appendFileToolStripMenuItem.Name = "appendFileToolStripMenuItem";
|
||||
this.appendFileToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.appendFileToolStripMenuItem.Text = "Append File";
|
||||
this.appendFileToolStripMenuItem.Click += new System.EventHandler(this.appendFileToolStripMenuItem_Click);
|
||||
//
|
||||
// recentToolStripMenuItem
|
||||
//
|
||||
this.recentToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripSeparator4});
|
||||
this.recentToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Recent;
|
||||
this.recentToolStripMenuItem.Name = "recentToolStripMenuItem";
|
||||
this.recentToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.recentToolStripMenuItem.Text = "Recent";
|
||||
this.recentToolStripMenuItem.DropDownOpened += new System.EventHandler(this.recentToolStripMenuItem_DropDownOpened);
|
||||
//
|
||||
// toolStripSeparator4
|
||||
//
|
||||
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||
this.toolStripSeparator4.Size = new System.Drawing.Size(149, 6);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(192, 6);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.exitToolStripMenuItem.Text = "E&xit";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
|
||||
//
|
||||
// cheatsToolStripMenuItem
|
||||
//
|
||||
this.cheatsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.addCheatToolStripMenuItem,
|
||||
this.removeCheatToolStripMenuItem,
|
||||
this.duplicateToolStripMenuItem,
|
||||
this.insertSeparatorToolStripMenuItem,
|
||||
this.toolStripSeparator3,
|
||||
this.moveUpToolStripMenuItem,
|
||||
this.moveDownToolStripMenuItem,
|
||||
this.selectAllToolStripMenuItem,
|
||||
this.toolStripSeparator6,
|
||||
this.disableAllCheatsToolStripMenuItem,
|
||||
this.toolStripSeparator7,
|
||||
this.openGameGenieEncoderDecoderToolStripMenuItem});
|
||||
this.cheatsToolStripMenuItem.Name = "cheatsToolStripMenuItem";
|
||||
this.cheatsToolStripMenuItem.Size = new System.Drawing.Size(55, 20);
|
||||
this.cheatsToolStripMenuItem.Text = "&Cheats";
|
||||
this.cheatsToolStripMenuItem.DropDownOpened += new System.EventHandler(this.cheatsToolStripMenuItem_DropDownOpened);
|
||||
//
|
||||
// addCheatToolStripMenuItem
|
||||
//
|
||||
this.addCheatToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Freeze;
|
||||
this.addCheatToolStripMenuItem.Name = "addCheatToolStripMenuItem";
|
||||
this.addCheatToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
||||
this.addCheatToolStripMenuItem.Text = "&Add Cheat";
|
||||
this.addCheatToolStripMenuItem.Click += new System.EventHandler(this.addCheatToolStripMenuItem_Click);
|
||||
//
|
||||
// removeCheatToolStripMenuItem
|
||||
//
|
||||
this.removeCheatToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Delete;
|
||||
this.removeCheatToolStripMenuItem.Name = "removeCheatToolStripMenuItem";
|
||||
this.removeCheatToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.R)));
|
||||
this.removeCheatToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
||||
this.removeCheatToolStripMenuItem.Text = "&Remove Cheat";
|
||||
this.removeCheatToolStripMenuItem.Click += new System.EventHandler(this.removeCheatToolStripMenuItem_Click);
|
||||
//
|
||||
// duplicateToolStripMenuItem
|
||||
//
|
||||
this.duplicateToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Duplicate;
|
||||
this.duplicateToolStripMenuItem.Name = "duplicateToolStripMenuItem";
|
||||
this.duplicateToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.D)));
|
||||
this.duplicateToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
||||
this.duplicateToolStripMenuItem.Text = "&Duplicate";
|
||||
this.duplicateToolStripMenuItem.Click += new System.EventHandler(this.duplicateToolStripMenuItem_Click);
|
||||
//
|
||||
// insertSeparatorToolStripMenuItem
|
||||
//
|
||||
this.insertSeparatorToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.InsertSeparator;
|
||||
this.insertSeparatorToolStripMenuItem.Name = "insertSeparatorToolStripMenuItem";
|
||||
this.insertSeparatorToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I)));
|
||||
this.insertSeparatorToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
||||
this.insertSeparatorToolStripMenuItem.Text = "Insert Separator";
|
||||
this.insertSeparatorToolStripMenuItem.Click += new System.EventHandler(this.insertSeparatorToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator3
|
||||
//
|
||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
this.toolStripSeparator3.Size = new System.Drawing.Size(230, 6);
|
||||
//
|
||||
// moveUpToolStripMenuItem
|
||||
//
|
||||
this.moveUpToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.MoveUp;
|
||||
this.moveUpToolStripMenuItem.Name = "moveUpToolStripMenuItem";
|
||||
this.moveUpToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.U)));
|
||||
this.moveUpToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
||||
this.moveUpToolStripMenuItem.Text = "Move &Up";
|
||||
this.moveUpToolStripMenuItem.Click += new System.EventHandler(this.moveUpToolStripMenuItem_Click);
|
||||
//
|
||||
// moveDownToolStripMenuItem
|
||||
//
|
||||
this.moveDownToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.MoveDown;
|
||||
this.moveDownToolStripMenuItem.Name = "moveDownToolStripMenuItem";
|
||||
this.moveDownToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.D)));
|
||||
this.moveDownToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
||||
this.moveDownToolStripMenuItem.Text = "Move &Down";
|
||||
this.moveDownToolStripMenuItem.Click += new System.EventHandler(this.moveDownToolStripMenuItem_Click);
|
||||
//
|
||||
// selectAllToolStripMenuItem
|
||||
//
|
||||
this.selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem";
|
||||
this.selectAllToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A)));
|
||||
this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
||||
this.selectAllToolStripMenuItem.Text = "Select &All";
|
||||
this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator6
|
||||
//
|
||||
this.toolStripSeparator6.Name = "toolStripSeparator6";
|
||||
this.toolStripSeparator6.Size = new System.Drawing.Size(230, 6);
|
||||
//
|
||||
// disableAllCheatsToolStripMenuItem
|
||||
//
|
||||
this.disableAllCheatsToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Stop;
|
||||
this.disableAllCheatsToolStripMenuItem.Name = "disableAllCheatsToolStripMenuItem";
|
||||
this.disableAllCheatsToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
||||
this.disableAllCheatsToolStripMenuItem.Text = "Disable all Cheats";
|
||||
this.disableAllCheatsToolStripMenuItem.Click += new System.EventHandler(this.disableAllCheatsToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator7
|
||||
//
|
||||
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
||||
this.toolStripSeparator7.Size = new System.Drawing.Size(230, 6);
|
||||
//
|
||||
// openGameGenieEncoderDecoderToolStripMenuItem
|
||||
//
|
||||
this.openGameGenieEncoderDecoderToolStripMenuItem.Name = "openGameGenieEncoderDecoderToolStripMenuItem";
|
||||
this.openGameGenieEncoderDecoderToolStripMenuItem.Size = new System.Drawing.Size(233, 22);
|
||||
this.openGameGenieEncoderDecoderToolStripMenuItem.Text = "Game Genie Encoder/Decoder";
|
||||
this.openGameGenieEncoderDecoderToolStripMenuItem.Click += new System.EventHandler(this.openGameGenieEncoderDecoderToolStripMenuItem_Click);
|
||||
//
|
||||
// optionsToolStripMenuItem
|
||||
//
|
||||
this.optionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.LoadCheatFileByGameToolStripMenuItem,
|
||||
this.saveCheatsOnCloseToolStripMenuItem,
|
||||
this.CheatsOnOffLoadToolStripMenuItem,
|
||||
this.showValuesAsHexToolStripMenuItem,
|
||||
this.autoloadDialogToolStripMenuItem,
|
||||
this.saveWindowPositionToolStripMenuItem,
|
||||
this.toolStripSeparator5,
|
||||
this.restoreWindowSizeToolStripMenuItem});
|
||||
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
|
||||
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
|
||||
this.optionsToolStripMenuItem.Text = "&Options";
|
||||
this.optionsToolStripMenuItem.DropDownOpened += new System.EventHandler(this.optionsToolStripMenuItem_DropDownOpened);
|
||||
//
|
||||
// LoadCheatFileByGameToolStripMenuItem
|
||||
//
|
||||
this.LoadCheatFileByGameToolStripMenuItem.Name = "LoadCheatFileByGameToolStripMenuItem";
|
||||
this.LoadCheatFileByGameToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
|
||||
this.LoadCheatFileByGameToolStripMenuItem.Text = "Load Cheat File by Game";
|
||||
this.LoadCheatFileByGameToolStripMenuItem.Click += new System.EventHandler(this.LoadCheatFileByGameToolStripMenuItem_Click);
|
||||
//
|
||||
// saveCheatsOnCloseToolStripMenuItem
|
||||
//
|
||||
this.saveCheatsOnCloseToolStripMenuItem.Name = "saveCheatsOnCloseToolStripMenuItem";
|
||||
this.saveCheatsOnCloseToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
|
||||
this.saveCheatsOnCloseToolStripMenuItem.Text = "Save Cheats on Close";
|
||||
this.saveCheatsOnCloseToolStripMenuItem.Click += new System.EventHandler(this.saveCheatsOnCloseToolStripMenuItem_Click);
|
||||
//
|
||||
// CheatsOnOffLoadToolStripMenuItem
|
||||
//
|
||||
this.CheatsOnOffLoadToolStripMenuItem.Name = "CheatsOnOffLoadToolStripMenuItem";
|
||||
this.CheatsOnOffLoadToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
|
||||
this.CheatsOnOffLoadToolStripMenuItem.Text = "Disable Cheats on Load";
|
||||
this.CheatsOnOffLoadToolStripMenuItem.Click += new System.EventHandler(this.CheatsOnOffLoadToolStripMenuItem_Click);
|
||||
//
|
||||
// showValuesAsHexToolStripMenuItem
|
||||
//
|
||||
this.showValuesAsHexToolStripMenuItem.Name = "showValuesAsHexToolStripMenuItem";
|
||||
this.showValuesAsHexToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
|
||||
this.showValuesAsHexToolStripMenuItem.Text = "Show Values as Hex";
|
||||
this.showValuesAsHexToolStripMenuItem.Click += new System.EventHandler(this.showValuesAsHexToolStripMenuItem_Click);
|
||||
//
|
||||
// autoloadDialogToolStripMenuItem
|
||||
//
|
||||
this.autoloadDialogToolStripMenuItem.Name = "autoloadDialogToolStripMenuItem";
|
||||
this.autoloadDialogToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
|
||||
this.autoloadDialogToolStripMenuItem.Text = "Auto-load Dialog";
|
||||
this.autoloadDialogToolStripMenuItem.Click += new System.EventHandler(this.autoloadDialogToolStripMenuItem_Click);
|
||||
//
|
||||
// saveWindowPositionToolStripMenuItem
|
||||
//
|
||||
this.saveWindowPositionToolStripMenuItem.Name = "saveWindowPositionToolStripMenuItem";
|
||||
this.saveWindowPositionToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
|
||||
this.saveWindowPositionToolStripMenuItem.Text = "Save Window Position";
|
||||
this.saveWindowPositionToolStripMenuItem.Click += new System.EventHandler(this.saveWindowPositionToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator5
|
||||
//
|
||||
this.toolStripSeparator5.Name = "toolStripSeparator5";
|
||||
this.toolStripSeparator5.Size = new System.Drawing.Size(202, 6);
|
||||
//
|
||||
// restoreWindowSizeToolStripMenuItem
|
||||
//
|
||||
this.restoreWindowSizeToolStripMenuItem.Name = "restoreWindowSizeToolStripMenuItem";
|
||||
this.restoreWindowSizeToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
|
||||
this.restoreWindowSizeToolStripMenuItem.Text = "Restore Default Settings";
|
||||
this.restoreWindowSizeToolStripMenuItem.Click += new System.EventHandler(this.restoreWindowSizeToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStrip1
|
||||
//
|
||||
this.toolStrip1.ClickThrough = true;
|
||||
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.newToolStripButton,
|
||||
this.openToolStripButton,
|
||||
this.saveToolStripButton,
|
||||
this.toolStripSeparator,
|
||||
this.cutToolStripButton,
|
||||
this.copyToolStripButton,
|
||||
this.toolStripButtonSeparator,
|
||||
this.toolStripSeparator2,
|
||||
this.toolStripButtonMoveUp,
|
||||
this.toolStripButtonMoveDown,
|
||||
this.toolStripButtonLoadGameGenie});
|
||||
this.toolStrip1.Location = new System.Drawing.Point(0, 24);
|
||||
this.toolStrip1.Name = "toolStrip1";
|
||||
this.toolStrip1.Size = new System.Drawing.Size(587, 25);
|
||||
this.toolStrip1.TabIndex = 2;
|
||||
this.toolStrip1.Text = "toolStrip1";
|
||||
//
|
||||
// newToolStripButton
|
||||
//
|
||||
this.newToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.newToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripButton.Image")));
|
||||
this.newToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.newToolStripButton.Name = "newToolStripButton";
|
||||
this.newToolStripButton.Size = new System.Drawing.Size(23, 22);
|
||||
this.newToolStripButton.Text = "&New";
|
||||
this.newToolStripButton.Click += new System.EventHandler(this.newToolStripButton_Click);
|
||||
//
|
||||
// openToolStripButton
|
||||
//
|
||||
this.openToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.openToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("openToolStripButton.Image")));
|
||||
this.openToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.openToolStripButton.Name = "openToolStripButton";
|
||||
this.openToolStripButton.Size = new System.Drawing.Size(23, 22);
|
||||
this.openToolStripButton.Text = "&Open";
|
||||
this.openToolStripButton.Click += new System.EventHandler(this.openToolStripButton_Click);
|
||||
//
|
||||
// saveToolStripButton
|
||||
//
|
||||
this.saveToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.saveToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripButton.Image")));
|
||||
this.saveToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.saveToolStripButton.Name = "saveToolStripButton";
|
||||
this.saveToolStripButton.Size = new System.Drawing.Size(23, 22);
|
||||
this.saveToolStripButton.Text = "&Save";
|
||||
this.saveToolStripButton.Click += new System.EventHandler(this.saveToolStripButton_Click);
|
||||
//
|
||||
// toolStripSeparator
|
||||
//
|
||||
this.toolStripSeparator.Name = "toolStripSeparator";
|
||||
this.toolStripSeparator.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// cutToolStripButton
|
||||
//
|
||||
this.cutToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.cutToolStripButton.Image = global::BizHawk.MultiClient.Properties.Resources.Delete;
|
||||
this.cutToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.cutToolStripButton.Name = "cutToolStripButton";
|
||||
this.cutToolStripButton.Size = new System.Drawing.Size(23, 22);
|
||||
this.cutToolStripButton.Text = "&Remove";
|
||||
this.cutToolStripButton.Click += new System.EventHandler(this.cutToolStripButton_Click);
|
||||
//
|
||||
// copyToolStripButton
|
||||
//
|
||||
this.copyToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.copyToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("copyToolStripButton.Image")));
|
||||
this.copyToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.copyToolStripButton.Name = "copyToolStripButton";
|
||||
this.copyToolStripButton.Size = new System.Drawing.Size(23, 22);
|
||||
this.copyToolStripButton.Text = "&Duplicate";
|
||||
this.copyToolStripButton.Click += new System.EventHandler(this.copyToolStripButton_Click);
|
||||
//
|
||||
// toolStripButtonSeparator
|
||||
//
|
||||
this.toolStripButtonSeparator.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripButtonSeparator.Image = global::BizHawk.MultiClient.Properties.Resources.InsertSeparator;
|
||||
this.toolStripButtonSeparator.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripButtonSeparator.Name = "toolStripButtonSeparator";
|
||||
this.toolStripButtonSeparator.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripButtonSeparator.Text = "Insert Separator";
|
||||
this.toolStripButtonSeparator.Click += new System.EventHandler(this.toolStripButtonSeparator_Click);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// toolStripButtonMoveUp
|
||||
//
|
||||
this.toolStripButtonMoveUp.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripButtonMoveUp.Image = global::BizHawk.MultiClient.Properties.Resources.MoveUp;
|
||||
this.toolStripButtonMoveUp.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripButtonMoveUp.Name = "toolStripButtonMoveUp";
|
||||
this.toolStripButtonMoveUp.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripButtonMoveUp.Text = "Move Up";
|
||||
this.toolStripButtonMoveUp.Click += new System.EventHandler(this.toolStripButtonMoveUp_Click);
|
||||
//
|
||||
// toolStripButtonMoveDown
|
||||
//
|
||||
this.toolStripButtonMoveDown.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripButtonMoveDown.Image = global::BizHawk.MultiClient.Properties.Resources.MoveDown;
|
||||
this.toolStripButtonMoveDown.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripButtonMoveDown.Name = "toolStripButtonMoveDown";
|
||||
this.toolStripButtonMoveDown.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripButtonMoveDown.Text = "Move Down";
|
||||
this.toolStripButtonMoveDown.Click += new System.EventHandler(this.toolStripButtonMoveDown_Click);
|
||||
//
|
||||
// toolStripButtonLoadGameGenie
|
||||
//
|
||||
this.toolStripButtonLoadGameGenie.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.toolStripButtonLoadGameGenie.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonLoadGameGenie.Image")));
|
||||
this.toolStripButtonLoadGameGenie.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripButtonLoadGameGenie.Name = "toolStripButtonLoadGameGenie";
|
||||
this.toolStripButtonLoadGameGenie.Size = new System.Drawing.Size(75, 22);
|
||||
this.toolStripButtonLoadGameGenie.Text = "Game Genie";
|
||||
this.toolStripButtonLoadGameGenie.ToolTipText = "Open the Game Genie Encoder/Decoder";
|
||||
this.toolStripButtonLoadGameGenie.Click += new System.EventHandler(this.toolStripButton1_Click);
|
||||
//
|
||||
// MessageLabel
|
||||
//
|
||||
this.MessageLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.MessageLabel.AutoSize = true;
|
||||
this.MessageLabel.Location = new System.Drawing.Point(13, 312);
|
||||
this.MessageLabel.Name = "MessageLabel";
|
||||
this.MessageLabel.Size = new System.Drawing.Size(31, 13);
|
||||
this.MessageLabel.TabIndex = 3;
|
||||
this.MessageLabel.Text = " ";
|
||||
//
|
||||
// AddCheatGroup
|
||||
//
|
||||
this.AddCheatGroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.AddCheatGroup.Controls.Add(this.label7);
|
||||
this.AddCheatGroup.Controls.Add(this.CompareBox);
|
||||
this.AddCheatGroup.Controls.Add(this.label8);
|
||||
this.AddCheatGroup.Controls.Add(this.EditButton);
|
||||
this.AddCheatGroup.Controls.Add(this.label6);
|
||||
this.AddCheatGroup.Controls.Add(this.DomainComboBox);
|
||||
this.AddCheatGroup.Controls.Add(this.label5);
|
||||
this.AddCheatGroup.Controls.Add(this.label4);
|
||||
this.AddCheatGroup.Controls.Add(this.AddCheatButton);
|
||||
this.AddCheatGroup.Controls.Add(this.ValueBox);
|
||||
this.AddCheatGroup.Controls.Add(this.AddressBox);
|
||||
this.AddCheatGroup.Controls.Add(this.NameBox);
|
||||
this.AddCheatGroup.Controls.Add(this.label3);
|
||||
this.AddCheatGroup.Controls.Add(this.label2);
|
||||
this.AddCheatGroup.Controls.Add(this.label1);
|
||||
this.AddCheatGroup.Location = new System.Drawing.Point(405, 72);
|
||||
this.AddCheatGroup.Name = "AddCheatGroup";
|
||||
this.AddCheatGroup.Size = new System.Drawing.Size(170, 245);
|
||||
this.AddCheatGroup.TabIndex = 4;
|
||||
this.AddCheatGroup.TabStop = false;
|
||||
this.AddCheatGroup.Text = "Add Cheat";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(80, 107);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(18, 13);
|
||||
this.label7.TabIndex = 14;
|
||||
this.label7.Text = "0x";
|
||||
//
|
||||
// CompareBox
|
||||
//
|
||||
this.CompareBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
||||
this.CompareBox.Location = new System.Drawing.Point(99, 103);
|
||||
this.CompareBox.MaxLength = 2;
|
||||
this.CompareBox.Name = "CompareBox";
|
||||
this.CompareBox.Size = new System.Drawing.Size(65, 20);
|
||||
this.CompareBox.TabIndex = 13;
|
||||
this.CompareBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.CompareBox_KeyPress);
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(6, 107);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(49, 13);
|
||||
this.label8.TabIndex = 12;
|
||||
this.label8.Text = "Compare";
|
||||
//
|
||||
// EditButton
|
||||
//
|
||||
this.EditButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.EditButton.Enabled = false;
|
||||
this.EditButton.Location = new System.Drawing.Point(99, 204);
|
||||
this.EditButton.Name = "EditButton";
|
||||
this.EditButton.Size = new System.Drawing.Size(65, 23);
|
||||
this.EditButton.TabIndex = 11;
|
||||
this.EditButton.Text = "&Edit";
|
||||
this.EditButton.UseVisualStyleBackColor = true;
|
||||
this.EditButton.Click += new System.EventHandler(this.EditButton_Click);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(7, 131);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(83, 13);
|
||||
this.label6.TabIndex = 10;
|
||||
this.label6.Text = "Memory Domain";
|
||||
//
|
||||
// DomainComboBox
|
||||
//
|
||||
this.DomainComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.DomainComboBox.FormattingEnabled = true;
|
||||
this.DomainComboBox.Location = new System.Drawing.Point(10, 147);
|
||||
this.DomainComboBox.Name = "DomainComboBox";
|
||||
this.DomainComboBox.Size = new System.Drawing.Size(100, 21);
|
||||
this.DomainComboBox.TabIndex = 9;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(80, 81);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(18, 13);
|
||||
this.label5.TabIndex = 8;
|
||||
this.label5.Text = "0x";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(80, 56);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(18, 13);
|
||||
this.label4.TabIndex = 7;
|
||||
this.label4.Text = "0x";
|
||||
//
|
||||
// AddCheatButton
|
||||
//
|
||||
this.AddCheatButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.AddCheatButton.Enabled = false;
|
||||
this.AddCheatButton.Location = new System.Drawing.Point(10, 204);
|
||||
this.AddCheatButton.Name = "AddCheatButton";
|
||||
this.AddCheatButton.Size = new System.Drawing.Size(65, 23);
|
||||
this.AddCheatButton.TabIndex = 6;
|
||||
this.AddCheatButton.Text = "&Add";
|
||||
this.AddCheatButton.UseVisualStyleBackColor = true;
|
||||
this.AddCheatButton.Click += new System.EventHandler(this.AddCheatButton_Click);
|
||||
//
|
||||
// ValueBox
|
||||
//
|
||||
this.ValueBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
||||
this.ValueBox.Location = new System.Drawing.Point(99, 77);
|
||||
this.ValueBox.MaxLength = 2;
|
||||
this.ValueBox.Name = "ValueBox";
|
||||
this.ValueBox.Size = new System.Drawing.Size(65, 20);
|
||||
this.ValueBox.TabIndex = 5;
|
||||
this.ValueBox.TextChanged += new System.EventHandler(this.ValueBox_TextChanged);
|
||||
this.ValueBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ValueBox_KeyPress);
|
||||
//
|
||||
// AddressBox
|
||||
//
|
||||
this.AddressBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
||||
this.AddressBox.Location = new System.Drawing.Point(99, 52);
|
||||
this.AddressBox.MaxLength = 8;
|
||||
this.AddressBox.Name = "AddressBox";
|
||||
this.AddressBox.Size = new System.Drawing.Size(65, 20);
|
||||
this.AddressBox.TabIndex = 4;
|
||||
this.AddressBox.TextChanged += new System.EventHandler(this.AddressBox_TextChanged);
|
||||
this.AddressBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.AddressBox_KeyPress);
|
||||
//
|
||||
// NameBox
|
||||
//
|
||||
this.NameBox.Location = new System.Drawing.Point(64, 25);
|
||||
this.NameBox.Name = "NameBox";
|
||||
this.NameBox.Size = new System.Drawing.Size(100, 20);
|
||||
this.NameBox.TabIndex = 3;
|
||||
this.NameBox.TextChanged += new System.EventHandler(this.NameBox_TextChanged);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(6, 81);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(34, 13);
|
||||
this.label3.TabIndex = 2;
|
||||
this.label3.Text = "Value";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(6, 56);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(45, 13);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "Address";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(6, 28);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(35, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Name";
|
||||
//
|
||||
// NumCheatsLabel
|
||||
//
|
||||
this.NumCheatsLabel.AutoSize = true;
|
||||
this.NumCheatsLabel.Location = new System.Drawing.Point(9, 52);
|
||||
this.NumCheatsLabel.Name = "NumCheatsLabel";
|
||||
this.NumCheatsLabel.Size = new System.Drawing.Size(49, 13);
|
||||
this.NumCheatsLabel.TabIndex = 5;
|
||||
this.NumCheatsLabel.Text = "0 Cheats";
|
||||
//
|
||||
// CheatListView
|
||||
//
|
||||
this.CheatListView.AllowColumnReorder = true;
|
||||
this.CheatListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CheatListView.AutoArrange = false;
|
||||
this.CheatListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.CheatName,
|
||||
this.Address,
|
||||
this.Value,
|
||||
this.Compare,
|
||||
this.On,
|
||||
this.Domain});
|
||||
this.CheatListView.ContextMenuStrip = this.contextMenuStrip1;
|
||||
this.CheatListView.FullRowSelect = true;
|
||||
this.CheatListView.GridLines = true;
|
||||
this.CheatListView.HideSelection = false;
|
||||
this.CheatListView.ItemCount = 0;
|
||||
this.CheatListView.LabelEdit = true;
|
||||
this.CheatListView.Location = new System.Drawing.Point(12, 72);
|
||||
this.CheatListView.Name = "CheatListView";
|
||||
this.CheatListView.selectedItem = -1;
|
||||
this.CheatListView.Size = new System.Drawing.Size(376, 236);
|
||||
this.CheatListView.TabIndex = 0;
|
||||
this.CheatListView.UseCompatibleStateImageBehavior = false;
|
||||
this.CheatListView.View = System.Windows.Forms.View.Details;
|
||||
this.CheatListView.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.CheatListView_AfterLabelEdit);
|
||||
this.CheatListView.ColumnReordered += new System.Windows.Forms.ColumnReorderedEventHandler(this.ColumnReorder);
|
||||
this.CheatListView.SelectedIndexChanged += new System.EventHandler(this.CheatListView_SelectedIndexChanged);
|
||||
this.CheatListView.Click += new System.EventHandler(this.CheatListView_Click);
|
||||
this.CheatListView.DoubleClick += new System.EventHandler(this.CheatListView_DoubleClick);
|
||||
this.CheatListView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.CheatListView_KeyDown);
|
||||
//
|
||||
// CheatName
|
||||
//
|
||||
this.CheatName.Text = "Name";
|
||||
this.CheatName.Width = 104;
|
||||
//
|
||||
// Address
|
||||
//
|
||||
this.Address.Text = "Address";
|
||||
this.Address.Width = 52;
|
||||
//
|
||||
// Value
|
||||
//
|
||||
this.Value.Text = "Value";
|
||||
this.Value.Width = 40;
|
||||
//
|
||||
// Compare
|
||||
//
|
||||
this.Compare.Text = "Compare";
|
||||
//
|
||||
// On
|
||||
//
|
||||
this.On.Text = "On";
|
||||
this.On.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
this.On.Width = 40;
|
||||
//
|
||||
// Domain
|
||||
//
|
||||
this.Domain.Text = "Domain";
|
||||
this.Domain.Width = 75;
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toggleToolStripMenuItem,
|
||||
this.removeSelectedToolStripMenuItem,
|
||||
this.disableAllCheatsToolStripMenuItem1});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(169, 70);
|
||||
//
|
||||
// toggleToolStripMenuItem
|
||||
//
|
||||
this.toggleToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Refresh1;
|
||||
this.toggleToolStripMenuItem.Name = "toggleToolStripMenuItem";
|
||||
this.toggleToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
|
||||
this.toggleToolStripMenuItem.Text = "Toggle";
|
||||
this.toggleToolStripMenuItem.Click += new System.EventHandler(this.toggleToolStripMenuItem_Click);
|
||||
//
|
||||
// removeSelectedToolStripMenuItem
|
||||
//
|
||||
this.removeSelectedToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Delete;
|
||||
this.removeSelectedToolStripMenuItem.Name = "removeSelectedToolStripMenuItem";
|
||||
this.removeSelectedToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
|
||||
this.removeSelectedToolStripMenuItem.Text = "Remove Selected";
|
||||
this.removeSelectedToolStripMenuItem.Click += new System.EventHandler(this.removeSelectedToolStripMenuItem_Click);
|
||||
//
|
||||
// disableAllCheatsToolStripMenuItem1
|
||||
//
|
||||
this.disableAllCheatsToolStripMenuItem1.Image = global::BizHawk.MultiClient.Properties.Resources.Stop;
|
||||
this.disableAllCheatsToolStripMenuItem1.Name = "disableAllCheatsToolStripMenuItem1";
|
||||
this.disableAllCheatsToolStripMenuItem1.Size = new System.Drawing.Size(168, 22);
|
||||
this.disableAllCheatsToolStripMenuItem1.Text = "Disable All Cheats";
|
||||
this.disableAllCheatsToolStripMenuItem1.Click += new System.EventHandler(this.disableAllCheatsToolStripMenuItem1_Click);
|
||||
//
|
||||
// Cheats
|
||||
//
|
||||
this.AllowDrop = true;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(587, 328);
|
||||
this.Controls.Add(this.NumCheatsLabel);
|
||||
this.Controls.Add(this.AddCheatGroup);
|
||||
this.Controls.Add(this.MessageLabel);
|
||||
this.Controls.Add(this.toolStrip1);
|
||||
this.Controls.Add(this.CheatListView);
|
||||
this.Controls.Add(this.CheatsMenu);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MainMenuStrip = this.CheatsMenu;
|
||||
this.MinimumSize = new System.Drawing.Size(285, 311);
|
||||
this.Name = "Cheats";
|
||||
this.Text = "Cheats";
|
||||
this.Load += new System.EventHandler(this.Cheats_Load);
|
||||
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.Cheats_DragDrop);
|
||||
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.Cheats_DragEnter);
|
||||
this.CheatsMenu.ResumeLayout(false);
|
||||
this.CheatsMenu.PerformLayout();
|
||||
this.toolStrip1.ResumeLayout(false);
|
||||
this.toolStrip1.PerformLayout();
|
||||
this.AddCheatGroup.ResumeLayout(false);
|
||||
this.AddCheatGroup.PerformLayout();
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private VirtualListView CheatListView;
|
||||
private MenuStripEx CheatsMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem appendFileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem cheatsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem addCheatToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem removeCheatToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem moveUpToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem moveDownToolStripMenuItem;
|
||||
private System.Windows.Forms.ColumnHeader CheatName;
|
||||
private System.Windows.Forms.ColumnHeader Address;
|
||||
private System.Windows.Forms.ColumnHeader Value;
|
||||
private System.Windows.Forms.ColumnHeader Domain;
|
||||
private System.Windows.Forms.ColumnHeader On;
|
||||
private System.Windows.Forms.ToolStripMenuItem duplicateToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
|
||||
private ToolStripEx toolStrip1;
|
||||
private System.Windows.Forms.ToolStripButton newToolStripButton;
|
||||
private System.Windows.Forms.ToolStripButton openToolStripButton;
|
||||
private System.Windows.Forms.ToolStripButton saveToolStripButton;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator;
|
||||
private System.Windows.Forms.ToolStripButton cutToolStripButton;
|
||||
private System.Windows.Forms.ToolStripButton copyToolStripButton;
|
||||
private System.Windows.Forms.ToolStripMenuItem insertSeparatorToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButtonMoveUp;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButtonSeparator;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButtonMoveDown;
|
||||
private System.Windows.Forms.Label MessageLabel;
|
||||
private System.Windows.Forms.ToolStripMenuItem recentToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveWindowPositionToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem LoadCheatFileByGameToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem CheatsOnOffLoadToolStripMenuItem;
|
||||
private System.Windows.Forms.GroupBox AddCheatGroup;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox AddressBox;
|
||||
private System.Windows.Forms.TextBox NameBox;
|
||||
private System.Windows.Forms.TextBox ValueBox;
|
||||
private System.Windows.Forms.Button AddCheatButton;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label NumCheatsLabel;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
|
||||
private System.Windows.Forms.ComboBox DomainComboBox;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Button EditButton;
|
||||
private System.Windows.Forms.ToolStripMenuItem restoreWindowSizeToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
|
||||
private System.Windows.Forms.ToolStripMenuItem disableAllCheatsToolStripMenuItem;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem disableAllCheatsToolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem toggleToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem removeSelectedToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem autoloadDialogToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveCheatsOnCloseToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem selectAllToolStripMenuItem;
|
||||
private System.Windows.Forms.ColumnHeader Compare;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.TextBox CompareBox;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
|
||||
private System.Windows.Forms.ToolStripMenuItem openGameGenieEncoderDecoderToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButtonLoadGameGenie;
|
||||
private System.Windows.Forms.ToolStripMenuItem showValuesAsHexToolStripMenuItem;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -312,7 +312,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
switch (column)
|
||||
{
|
||||
case NewCheatForm.NAME:
|
||||
case Cheats.NAME:
|
||||
if (reverse)
|
||||
{
|
||||
_cheatList = _cheatList
|
||||
|
@ -328,7 +328,7 @@ namespace BizHawk.MultiClient
|
|||
.ToList();
|
||||
}
|
||||
break;
|
||||
case NewCheatForm.ADDRESS:
|
||||
case Cheats.ADDRESS:
|
||||
if (reverse)
|
||||
{
|
||||
_cheatList = _cheatList
|
||||
|
@ -344,7 +344,7 @@ namespace BizHawk.MultiClient
|
|||
.ToList();
|
||||
}
|
||||
break;
|
||||
case NewCheatForm.VALUE:
|
||||
case Cheats.VALUE:
|
||||
if (reverse)
|
||||
{
|
||||
_cheatList = _cheatList
|
||||
|
@ -362,7 +362,7 @@ namespace BizHawk.MultiClient
|
|||
.ToList();
|
||||
}
|
||||
break;
|
||||
case NewCheatForm.COMPARE:
|
||||
case Cheats.COMPARE:
|
||||
if (reverse)
|
||||
{
|
||||
_cheatList = _cheatList
|
||||
|
@ -380,7 +380,7 @@ namespace BizHawk.MultiClient
|
|||
.ToList();
|
||||
}
|
||||
break;
|
||||
case NewCheatForm.ON:
|
||||
case Cheats.ON:
|
||||
if (reverse)
|
||||
{
|
||||
_cheatList = _cheatList
|
||||
|
@ -398,7 +398,7 @@ namespace BizHawk.MultiClient
|
|||
.ToList();
|
||||
}
|
||||
break;
|
||||
case NewCheatForm.DOMAIN:
|
||||
case Cheats.DOMAIN:
|
||||
if (reverse)
|
||||
{
|
||||
_cheatList = _cheatList
|
||||
|
@ -416,7 +416,7 @@ namespace BizHawk.MultiClient
|
|||
.ToList();
|
||||
}
|
||||
break;
|
||||
case NewCheatForm.SIZE:
|
||||
case Cheats.SIZE:
|
||||
if (reverse)
|
||||
{
|
||||
_cheatList = _cheatList
|
||||
|
@ -434,7 +434,7 @@ namespace BizHawk.MultiClient
|
|||
.ToList();
|
||||
}
|
||||
break;
|
||||
case NewCheatForm.ENDIAN:
|
||||
case Cheats.ENDIAN:
|
||||
if (reverse)
|
||||
{
|
||||
_cheatList = _cheatList
|
||||
|
@ -452,7 +452,7 @@ namespace BizHawk.MultiClient
|
|||
.ToList();
|
||||
}
|
||||
break;
|
||||
case NewCheatForm.TYPE:
|
||||
case Cheats.TYPE:
|
||||
if (reverse)
|
||||
{
|
||||
_cheatList = _cheatList
|
||||
|
@ -576,7 +576,7 @@ namespace BizHawk.MultiClient
|
|||
var sfd = new SaveFileDialog();
|
||||
if (!String.IsNullOrWhiteSpace(_currentFileName))
|
||||
{
|
||||
sfd.FileName = Path.GetFileNameWithoutExtension(Global.CheatList_Legacy.CurrentCheatFile);
|
||||
sfd.FileName = Path.GetFileNameWithoutExtension(_currentFileName);
|
||||
}
|
||||
else if (!(Global.Emulator is NullEmulator))
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace BizHawk.MultiClient
|
||||
{
|
||||
partial class NewCheatForm
|
||||
partial class Cheats
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
|
@ -29,7 +29,7 @@
|
|||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NewCheatForm));
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Cheats));
|
||||
this.CheatListView = new BizHawk.VirtualListView();
|
||||
this.CheatName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.Address = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
|
|
|
@ -15,7 +15,7 @@ using BizHawk.Emulation.Consoles.Sega;
|
|||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class NewCheatForm : Form
|
||||
public partial class Cheats : Form
|
||||
{
|
||||
public const string NAME = "NamesColumn";
|
||||
public const string ADDRESS = "AddressColumn";
|
||||
|
@ -45,7 +45,7 @@ namespace BizHawk.MultiClient
|
|||
private string _sortedColumn = "";
|
||||
private bool _sortReverse = false;
|
||||
|
||||
public NewCheatForm()
|
||||
public Cheats()
|
||||
{
|
||||
InitializeComponent();
|
||||
Closing += (o, e) => SaveConfigSettings();
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public static class MemoryPulse
|
||||
{
|
||||
public class MemoryPulseEntry
|
||||
{
|
||||
public int address;
|
||||
public byte value;
|
||||
public byte? compare;
|
||||
public MemoryDomain domain;
|
||||
}
|
||||
|
||||
private static readonly List<MemoryPulseEntry> entries = new List<MemoryPulseEntry>();
|
||||
|
||||
public static void Pulse()
|
||||
{
|
||||
foreach (var entry in entries)
|
||||
{
|
||||
if (entry.compare.HasValue)
|
||||
{
|
||||
if (entry.domain.PeekByte(entry.address) == entry.compare)
|
||||
{
|
||||
entry.domain.PokeByte(entry.address, entry.value);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
entry.domain.PokeByte(entry.address, entry.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void Add(MemoryDomain domain, int address, byte value, byte? compare = null)
|
||||
{
|
||||
entries.RemoveAll(o => o.domain == domain && o.address == address);
|
||||
|
||||
var entry = new MemoryPulseEntry { address = address, value = value, domain = domain };
|
||||
entries.Add(entry);
|
||||
}
|
||||
|
||||
public static MemoryPulseEntry Query(MemoryDomain domain, int address, byte? compare = null)
|
||||
{
|
||||
if (compare.HasValue)
|
||||
{
|
||||
return entries.Find(o => o.domain == domain && o.address == address && o.compare == compare);
|
||||
}
|
||||
else
|
||||
{
|
||||
return entries.Find(o => o.domain == domain && o.address == address);
|
||||
}
|
||||
}
|
||||
|
||||
public static void Remove(MemoryDomain domain, int address)
|
||||
{
|
||||
entries.RemoveAll(o => o.domain == domain && o.address == address);
|
||||
}
|
||||
|
||||
public static IList<MemoryPulseEntry> GetEntries()
|
||||
{
|
||||
return entries.AsReadOnly();
|
||||
}
|
||||
|
||||
public static void Clear()
|
||||
{
|
||||
entries.Clear();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue