diff --git a/BizHawk.MultiClient/PlayMovie.cs b/BizHawk.MultiClient/PlayMovie.cs index 3619822bbf..f351c53a02 100644 --- a/BizHawk.MultiClient/PlayMovie.cs +++ b/BizHawk.MultiClient/PlayMovie.cs @@ -10,203 +10,203 @@ using System.IO; namespace BizHawk.MultiClient { - public partial class PlayMovie : Form - { - //TODO: after browse & update, focus on the movie just added, and show stats - //This is a modal dialog, implement it as modeless - // Option to include subdirectories - // Option to include savestate files (that have an input log) - //Clicking column headers should sort info - //AddMovieToList should check for duplicates and not add them + public partial class PlayMovie : Form + { + //TODO: after browse & update, focus on the movie just added, and show stats + //This is a modal dialog, implement it as modeless + // Option to include subdirectories + // Option to include savestate files (that have an input log) + //Clicking column headers should sort info + //AddMovieToList should check for duplicates and not add them - List MovieList = new List(); - bool sortReverse; - string sortedCol; + List MovieList = new List(); + bool sortReverse; + string sortedCol; - public PlayMovie() - { - InitializeComponent(); - MovieView.QueryItemText += new QueryItemTextHandler(MovieView_QueryItemText); - MovieView.QueryItemBkColor += new QueryItemBkColorHandler(MovieView_QueryItemBkColor); - MovieView.VirtualMode = true; - sortReverse = false; - sortedCol = ""; - } + public PlayMovie() + { + InitializeComponent(); + MovieView.QueryItemText += new QueryItemTextHandler(MovieView_QueryItemText); + MovieView.QueryItemBkColor += new QueryItemBkColorHandler(MovieView_QueryItemBkColor); + MovieView.VirtualMode = true; + sortReverse = false; + sortedCol = ""; + } - void MovieView_QueryItemText(int index, int column, out string text) - { - text = ""; - if (column == 0) //File - text = Path.GetFileName(MovieList[index].GetFilePath()); - if (column == 1) //System - text = MovieList[index].GetSysID(); - if (column == 2) //Game - text = MovieList[index].GetGameName(); - if (column == 3) //Time - text = MovieList[index].GetTime(true); - } + void MovieView_QueryItemText(int index, int column, out string text) + { + text = ""; + if (column == 0) //File + text = Path.GetFileName(MovieList[index].GetFilePath()); + if (column == 1) //System + text = MovieList[index].GetSysID(); + if (column == 2) //Game + text = MovieList[index].GetGameName(); + if (column == 3) //Time + text = MovieList[index].GetTime(true); + } - private void MovieView_QueryItemBkColor(int index, int column, ref Color color) - { - - } + private void MovieView_QueryItemBkColor(int index, int column, ref Color color) + { - private void Cancel_Click(object sender, EventArgs e) - { - this.Close(); - } + } - private void Run() - { - Global.MainForm.StartNewMovie(MovieList[MovieView.SelectedIndices[0]], false); - } + private void Cancel_Click(object sender, EventArgs e) + { + this.Close(); + } - private void OK_Click(object sender, EventArgs e) - { - Global.MainForm.ReadOnly = ReadOnlyCheckBox.Checked; - Run(); - this.Close(); - } + private void Run() + { + Global.MainForm.StartNewMovie(MovieList[MovieView.SelectedIndices[0]], false); + } - private void BrowseMovies_Click(object sender, EventArgs e) - { - OpenFileDialog ofd = new OpenFileDialog(); - ofd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.MoviesPath, ""); - ofd.Filter = "Movie files (*.tas)|*.TAS;*.ZIP;*.7z|FCEUX Movies|*.FM2|PCEjin Movies|*.PCE|Archive Files|*.zip;*.7z|All Files|*.*"; - - Global.Sound.StopSound(); - var result = ofd.ShowDialog(); - Global.Sound.StartSound(); - if (result == DialogResult.OK) - { - var file = new FileInfo(ofd.FileName); - if (!file.Exists) - return; - else - { - AddMovieToList(ofd.FileName); - } - } - } + private void OK_Click(object sender, EventArgs e) + { + Global.MainForm.ReadOnly = ReadOnlyCheckBox.Checked; + Run(); + this.Close(); + } - private void AddMovieToList(string filename) - { - var file = new HawkFile(filename); - if (!file.Exists) - return; - else - { - PreLoadMovieFile(file); - MovieView.ItemCount = MovieList.Count; - UpdateList(); - MovieView.SelectedIndices.Clear(); - MovieView.setSelection(MovieList.Count - 1); - sortReverse = false; - sortedCol = ""; - } - } + private void BrowseMovies_Click(object sender, EventArgs e) + { + OpenFileDialog ofd = new OpenFileDialog(); + ofd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.MoviesPath, ""); + ofd.Filter = "Movie files (*.tas)|*.TAS;*.ZIP;*.7z|FCEUX Movies|*.FM2|PCEjin Movies|*.PCE|Archive Files|*.zip;*.7z|All Files|*.*"; - private void PreLoadMovieFile(HawkFile path) - { - Movie m = new Movie(path.CanonicalFullPath, MOVIEMODE.INACTIVE); - m.PreLoadText(); - //m.LoadMovie(); - if (path.Extension.ToUpper() == ".FM2") - m.SetHeaderLine(MovieHeader.PLATFORM, "NES"); - else if (path.Extension.ToUpper() == ".MC2") - m.SetHeaderLine(MovieHeader.PLATFORM, "PCE"); - MovieList.Add(m); - } + Global.Sound.StopSound(); + var result = ofd.ShowDialog(); + Global.Sound.StartSound(); + if (result == DialogResult.OK) + { + var file = new FileInfo(ofd.FileName); + if (!file.Exists) + return; + else + { + AddMovieToList(ofd.FileName); + } + } + } - private void UpdateList() - { - MovieView.Refresh(); - UpdateMovieCount(); - } + private void AddMovieToList(string filename) + { + var file = new HawkFile(filename); + if (!file.Exists) + return; + else + { + PreLoadMovieFile(file); + MovieView.ItemCount = MovieList.Count; + UpdateList(); + MovieView.SelectedIndices.Clear(); + MovieView.setSelection(MovieList.Count - 1); + sortReverse = false; + sortedCol = ""; + } + } - private void UpdateMovieCount() - { - int x = MovieList.Count; - if (x == 1) - MovieCount.Text = x.ToString() + " movie"; - else - MovieCount.Text = x.ToString() + " movies"; - } + private void PreLoadMovieFile(HawkFile path) + { + Movie m = new Movie(path.CanonicalFullPath, MOVIEMODE.INACTIVE); + m.PreLoadText(); + //m.LoadMovie(); + if (path.Extension.ToUpper() == ".FM2") + m.SetHeaderLine(MovieHeader.PLATFORM, "NES"); + else if (path.Extension.ToUpper() == ".MC2") + m.SetHeaderLine(MovieHeader.PLATFORM, "PCE"); + MovieList.Add(m); + } - private void PlayMovie_Load(object sender, EventArgs e) - { - string d = PathManager.MakeAbsolutePath(Global.Config.MoviesPath, ""); - if (!Directory.Exists(d)) - Directory.CreateDirectory(d); - foreach (string f in Directory.GetFiles(d, "*.tas")) - AddMovieToList(f); - foreach (string f in Directory.GetFiles(d, "*.fm2")) - AddMovieToList(f); - foreach (string f in Directory.GetFiles(d, "*.mc2")) - AddMovieToList(f); - } + private void UpdateList() + { + MovieView.Refresh(); + UpdateMovieCount(); + } - private void MovieView_SelectedIndexChanged(object sender, EventArgs e) - { - DetailsView.Items.Clear(); - int x = MovieView.SelectedIndices[0]; - Dictionary h = MovieList[x].GetHeaderInfo(); - - foreach (var kvp in h) - { - ListViewItem item = new ListViewItem(kvp.Key); - item.SubItems.Add(kvp.Value); - DetailsView.Items.Add(item); - } - } + private void UpdateMovieCount() + { + int x = MovieList.Count; + if (x == 1) + MovieCount.Text = x.ToString() + " movie"; + else + MovieCount.Text = x.ToString() + " movies"; + } - private void button1_Click(object sender, EventArgs e) - { - //TODO: a comments viewer/editor - } + private void PlayMovie_Load(object sender, EventArgs e) + { + string d = PathManager.MakeAbsolutePath(Global.Config.MoviesPath, ""); + if (!Directory.Exists(d)) + Directory.CreateDirectory(d); + foreach (string f in Directory.GetFiles(d, "*.tas")) + AddMovieToList(f); + foreach (string f in Directory.GetFiles(d, "*.fm2")) + AddMovieToList(f); + foreach (string f in Directory.GetFiles(d, "*.mc2")) + AddMovieToList(f); + } - private void button2_Click(object sender, EventArgs e) - { - //TODO: a subtitle viewer/editor - } + private void MovieView_SelectedIndexChanged(object sender, EventArgs e) + { + DetailsView.Items.Clear(); + int x = MovieView.SelectedIndices[0]; + Dictionary h = MovieList[x].GetHeaderInfo(); - private void MovieView_DoubleClick(object sender, EventArgs e) - { - Run(); - this.Close(); - } + foreach (var kvp in h) + { + ListViewItem item = new ListViewItem(kvp.Key); + item.SubItems.Add(kvp.Value); + DetailsView.Items.Add(item); + } + } - private void MovieView_DragEnter(object sender, DragEventArgs e) - { - e.Effect = e.Data.GetDataPresent(DataFormats.FileDrop) ? DragDropEffects.Copy : DragDropEffects.None; string[] filePaths = (string[])e.Data.GetData(DataFormats.FileDrop); - } + private void button1_Click(object sender, EventArgs e) + { + //TODO: a comments viewer/editor + } - private void MovieView_DragDrop(object sender, DragEventArgs e) - { - string[] filePaths = (string[])e.Data.GetData(DataFormats.FileDrop); - foreach (string path in filePaths) - { - if (Path.GetExtension(path) == ".tas" || Path.GetExtension(path) == ".fm2" || - Path.GetExtension(path) == ".mc2") - AddMovieToList(path); - } - } + private void button2_Click(object sender, EventArgs e) + { + //TODO: a subtitle viewer/editor + } - private void MovieView_ColumnClick(object sender, ColumnClickEventArgs e) - { - OrderColumn(e.Column); - } + private void MovieView_DoubleClick(object sender, EventArgs e) + { + Run(); + this.Close(); + } - private void OrderColumn(int columnToOrder) - { - string columnName = MovieView.Columns[columnToOrder].Text; - if (sortedCol.CompareTo(columnName) != 0) - sortReverse = false; - MovieList.Sort((x, y) => x.CompareTo(y, columnName) * (sortReverse ? -1 : 1)); - sortedCol = columnName; - sortReverse = !(sortReverse); - MovieView.Refresh(); - } + private void MovieView_DragEnter(object sender, DragEventArgs e) + { + e.Effect = e.Data.GetDataPresent(DataFormats.FileDrop) ? DragDropEffects.Copy : DragDropEffects.None; string[] filePaths = (string[])e.Data.GetData(DataFormats.FileDrop); + } - } + private void MovieView_DragDrop(object sender, DragEventArgs e) + { + string[] filePaths = (string[])e.Data.GetData(DataFormats.FileDrop); + foreach (string path in filePaths) + { + if (Path.GetExtension(path) == ".tas" || Path.GetExtension(path) == ".fm2" || + Path.GetExtension(path) == ".mc2") + AddMovieToList(path); + } + } + + private void MovieView_ColumnClick(object sender, ColumnClickEventArgs e) + { + OrderColumn(e.Column); + } + + private void OrderColumn(int columnToOrder) + { + string columnName = MovieView.Columns[columnToOrder].Text; + if (sortedCol.CompareTo(columnName) != 0) + sortReverse = false; + MovieList.Sort((x, y) => x.CompareTo(y, columnName) * (sortReverse ? -1 : 1)); + sortedCol = columnName; + sortReverse = !(sortReverse); + MovieView.Refresh(); + } + + } } diff --git a/BizHawk.MultiClient/tools/RamSearch.Designer.cs b/BizHawk.MultiClient/tools/RamSearch.Designer.cs index 8d6cdb6085..5013eda2c3 100644 --- a/BizHawk.MultiClient/tools/RamSearch.Designer.cs +++ b/BizHawk.MultiClient/tools/RamSearch.Designer.cs @@ -28,129 +28,129 @@ /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RamSearch)); - this.SearchtoolStrip1 = new System.Windows.Forms.ToolStrip(); - 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.TruncateFromFiletoolStripButton2 = new System.Windows.Forms.ToolStripButton(); - this.ExcludeRamWatchtoolStripButton2 = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); - this.PoketoolStripButton1 = new System.Windows.Forms.ToolStripButton(); - this.FreezeAddressToolStrip = new System.Windows.Forms.ToolStripButton(); - this.TotalSearchLabel = new System.Windows.Forms.Label(); - this.SearchListView = new BizHawk.VirtualListView(); - this.Address = new System.Windows.Forms.ColumnHeader(); - this.Value = new System.Windows.Forms.ColumnHeader(); - this.Previous = new System.Windows.Forms.ColumnHeader(); - this.Changes = new System.Windows.Forms.ColumnHeader(); - this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); - this.startNewSearchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.searchToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); - this.removeSelectedToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.addToRamWatchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.pokeAddressToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.freezeAddressToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.menuStrip1 = new System.Windows.Forms.MenuStrip(); - this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.newSearchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - 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.TruncateFromFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.recentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.noneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); - this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.autoLoadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); - this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.searchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.memoryDomainsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.searchToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.undoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.copyValueToPrevToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.clearChangeCountsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.removeSelectedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.exludeRamWatchListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); - this.addSelectedToRamWatchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.pokeAddressToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.freezeAddressToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.definePreviousValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.sinceLastSearchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.originalValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.sinceLastFrameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.restoreOriginalWindowSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveWindowPositionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.previewModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.alwaysExludeRamSearchListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); - this.toolStrip1 = new System.Windows.Forms.ToolStrip(); - this.NewSearchtoolStripButton = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); - this.SetCurrToPrevtoolStripButton2 = new System.Windows.Forms.ToolStripButton(); - this.ClearChangeCountstoolStripButton = new System.Windows.Forms.ToolStripButton(); - this.UndotoolStripButton = new System.Windows.Forms.ToolStripButton(); - this.WatchtoolStripButton1 = new System.Windows.Forms.ToolStripButton(); - this.toolStrip2 = new System.Windows.Forms.ToolStrip(); - this.DataSizetoolStripSplitButton1 = new System.Windows.Forms.ToolStripSplitButton(); - this.byteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.bytesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.dWordToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.DataTypetoolStripSplitButton1 = new System.Windows.Forms.ToolStripSplitButton(); - this.unsignedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.signedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.hexadecimalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); - this.includeMisalignedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.EndiantoolSplitButton = new System.Windows.Forms.ToolStripSplitButton(); - this.bigEndianToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.littleEndianToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.CompareToBox = new System.Windows.Forms.GroupBox(); - this.label1 = new System.Windows.Forms.Label(); - this.NumberOfChangesBox = new System.Windows.Forms.TextBox(); - this.SpecificAddressBox = new System.Windows.Forms.TextBox(); - this.SpecificValueBox = new System.Windows.Forms.TextBox(); - this.NumberOfChangesRadio = new System.Windows.Forms.RadioButton(); - this.SpecificAddressRadio = new System.Windows.Forms.RadioButton(); - this.SpecificValueRadio = new System.Windows.Forms.RadioButton(); - this.PreviousValueRadio = new System.Windows.Forms.RadioButton(); - this.ComparisonBox = new System.Windows.Forms.GroupBox(); - this.DifferentByBox = new System.Windows.Forms.TextBox(); - this.DifferentByRadio = new System.Windows.Forms.RadioButton(); - this.NotEqualToRadio = new System.Windows.Forms.RadioButton(); - this.EqualToRadio = new System.Windows.Forms.RadioButton(); - this.GreaterThanOrEqualToRadio = new System.Windows.Forms.RadioButton(); - this.LessThanOrEqualToRadio = new System.Windows.Forms.RadioButton(); - this.GreaterThanRadio = new System.Windows.Forms.RadioButton(); - this.LessThanRadio = new System.Windows.Forms.RadioButton(); - this.AutoSearchCheckBox = new System.Windows.Forms.CheckBox(); - this.MemDomainLabel = new System.Windows.Forms.Label(); - this.OutputLabel = new System.Windows.Forms.Label(); - this.SearchtoolStrip1.SuspendLayout(); - this.contextMenuStrip1.SuspendLayout(); - this.menuStrip1.SuspendLayout(); - this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); - this.toolStripContainer1.SuspendLayout(); - this.toolStrip1.SuspendLayout(); - this.toolStrip2.SuspendLayout(); - this.CompareToBox.SuspendLayout(); - this.ComparisonBox.SuspendLayout(); - this.SuspendLayout(); - // - // SearchtoolStrip1 - // - this.SearchtoolStrip1.Dock = System.Windows.Forms.DockStyle.None; - this.SearchtoolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RamSearch)); + this.SearchtoolStrip1 = new System.Windows.Forms.ToolStrip(); + 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.TruncateFromFiletoolStripButton2 = new System.Windows.Forms.ToolStripButton(); + this.ExcludeRamWatchtoolStripButton2 = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); + this.PoketoolStripButton1 = new System.Windows.Forms.ToolStripButton(); + this.FreezeAddressToolStrip = new System.Windows.Forms.ToolStripButton(); + this.TotalSearchLabel = new System.Windows.Forms.Label(); + this.SearchListView = new BizHawk.VirtualListView(); + this.Address = new System.Windows.Forms.ColumnHeader(); + this.Value = new System.Windows.Forms.ColumnHeader(); + this.Previous = new System.Windows.Forms.ColumnHeader(); + this.Changes = new System.Windows.Forms.ColumnHeader(); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.startNewSearchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.searchToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); + this.removeSelectedToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.addToRamWatchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.pokeAddressToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.freezeAddressToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.newSearchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + 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.TruncateFromFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.recentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.noneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.autoLoadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); + this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.searchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.memoryDomainsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.searchToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.undoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.copyValueToPrevToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.clearChangeCountsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.removeSelectedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.exludeRamWatchListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); + this.addSelectedToRamWatchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.pokeAddressToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.freezeAddressToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.definePreviousValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.sinceLastSearchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.originalValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.sinceLastFrameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.restoreOriginalWindowSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveWindowPositionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.previewModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.alwaysExludeRamSearchListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.NewSearchtoolStripButton = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); + this.SetCurrToPrevtoolStripButton2 = new System.Windows.Forms.ToolStripButton(); + this.ClearChangeCountstoolStripButton = new System.Windows.Forms.ToolStripButton(); + this.UndotoolStripButton = new System.Windows.Forms.ToolStripButton(); + this.WatchtoolStripButton1 = new System.Windows.Forms.ToolStripButton(); + this.toolStrip2 = new System.Windows.Forms.ToolStrip(); + this.DataSizetoolStripSplitButton1 = new System.Windows.Forms.ToolStripSplitButton(); + this.byteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.bytesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.dWordToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.DataTypetoolStripSplitButton1 = new System.Windows.Forms.ToolStripSplitButton(); + this.unsignedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.signedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.hexadecimalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.includeMisalignedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.EndiantoolSplitButton = new System.Windows.Forms.ToolStripSplitButton(); + this.bigEndianToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.littleEndianToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.CompareToBox = new System.Windows.Forms.GroupBox(); + this.label1 = new System.Windows.Forms.Label(); + this.NumberOfChangesBox = new System.Windows.Forms.TextBox(); + this.SpecificAddressBox = new System.Windows.Forms.TextBox(); + this.SpecificValueBox = new System.Windows.Forms.TextBox(); + this.NumberOfChangesRadio = new System.Windows.Forms.RadioButton(); + this.SpecificAddressRadio = new System.Windows.Forms.RadioButton(); + this.SpecificValueRadio = new System.Windows.Forms.RadioButton(); + this.PreviousValueRadio = new System.Windows.Forms.RadioButton(); + this.ComparisonBox = new System.Windows.Forms.GroupBox(); + this.DifferentByBox = new System.Windows.Forms.TextBox(); + this.DifferentByRadio = new System.Windows.Forms.RadioButton(); + this.NotEqualToRadio = new System.Windows.Forms.RadioButton(); + this.EqualToRadio = new System.Windows.Forms.RadioButton(); + this.GreaterThanOrEqualToRadio = new System.Windows.Forms.RadioButton(); + this.LessThanOrEqualToRadio = new System.Windows.Forms.RadioButton(); + this.GreaterThanRadio = new System.Windows.Forms.RadioButton(); + this.LessThanRadio = new System.Windows.Forms.RadioButton(); + this.AutoSearchCheckBox = new System.Windows.Forms.CheckBox(); + this.MemDomainLabel = new System.Windows.Forms.Label(); + this.OutputLabel = new System.Windows.Forms.Label(); + this.SearchtoolStrip1.SuspendLayout(); + this.contextMenuStrip1.SuspendLayout(); + this.menuStrip1.SuspendLayout(); + this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); + this.toolStripContainer1.SuspendLayout(); + this.toolStrip1.SuspendLayout(); + this.toolStrip2.SuspendLayout(); + this.CompareToBox.SuspendLayout(); + this.ComparisonBox.SuspendLayout(); + this.SuspendLayout(); + // + // SearchtoolStrip1 + // + this.SearchtoolStrip1.Dock = System.Windows.Forms.DockStyle.None; + this.SearchtoolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.openToolStripButton, this.saveToolStripButton, this.toolStripSeparator, @@ -160,157 +160,158 @@ this.toolStripSeparator8, this.PoketoolStripButton1, this.FreezeAddressToolStrip}); - this.SearchtoolStrip1.Location = new System.Drawing.Point(3, 25); - this.SearchtoolStrip1.Name = "SearchtoolStrip1"; - this.SearchtoolStrip1.Size = new System.Drawing.Size(183, 25); - this.SearchtoolStrip1.TabIndex = 0; - this.SearchtoolStrip1.Text = "Search"; - // - // 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.ToolTipText = "Open Search List"; - 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.ToolTipText = "Save Watch List"; - this.saveToolStripButton.Click += new System.EventHandler(this.saveToolStripMenuItem_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.BuilderDialog_delete; - this.cutToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.cutToolStripButton.Name = "cutToolStripButton"; - this.cutToolStripButton.Size = new System.Drawing.Size(23, 22); - this.cutToolStripButton.Text = "C&ut"; - this.cutToolStripButton.ToolTipText = "Eliminate Selected Items"; - this.cutToolStripButton.Click += new System.EventHandler(this.cutToolStripButton_Click); - // - // TruncateFromFiletoolStripButton2 - // - this.TruncateFromFiletoolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.TruncateFromFiletoolStripButton2.Image = global::BizHawk.MultiClient.Properties.Resources.TruncateFromFile; - this.TruncateFromFiletoolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; - this.TruncateFromFiletoolStripButton2.Name = "TruncateFromFiletoolStripButton2"; - this.TruncateFromFiletoolStripButton2.Size = new System.Drawing.Size(23, 22); - this.TruncateFromFiletoolStripButton2.Text = "Eliminate from File"; - this.TruncateFromFiletoolStripButton2.Click += new System.EventHandler(this.TruncateFromFiletoolStripButton2_Click); - // - // ExcludeRamWatchtoolStripButton2 - // - this.ExcludeRamWatchtoolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.ExcludeRamWatchtoolStripButton2.Image = global::BizHawk.MultiClient.Properties.Resources.TruncateFromRW; - this.ExcludeRamWatchtoolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ExcludeRamWatchtoolStripButton2.Name = "ExcludeRamWatchtoolStripButton2"; - this.ExcludeRamWatchtoolStripButton2.Size = new System.Drawing.Size(23, 22); - this.ExcludeRamWatchtoolStripButton2.Text = "Elmininate Ram Watch list"; - this.ExcludeRamWatchtoolStripButton2.Click += new System.EventHandler(this.ExcludeRamWatchtoolStripButton2_Click); - // - // toolStripSeparator8 - // - this.toolStripSeparator8.Name = "toolStripSeparator8"; - this.toolStripSeparator8.Size = new System.Drawing.Size(6, 25); - // - // PoketoolStripButton1 - // - this.PoketoolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.PoketoolStripButton1.Image = global::BizHawk.MultiClient.Properties.Resources.poke; - this.PoketoolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; - this.PoketoolStripButton1.Name = "PoketoolStripButton1"; - this.PoketoolStripButton1.Size = new System.Drawing.Size(23, 22); - this.PoketoolStripButton1.Text = "Poke"; - this.PoketoolStripButton1.Click += new System.EventHandler(this.PoketoolStripButton1_Click); - // - // FreezeAddressToolStrip - // - this.FreezeAddressToolStrip.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.FreezeAddressToolStrip.Image = global::BizHawk.MultiClient.Properties.Resources.cheat; - this.FreezeAddressToolStrip.ImageTransparentColor = System.Drawing.Color.Magenta; - this.FreezeAddressToolStrip.Name = "FreezeAddressToolStrip"; - this.FreezeAddressToolStrip.Size = new System.Drawing.Size(23, 22); - this.FreezeAddressToolStrip.Text = "Freeze"; - this.FreezeAddressToolStrip.Click += new System.EventHandler(this.FreezeAddressToolStrip_Click); - // - // TotalSearchLabel - // - this.TotalSearchLabel.AutoSize = true; - this.TotalSearchLabel.Location = new System.Drawing.Point(13, 33); - this.TotalSearchLabel.Name = "TotalSearchLabel"; - this.TotalSearchLabel.Size = new System.Drawing.Size(64, 13); - this.TotalSearchLabel.TabIndex = 2; - this.TotalSearchLabel.Text = "0 addresses"; - // - // SearchListView - // - this.SearchListView.AllowColumnReorder = true; - this.SearchListView.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.SearchListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.SearchtoolStrip1.Location = new System.Drawing.Point(3, 25); + this.SearchtoolStrip1.Name = "SearchtoolStrip1"; + this.SearchtoolStrip1.Size = new System.Drawing.Size(183, 25); + this.SearchtoolStrip1.TabIndex = 0; + this.SearchtoolStrip1.Text = "Search"; + // + // 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.ToolTipText = "Open Search List"; + 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.ToolTipText = "Save Watch List"; + this.saveToolStripButton.Click += new System.EventHandler(this.saveToolStripMenuItem_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.BuilderDialog_delete; + this.cutToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.cutToolStripButton.Name = "cutToolStripButton"; + this.cutToolStripButton.Size = new System.Drawing.Size(23, 22); + this.cutToolStripButton.Text = "C&ut"; + this.cutToolStripButton.ToolTipText = "Eliminate Selected Items"; + this.cutToolStripButton.Click += new System.EventHandler(this.cutToolStripButton_Click); + // + // TruncateFromFiletoolStripButton2 + // + this.TruncateFromFiletoolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.TruncateFromFiletoolStripButton2.Image = global::BizHawk.MultiClient.Properties.Resources.TruncateFromFile; + this.TruncateFromFiletoolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; + this.TruncateFromFiletoolStripButton2.Name = "TruncateFromFiletoolStripButton2"; + this.TruncateFromFiletoolStripButton2.Size = new System.Drawing.Size(23, 22); + this.TruncateFromFiletoolStripButton2.Text = "Eliminate from File"; + this.TruncateFromFiletoolStripButton2.Click += new System.EventHandler(this.TruncateFromFiletoolStripButton2_Click); + // + // ExcludeRamWatchtoolStripButton2 + // + this.ExcludeRamWatchtoolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.ExcludeRamWatchtoolStripButton2.Image = global::BizHawk.MultiClient.Properties.Resources.TruncateFromRW; + this.ExcludeRamWatchtoolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; + this.ExcludeRamWatchtoolStripButton2.Name = "ExcludeRamWatchtoolStripButton2"; + this.ExcludeRamWatchtoolStripButton2.Size = new System.Drawing.Size(23, 22); + this.ExcludeRamWatchtoolStripButton2.Text = "Elmininate Ram Watch list"; + this.ExcludeRamWatchtoolStripButton2.Click += new System.EventHandler(this.ExcludeRamWatchtoolStripButton2_Click); + // + // toolStripSeparator8 + // + this.toolStripSeparator8.Name = "toolStripSeparator8"; + this.toolStripSeparator8.Size = new System.Drawing.Size(6, 25); + // + // PoketoolStripButton1 + // + this.PoketoolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.PoketoolStripButton1.Image = global::BizHawk.MultiClient.Properties.Resources.poke; + this.PoketoolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; + this.PoketoolStripButton1.Name = "PoketoolStripButton1"; + this.PoketoolStripButton1.Size = new System.Drawing.Size(23, 22); + this.PoketoolStripButton1.Text = "Poke"; + this.PoketoolStripButton1.Click += new System.EventHandler(this.PoketoolStripButton1_Click); + // + // FreezeAddressToolStrip + // + this.FreezeAddressToolStrip.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.FreezeAddressToolStrip.Image = global::BizHawk.MultiClient.Properties.Resources.cheat; + this.FreezeAddressToolStrip.ImageTransparentColor = System.Drawing.Color.Magenta; + this.FreezeAddressToolStrip.Name = "FreezeAddressToolStrip"; + this.FreezeAddressToolStrip.Size = new System.Drawing.Size(23, 22); + this.FreezeAddressToolStrip.Text = "Freeze"; + this.FreezeAddressToolStrip.Click += new System.EventHandler(this.FreezeAddressToolStrip_Click); + // + // TotalSearchLabel + // + this.TotalSearchLabel.AutoSize = true; + this.TotalSearchLabel.Location = new System.Drawing.Point(13, 33); + this.TotalSearchLabel.Name = "TotalSearchLabel"; + this.TotalSearchLabel.Size = new System.Drawing.Size(64, 13); + this.TotalSearchLabel.TabIndex = 2; + this.TotalSearchLabel.Text = "0 addresses"; + // + // SearchListView + // + this.SearchListView.AllowColumnReorder = true; + this.SearchListView.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.SearchListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.Address, this.Value, this.Previous, this.Changes}); - this.SearchListView.ContextMenuStrip = this.contextMenuStrip1; - this.SearchListView.GridLines = true; - this.SearchListView.ItemCount = 0; - this.SearchListView.LabelEdit = true; - this.SearchListView.Location = new System.Drawing.Point(9, 58); - this.SearchListView.Name = "SearchListView"; - this.SearchListView.selectedItem = -1; - this.SearchListView.Size = new System.Drawing.Size(223, 365); - this.SearchListView.TabIndex = 3; - this.SearchListView.UseCompatibleStateImageBehavior = false; - this.SearchListView.View = System.Windows.Forms.View.Details; - this.SearchListView.VirtualMode = true; - this.SearchListView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SearchListView_MouseDoubleClick); - this.SearchListView.QueryItemBkColor += new BizHawk.QueryItemBkColorHandler(this.SearchListView_QueryItemBkColor); - this.SearchListView.ColumnReordered += new System.Windows.Forms.ColumnReorderedEventHandler(this.SearchListView_ColumnReordered); - this.SearchListView.QueryItemIndent += new BizHawk.QueryItemIndentHandler(this.SearchListView_QueryItemIndent); - this.SearchListView.QueryItemImage += new BizHawk.QueryItemImageHandler(this.SearchListView_QueryItemImage); - this.SearchListView.QueryItemText += new BizHawk.QueryItemTextHandler(this.SearchListView_QueryItemText); - // - // Address - // - this.Address.Text = "Address"; - this.Address.Width = 66; - // - // Value - // - this.Value.Text = "Value"; - this.Value.Width = 48; - // - // Previous - // - this.Previous.Text = "Prev"; - this.Previous.Width = 48; - // - // Changes - // - this.Changes.Text = "Changes"; - this.Changes.Width = 55; - // - // contextMenuStrip1 - // - this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.SearchListView.ContextMenuStrip = this.contextMenuStrip1; + this.SearchListView.GridLines = true; + this.SearchListView.ItemCount = 0; + this.SearchListView.LabelEdit = true; + this.SearchListView.Location = new System.Drawing.Point(9, 58); + this.SearchListView.Name = "SearchListView"; + this.SearchListView.selectedItem = -1; + this.SearchListView.Size = new System.Drawing.Size(223, 365); + this.SearchListView.TabIndex = 3; + this.SearchListView.UseCompatibleStateImageBehavior = false; + this.SearchListView.View = System.Windows.Forms.View.Details; + this.SearchListView.VirtualMode = true; + this.SearchListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.SearchListView_ColumnClick); + this.SearchListView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SearchListView_MouseDoubleClick); + this.SearchListView.QueryItemBkColor += new BizHawk.QueryItemBkColorHandler(this.SearchListView_QueryItemBkColor); + this.SearchListView.ColumnReordered += new System.Windows.Forms.ColumnReorderedEventHandler(this.SearchListView_ColumnReordered); + this.SearchListView.QueryItemIndent += new BizHawk.QueryItemIndentHandler(this.SearchListView_QueryItemIndent); + this.SearchListView.QueryItemImage += new BizHawk.QueryItemImageHandler(this.SearchListView_QueryItemImage); + this.SearchListView.QueryItemText += new BizHawk.QueryItemTextHandler(this.SearchListView_QueryItemText); + // + // Address + // + this.Address.Text = "Address"; + this.Address.Width = 66; + // + // Value + // + this.Value.Text = "Value"; + this.Value.Width = 48; + // + // Previous + // + this.Previous.Text = "Prev"; + this.Previous.Width = 48; + // + // Changes + // + this.Changes.Text = "Changes"; + this.Changes.Width = 55; + // + // contextMenuStrip1 + // + this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.startNewSearchToolStripMenuItem, this.searchToolStripMenuItem2, this.toolStripSeparator9, @@ -318,72 +319,72 @@ this.addToRamWatchToolStripMenuItem, this.pokeAddressToolStripMenuItem1, this.freezeAddressToolStripMenuItem1}); - this.contextMenuStrip1.Name = "contextMenuStrip1"; - this.contextMenuStrip1.Size = new System.Drawing.Size(176, 142); - this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening); - // - // startNewSearchToolStripMenuItem - // - this.startNewSearchToolStripMenuItem.Name = "startNewSearchToolStripMenuItem"; - this.startNewSearchToolStripMenuItem.Size = new System.Drawing.Size(175, 22); - this.startNewSearchToolStripMenuItem.Text = "&Start New Search"; - this.startNewSearchToolStripMenuItem.Click += new System.EventHandler(this.startNewSearchToolStripMenuItem_Click); - // - // searchToolStripMenuItem2 - // - this.searchToolStripMenuItem2.Name = "searchToolStripMenuItem2"; - this.searchToolStripMenuItem2.Size = new System.Drawing.Size(175, 22); - this.searchToolStripMenuItem2.Text = "&Search"; - this.searchToolStripMenuItem2.Click += new System.EventHandler(this.searchToolStripMenuItem2_Click); - // - // toolStripSeparator9 - // - this.toolStripSeparator9.Name = "toolStripSeparator9"; - this.toolStripSeparator9.Size = new System.Drawing.Size(172, 6); - // - // removeSelectedToolStripMenuItem1 - // - this.removeSelectedToolStripMenuItem1.Name = "removeSelectedToolStripMenuItem1"; - this.removeSelectedToolStripMenuItem1.Size = new System.Drawing.Size(175, 22); - this.removeSelectedToolStripMenuItem1.Text = "Remove Selected"; - this.removeSelectedToolStripMenuItem1.Click += new System.EventHandler(this.removeSelectedToolStripMenuItem1_Click); - // - // addToRamWatchToolStripMenuItem - // - this.addToRamWatchToolStripMenuItem.Name = "addToRamWatchToolStripMenuItem"; - this.addToRamWatchToolStripMenuItem.Size = new System.Drawing.Size(175, 22); - this.addToRamWatchToolStripMenuItem.Text = "Add to Ram Watch"; - this.addToRamWatchToolStripMenuItem.Click += new System.EventHandler(this.addToRamWatchToolStripMenuItem_Click); - // - // pokeAddressToolStripMenuItem1 - // - this.pokeAddressToolStripMenuItem1.Name = "pokeAddressToolStripMenuItem1"; - this.pokeAddressToolStripMenuItem1.Size = new System.Drawing.Size(175, 22); - this.pokeAddressToolStripMenuItem1.Text = "Poke Address"; - this.pokeAddressToolStripMenuItem1.Click += new System.EventHandler(this.pokeAddressToolStripMenuItem1_Click); - // - // freezeAddressToolStripMenuItem1 - // - this.freezeAddressToolStripMenuItem1.Name = "freezeAddressToolStripMenuItem1"; - this.freezeAddressToolStripMenuItem1.Size = new System.Drawing.Size(175, 22); - this.freezeAddressToolStripMenuItem1.Text = "Freeze Address"; - this.freezeAddressToolStripMenuItem1.Click += new System.EventHandler(this.freezeAddressToolStripMenuItem1_Click); - // - // menuStrip1 - // - this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.contextMenuStrip1.Name = "contextMenuStrip1"; + this.contextMenuStrip1.Size = new System.Drawing.Size(176, 142); + this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening); + // + // startNewSearchToolStripMenuItem + // + this.startNewSearchToolStripMenuItem.Name = "startNewSearchToolStripMenuItem"; + this.startNewSearchToolStripMenuItem.Size = new System.Drawing.Size(175, 22); + this.startNewSearchToolStripMenuItem.Text = "&Start New Search"; + this.startNewSearchToolStripMenuItem.Click += new System.EventHandler(this.startNewSearchToolStripMenuItem_Click); + // + // searchToolStripMenuItem2 + // + this.searchToolStripMenuItem2.Name = "searchToolStripMenuItem2"; + this.searchToolStripMenuItem2.Size = new System.Drawing.Size(175, 22); + this.searchToolStripMenuItem2.Text = "&Search"; + this.searchToolStripMenuItem2.Click += new System.EventHandler(this.searchToolStripMenuItem2_Click); + // + // toolStripSeparator9 + // + this.toolStripSeparator9.Name = "toolStripSeparator9"; + this.toolStripSeparator9.Size = new System.Drawing.Size(172, 6); + // + // removeSelectedToolStripMenuItem1 + // + this.removeSelectedToolStripMenuItem1.Name = "removeSelectedToolStripMenuItem1"; + this.removeSelectedToolStripMenuItem1.Size = new System.Drawing.Size(175, 22); + this.removeSelectedToolStripMenuItem1.Text = "Remove Selected"; + this.removeSelectedToolStripMenuItem1.Click += new System.EventHandler(this.removeSelectedToolStripMenuItem1_Click); + // + // addToRamWatchToolStripMenuItem + // + this.addToRamWatchToolStripMenuItem.Name = "addToRamWatchToolStripMenuItem"; + this.addToRamWatchToolStripMenuItem.Size = new System.Drawing.Size(175, 22); + this.addToRamWatchToolStripMenuItem.Text = "Add to Ram Watch"; + this.addToRamWatchToolStripMenuItem.Click += new System.EventHandler(this.addToRamWatchToolStripMenuItem_Click); + // + // pokeAddressToolStripMenuItem1 + // + this.pokeAddressToolStripMenuItem1.Name = "pokeAddressToolStripMenuItem1"; + this.pokeAddressToolStripMenuItem1.Size = new System.Drawing.Size(175, 22); + this.pokeAddressToolStripMenuItem1.Text = "Poke Address"; + this.pokeAddressToolStripMenuItem1.Click += new System.EventHandler(this.pokeAddressToolStripMenuItem1_Click); + // + // freezeAddressToolStripMenuItem1 + // + this.freezeAddressToolStripMenuItem1.Name = "freezeAddressToolStripMenuItem1"; + this.freezeAddressToolStripMenuItem1.Size = new System.Drawing.Size(175, 22); + this.freezeAddressToolStripMenuItem1.Text = "Freeze Address"; + this.freezeAddressToolStripMenuItem1.Click += new System.EventHandler(this.freezeAddressToolStripMenuItem1_Click); + // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileToolStripMenuItem, this.searchToolStripMenuItem, this.optionsToolStripMenuItem}); - this.menuStrip1.Location = new System.Drawing.Point(0, 0); - this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(472, 24); - this.menuStrip1.TabIndex = 4; - this.menuStrip1.Text = "menuStrip1"; - // - // fileToolStripMenuItem - // - this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(472, 24); + this.menuStrip1.TabIndex = 4; + this.menuStrip1.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.newSearchToolStripMenuItem, this.toolStripSeparator1, this.openToolStripMenuItem, @@ -394,112 +395,112 @@ this.recentToolStripMenuItem, this.toolStripSeparator4, this.exitToolStripMenuItem}); - this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; - this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20); - this.fileToolStripMenuItem.Text = "&File"; - // - // newSearchToolStripMenuItem - // - this.newSearchToolStripMenuItem.Name = "newSearchToolStripMenuItem"; - this.newSearchToolStripMenuItem.Size = new System.Drawing.Size(204, 22); - this.newSearchToolStripMenuItem.Text = "&New Search"; - this.newSearchToolStripMenuItem.Click += new System.EventHandler(this.newSearchToolStripMenuItem_Click); - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(201, 6); - // - // openToolStripMenuItem - // - 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(204, 22); - this.openToolStripMenuItem.Text = "&Open..."; - this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click); - // - // saveToolStripMenuItem - // - 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(204, 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(204, 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(204, 22); - this.appendFileToolStripMenuItem.Text = "&Append File..."; - this.appendFileToolStripMenuItem.Click += new System.EventHandler(this.appendFileToolStripMenuItem_Click); - // - // TruncateFromFileToolStripMenuItem - // - this.TruncateFromFileToolStripMenuItem.Name = "TruncateFromFileToolStripMenuItem"; - this.TruncateFromFileToolStripMenuItem.Size = new System.Drawing.Size(204, 22); - this.TruncateFromFileToolStripMenuItem.Text = "&Truncate from File..."; - this.TruncateFromFileToolStripMenuItem.Click += new System.EventHandler(this.TruncateFromFileToolStripMenuItem_Click); - // - // recentToolStripMenuItem - // - this.recentToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20); + this.fileToolStripMenuItem.Text = "&File"; + // + // newSearchToolStripMenuItem + // + this.newSearchToolStripMenuItem.Name = "newSearchToolStripMenuItem"; + this.newSearchToolStripMenuItem.Size = new System.Drawing.Size(204, 22); + this.newSearchToolStripMenuItem.Text = "&New Search"; + this.newSearchToolStripMenuItem.Click += new System.EventHandler(this.newSearchToolStripMenuItem_Click); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(201, 6); + // + // openToolStripMenuItem + // + 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(204, 22); + this.openToolStripMenuItem.Text = "&Open..."; + this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click); + // + // saveToolStripMenuItem + // + 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(204, 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(204, 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(204, 22); + this.appendFileToolStripMenuItem.Text = "&Append File..."; + this.appendFileToolStripMenuItem.Click += new System.EventHandler(this.appendFileToolStripMenuItem_Click); + // + // TruncateFromFileToolStripMenuItem + // + this.TruncateFromFileToolStripMenuItem.Name = "TruncateFromFileToolStripMenuItem"; + this.TruncateFromFileToolStripMenuItem.Size = new System.Drawing.Size(204, 22); + this.TruncateFromFileToolStripMenuItem.Text = "&Truncate from File..."; + this.TruncateFromFileToolStripMenuItem.Click += new System.EventHandler(this.TruncateFromFileToolStripMenuItem_Click); + // + // recentToolStripMenuItem + // + this.recentToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.noneToolStripMenuItem, this.toolStripSeparator2, this.clearToolStripMenuItem, this.autoLoadToolStripMenuItem}); - this.recentToolStripMenuItem.Name = "recentToolStripMenuItem"; - this.recentToolStripMenuItem.Size = new System.Drawing.Size(204, 22); - this.recentToolStripMenuItem.Text = "Recent"; - this.recentToolStripMenuItem.DropDownOpened += new System.EventHandler(this.recentToolStripMenuItem_DropDownOpened); - // - // noneToolStripMenuItem - // - this.noneToolStripMenuItem.Name = "noneToolStripMenuItem"; - this.noneToolStripMenuItem.Size = new System.Drawing.Size(135, 22); - this.noneToolStripMenuItem.Text = "None"; - // - // toolStripSeparator2 - // - this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(132, 6); - // - // clearToolStripMenuItem - // - this.clearToolStripMenuItem.Name = "clearToolStripMenuItem"; - this.clearToolStripMenuItem.Size = new System.Drawing.Size(135, 22); - this.clearToolStripMenuItem.Text = "Clear"; - // - // autoLoadToolStripMenuItem - // - this.autoLoadToolStripMenuItem.Name = "autoLoadToolStripMenuItem"; - this.autoLoadToolStripMenuItem.Size = new System.Drawing.Size(135, 22); - this.autoLoadToolStripMenuItem.Text = "Auto-Load"; - // - // toolStripSeparator4 - // - this.toolStripSeparator4.Name = "toolStripSeparator4"; - this.toolStripSeparator4.Size = new System.Drawing.Size(201, 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(204, 22); - this.exitToolStripMenuItem.Text = "&Close"; - this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); - // - // searchToolStripMenuItem - // - this.searchToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.recentToolStripMenuItem.Name = "recentToolStripMenuItem"; + this.recentToolStripMenuItem.Size = new System.Drawing.Size(204, 22); + this.recentToolStripMenuItem.Text = "Recent"; + this.recentToolStripMenuItem.DropDownOpened += new System.EventHandler(this.recentToolStripMenuItem_DropDownOpened); + // + // noneToolStripMenuItem + // + this.noneToolStripMenuItem.Name = "noneToolStripMenuItem"; + this.noneToolStripMenuItem.Size = new System.Drawing.Size(135, 22); + this.noneToolStripMenuItem.Text = "None"; + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(132, 6); + // + // clearToolStripMenuItem + // + this.clearToolStripMenuItem.Name = "clearToolStripMenuItem"; + this.clearToolStripMenuItem.Size = new System.Drawing.Size(135, 22); + this.clearToolStripMenuItem.Text = "Clear"; + // + // autoLoadToolStripMenuItem + // + this.autoLoadToolStripMenuItem.Name = "autoLoadToolStripMenuItem"; + this.autoLoadToolStripMenuItem.Size = new System.Drawing.Size(135, 22); + this.autoLoadToolStripMenuItem.Text = "Auto-Load"; + // + // toolStripSeparator4 + // + this.toolStripSeparator4.Name = "toolStripSeparator4"; + this.toolStripSeparator4.Size = new System.Drawing.Size(201, 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(204, 22); + this.exitToolStripMenuItem.Text = "&Close"; + this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); + // + // searchToolStripMenuItem + // + this.searchToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.memoryDomainsToolStripMenuItem, this.searchToolStripMenuItem1, this.undoToolStripMenuItem, @@ -511,183 +512,183 @@ this.addSelectedToRamWatchToolStripMenuItem, this.pokeAddressToolStripMenuItem, this.freezeAddressToolStripMenuItem}); - this.searchToolStripMenuItem.Name = "searchToolStripMenuItem"; - this.searchToolStripMenuItem.Size = new System.Drawing.Size(52, 20); - this.searchToolStripMenuItem.Text = "&Search"; - this.searchToolStripMenuItem.DropDownOpened += new System.EventHandler(this.searchToolStripMenuItem_DropDownOpened); - // - // memoryDomainsToolStripMenuItem - // - this.memoryDomainsToolStripMenuItem.Name = "memoryDomainsToolStripMenuItem"; - this.memoryDomainsToolStripMenuItem.Size = new System.Drawing.Size(218, 22); - this.memoryDomainsToolStripMenuItem.Text = "&Memory Domains"; - this.memoryDomainsToolStripMenuItem.DropDownOpened += new System.EventHandler(this.memoryDomainsToolStripMenuItem_DropDownOpened); - // - // searchToolStripMenuItem1 - // - this.searchToolStripMenuItem1.Name = "searchToolStripMenuItem1"; - this.searchToolStripMenuItem1.Size = new System.Drawing.Size(218, 22); - this.searchToolStripMenuItem1.Text = "&Search"; - this.searchToolStripMenuItem1.Click += new System.EventHandler(this.searchToolStripMenuItem1_Click); - // - // undoToolStripMenuItem - // - this.undoToolStripMenuItem.Name = "undoToolStripMenuItem"; - this.undoToolStripMenuItem.Size = new System.Drawing.Size(218, 22); - this.undoToolStripMenuItem.Text = "&Undo"; - this.undoToolStripMenuItem.Click += new System.EventHandler(this.undoToolStripMenuItem_Click_1); - // - // copyValueToPrevToolStripMenuItem - // - this.copyValueToPrevToolStripMenuItem.Name = "copyValueToPrevToolStripMenuItem"; - this.copyValueToPrevToolStripMenuItem.Size = new System.Drawing.Size(218, 22); - this.copyValueToPrevToolStripMenuItem.Text = "Copy Value to Prev"; - this.copyValueToPrevToolStripMenuItem.Click += new System.EventHandler(this.copyValueToPrevToolStripMenuItem_Click); - // - // clearChangeCountsToolStripMenuItem - // - this.clearChangeCountsToolStripMenuItem.Name = "clearChangeCountsToolStripMenuItem"; - this.clearChangeCountsToolStripMenuItem.Size = new System.Drawing.Size(218, 22); - this.clearChangeCountsToolStripMenuItem.Text = "&Clear Change Counts"; - this.clearChangeCountsToolStripMenuItem.Click += new System.EventHandler(this.clearChangeCountsToolStripMenuItem_Click); - // - // removeSelectedToolStripMenuItem - // - this.removeSelectedToolStripMenuItem.Name = "removeSelectedToolStripMenuItem"; - this.removeSelectedToolStripMenuItem.Size = new System.Drawing.Size(218, 22); - this.removeSelectedToolStripMenuItem.Text = "&Remove selected"; - this.removeSelectedToolStripMenuItem.Click += new System.EventHandler(this.removeSelectedToolStripMenuItem_Click); - // - // exludeRamWatchListToolStripMenuItem - // - this.exludeRamWatchListToolStripMenuItem.Name = "exludeRamWatchListToolStripMenuItem"; - this.exludeRamWatchListToolStripMenuItem.Size = new System.Drawing.Size(218, 22); - this.exludeRamWatchListToolStripMenuItem.Text = "Exlude Ram Watch List"; - this.exludeRamWatchListToolStripMenuItem.Click += new System.EventHandler(this.exludeRamWatchListToolStripMenuItem_Click); - // - // toolStripSeparator5 - // - this.toolStripSeparator5.Name = "toolStripSeparator5"; - this.toolStripSeparator5.Size = new System.Drawing.Size(215, 6); - // - // addSelectedToRamWatchToolStripMenuItem - // - this.addSelectedToRamWatchToolStripMenuItem.Name = "addSelectedToRamWatchToolStripMenuItem"; - this.addSelectedToRamWatchToolStripMenuItem.Size = new System.Drawing.Size(218, 22); - this.addSelectedToRamWatchToolStripMenuItem.Text = "&Add selected to Ram Watch"; - this.addSelectedToRamWatchToolStripMenuItem.Click += new System.EventHandler(this.addSelectedToRamWatchToolStripMenuItem_Click); - // - // pokeAddressToolStripMenuItem - // - this.pokeAddressToolStripMenuItem.Name = "pokeAddressToolStripMenuItem"; - this.pokeAddressToolStripMenuItem.Size = new System.Drawing.Size(218, 22); - this.pokeAddressToolStripMenuItem.Text = "&Poke Address"; - this.pokeAddressToolStripMenuItem.Click += new System.EventHandler(this.pokeAddressToolStripMenuItem_Click); - // - // freezeAddressToolStripMenuItem - // - this.freezeAddressToolStripMenuItem.Name = "freezeAddressToolStripMenuItem"; - this.freezeAddressToolStripMenuItem.Size = new System.Drawing.Size(218, 22); - this.freezeAddressToolStripMenuItem.Text = "Freeze Address"; - this.freezeAddressToolStripMenuItem.Click += new System.EventHandler(this.freezeAddressToolStripMenuItem_Click); - // - // optionsToolStripMenuItem - // - this.optionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.searchToolStripMenuItem.Name = "searchToolStripMenuItem"; + this.searchToolStripMenuItem.Size = new System.Drawing.Size(52, 20); + this.searchToolStripMenuItem.Text = "&Search"; + this.searchToolStripMenuItem.DropDownOpened += new System.EventHandler(this.searchToolStripMenuItem_DropDownOpened); + // + // memoryDomainsToolStripMenuItem + // + this.memoryDomainsToolStripMenuItem.Name = "memoryDomainsToolStripMenuItem"; + this.memoryDomainsToolStripMenuItem.Size = new System.Drawing.Size(218, 22); + this.memoryDomainsToolStripMenuItem.Text = "&Memory Domains"; + this.memoryDomainsToolStripMenuItem.DropDownOpened += new System.EventHandler(this.memoryDomainsToolStripMenuItem_DropDownOpened); + // + // searchToolStripMenuItem1 + // + this.searchToolStripMenuItem1.Name = "searchToolStripMenuItem1"; + this.searchToolStripMenuItem1.Size = new System.Drawing.Size(218, 22); + this.searchToolStripMenuItem1.Text = "&Search"; + this.searchToolStripMenuItem1.Click += new System.EventHandler(this.searchToolStripMenuItem1_Click); + // + // undoToolStripMenuItem + // + this.undoToolStripMenuItem.Name = "undoToolStripMenuItem"; + this.undoToolStripMenuItem.Size = new System.Drawing.Size(218, 22); + this.undoToolStripMenuItem.Text = "&Undo"; + this.undoToolStripMenuItem.Click += new System.EventHandler(this.undoToolStripMenuItem_Click_1); + // + // copyValueToPrevToolStripMenuItem + // + this.copyValueToPrevToolStripMenuItem.Name = "copyValueToPrevToolStripMenuItem"; + this.copyValueToPrevToolStripMenuItem.Size = new System.Drawing.Size(218, 22); + this.copyValueToPrevToolStripMenuItem.Text = "Copy Value to Prev"; + this.copyValueToPrevToolStripMenuItem.Click += new System.EventHandler(this.copyValueToPrevToolStripMenuItem_Click); + // + // clearChangeCountsToolStripMenuItem + // + this.clearChangeCountsToolStripMenuItem.Name = "clearChangeCountsToolStripMenuItem"; + this.clearChangeCountsToolStripMenuItem.Size = new System.Drawing.Size(218, 22); + this.clearChangeCountsToolStripMenuItem.Text = "&Clear Change Counts"; + this.clearChangeCountsToolStripMenuItem.Click += new System.EventHandler(this.clearChangeCountsToolStripMenuItem_Click); + // + // removeSelectedToolStripMenuItem + // + this.removeSelectedToolStripMenuItem.Name = "removeSelectedToolStripMenuItem"; + this.removeSelectedToolStripMenuItem.Size = new System.Drawing.Size(218, 22); + this.removeSelectedToolStripMenuItem.Text = "&Remove selected"; + this.removeSelectedToolStripMenuItem.Click += new System.EventHandler(this.removeSelectedToolStripMenuItem_Click); + // + // exludeRamWatchListToolStripMenuItem + // + this.exludeRamWatchListToolStripMenuItem.Name = "exludeRamWatchListToolStripMenuItem"; + this.exludeRamWatchListToolStripMenuItem.Size = new System.Drawing.Size(218, 22); + this.exludeRamWatchListToolStripMenuItem.Text = "Exlude Ram Watch List"; + this.exludeRamWatchListToolStripMenuItem.Click += new System.EventHandler(this.exludeRamWatchListToolStripMenuItem_Click); + // + // toolStripSeparator5 + // + this.toolStripSeparator5.Name = "toolStripSeparator5"; + this.toolStripSeparator5.Size = new System.Drawing.Size(215, 6); + // + // addSelectedToRamWatchToolStripMenuItem + // + this.addSelectedToRamWatchToolStripMenuItem.Name = "addSelectedToRamWatchToolStripMenuItem"; + this.addSelectedToRamWatchToolStripMenuItem.Size = new System.Drawing.Size(218, 22); + this.addSelectedToRamWatchToolStripMenuItem.Text = "&Add selected to Ram Watch"; + this.addSelectedToRamWatchToolStripMenuItem.Click += new System.EventHandler(this.addSelectedToRamWatchToolStripMenuItem_Click); + // + // pokeAddressToolStripMenuItem + // + this.pokeAddressToolStripMenuItem.Name = "pokeAddressToolStripMenuItem"; + this.pokeAddressToolStripMenuItem.Size = new System.Drawing.Size(218, 22); + this.pokeAddressToolStripMenuItem.Text = "&Poke Address"; + this.pokeAddressToolStripMenuItem.Click += new System.EventHandler(this.pokeAddressToolStripMenuItem_Click); + // + // freezeAddressToolStripMenuItem + // + this.freezeAddressToolStripMenuItem.Name = "freezeAddressToolStripMenuItem"; + this.freezeAddressToolStripMenuItem.Size = new System.Drawing.Size(218, 22); + this.freezeAddressToolStripMenuItem.Text = "Freeze Address"; + this.freezeAddressToolStripMenuItem.Click += new System.EventHandler(this.freezeAddressToolStripMenuItem_Click); + // + // optionsToolStripMenuItem + // + this.optionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.definePreviousValueToolStripMenuItem, this.restoreOriginalWindowSizeToolStripMenuItem, this.saveWindowPositionToolStripMenuItem, this.previewModeToolStripMenuItem, this.alwaysExludeRamSearchListToolStripMenuItem}); - this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; - this.optionsToolStripMenuItem.Size = new System.Drawing.Size(56, 20); - this.optionsToolStripMenuItem.Text = "&Options"; - this.optionsToolStripMenuItem.DropDownOpened += new System.EventHandler(this.optionsToolStripMenuItem_DropDownOpened); - // - // definePreviousValueToolStripMenuItem - // - this.definePreviousValueToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; + this.optionsToolStripMenuItem.Size = new System.Drawing.Size(56, 20); + this.optionsToolStripMenuItem.Text = "&Options"; + this.optionsToolStripMenuItem.DropDownOpened += new System.EventHandler(this.optionsToolStripMenuItem_DropDownOpened); + // + // definePreviousValueToolStripMenuItem + // + this.definePreviousValueToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.sinceLastSearchToolStripMenuItem, this.originalValueToolStripMenuItem, this.sinceLastFrameToolStripMenuItem}); - this.definePreviousValueToolStripMenuItem.Name = "definePreviousValueToolStripMenuItem"; - this.definePreviousValueToolStripMenuItem.Size = new System.Drawing.Size(233, 22); - this.definePreviousValueToolStripMenuItem.Text = "Define Previous Value As"; - this.definePreviousValueToolStripMenuItem.DropDownOpened += new System.EventHandler(this.definePreviousValueToolStripMenuItem_DropDownOpened); - // - // sinceLastSearchToolStripMenuItem - // - this.sinceLastSearchToolStripMenuItem.Name = "sinceLastSearchToolStripMenuItem"; - this.sinceLastSearchToolStripMenuItem.Size = new System.Drawing.Size(166, 22); - this.sinceLastSearchToolStripMenuItem.Text = "Since last Search"; - this.sinceLastSearchToolStripMenuItem.Click += new System.EventHandler(this.sinceLastSearchToolStripMenuItem_Click); - // - // originalValueToolStripMenuItem - // - this.originalValueToolStripMenuItem.Name = "originalValueToolStripMenuItem"; - this.originalValueToolStripMenuItem.Size = new System.Drawing.Size(166, 22); - this.originalValueToolStripMenuItem.Text = "Original value"; - this.originalValueToolStripMenuItem.Click += new System.EventHandler(this.originalValueToolStripMenuItem_Click); - // - // sinceLastFrameToolStripMenuItem - // - this.sinceLastFrameToolStripMenuItem.Name = "sinceLastFrameToolStripMenuItem"; - this.sinceLastFrameToolStripMenuItem.Size = new System.Drawing.Size(166, 22); - this.sinceLastFrameToolStripMenuItem.Text = "Since last Frame"; - this.sinceLastFrameToolStripMenuItem.Click += new System.EventHandler(this.sinceLastFrameToolStripMenuItem_Click); - // - // restoreOriginalWindowSizeToolStripMenuItem - // - this.restoreOriginalWindowSizeToolStripMenuItem.Name = "restoreOriginalWindowSizeToolStripMenuItem"; - this.restoreOriginalWindowSizeToolStripMenuItem.Size = new System.Drawing.Size(233, 22); - this.restoreOriginalWindowSizeToolStripMenuItem.Text = "Restore Window Size"; - this.restoreOriginalWindowSizeToolStripMenuItem.Click += new System.EventHandler(this.restoreOriginalWindowSizeToolStripMenuItem_Click); - // - // saveWindowPositionToolStripMenuItem - // - this.saveWindowPositionToolStripMenuItem.Name = "saveWindowPositionToolStripMenuItem"; - this.saveWindowPositionToolStripMenuItem.Size = new System.Drawing.Size(233, 22); - this.saveWindowPositionToolStripMenuItem.Text = "Save Window Position"; - this.saveWindowPositionToolStripMenuItem.Click += new System.EventHandler(this.saveWindowPositionToolStripMenuItem_Click); - // - // previewModeToolStripMenuItem - // - this.previewModeToolStripMenuItem.Name = "previewModeToolStripMenuItem"; - this.previewModeToolStripMenuItem.Size = new System.Drawing.Size(233, 22); - this.previewModeToolStripMenuItem.Text = "Preview Mode"; - this.previewModeToolStripMenuItem.Click += new System.EventHandler(this.previewModeToolStripMenuItem_Click); - // - // alwaysExludeRamSearchListToolStripMenuItem - // - this.alwaysExludeRamSearchListToolStripMenuItem.Name = "alwaysExludeRamSearchListToolStripMenuItem"; - this.alwaysExludeRamSearchListToolStripMenuItem.Size = new System.Drawing.Size(233, 22); - this.alwaysExludeRamSearchListToolStripMenuItem.Text = "Always Exlude Ram Search List"; - this.alwaysExludeRamSearchListToolStripMenuItem.Click += new System.EventHandler(this.alwaysExludeRamSearchListToolStripMenuItem_Click); - // - // toolStripContainer1 - // - this.toolStripContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - // - // toolStripContainer1.ContentPanel - // - this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(211, 2); - this.toolStripContainer1.Location = new System.Drawing.Point(250, 33); - this.toolStripContainer1.Name = "toolStripContainer1"; - this.toolStripContainer1.Size = new System.Drawing.Size(211, 77); - this.toolStripContainer1.TabIndex = 5; - this.toolStripContainer1.Text = "toolStripContainer1"; - // - // toolStripContainer1.TopToolStripPanel - // - this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.toolStrip1); - this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.SearchtoolStrip1); - this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.toolStrip2); - // - // toolStrip1 - // - this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None; - this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.definePreviousValueToolStripMenuItem.Name = "definePreviousValueToolStripMenuItem"; + this.definePreviousValueToolStripMenuItem.Size = new System.Drawing.Size(233, 22); + this.definePreviousValueToolStripMenuItem.Text = "Define Previous Value As"; + this.definePreviousValueToolStripMenuItem.DropDownOpened += new System.EventHandler(this.definePreviousValueToolStripMenuItem_DropDownOpened); + // + // sinceLastSearchToolStripMenuItem + // + this.sinceLastSearchToolStripMenuItem.Name = "sinceLastSearchToolStripMenuItem"; + this.sinceLastSearchToolStripMenuItem.Size = new System.Drawing.Size(166, 22); + this.sinceLastSearchToolStripMenuItem.Text = "Since last Search"; + this.sinceLastSearchToolStripMenuItem.Click += new System.EventHandler(this.sinceLastSearchToolStripMenuItem_Click); + // + // originalValueToolStripMenuItem + // + this.originalValueToolStripMenuItem.Name = "originalValueToolStripMenuItem"; + this.originalValueToolStripMenuItem.Size = new System.Drawing.Size(166, 22); + this.originalValueToolStripMenuItem.Text = "Original value"; + this.originalValueToolStripMenuItem.Click += new System.EventHandler(this.originalValueToolStripMenuItem_Click); + // + // sinceLastFrameToolStripMenuItem + // + this.sinceLastFrameToolStripMenuItem.Name = "sinceLastFrameToolStripMenuItem"; + this.sinceLastFrameToolStripMenuItem.Size = new System.Drawing.Size(166, 22); + this.sinceLastFrameToolStripMenuItem.Text = "Since last Frame"; + this.sinceLastFrameToolStripMenuItem.Click += new System.EventHandler(this.sinceLastFrameToolStripMenuItem_Click); + // + // restoreOriginalWindowSizeToolStripMenuItem + // + this.restoreOriginalWindowSizeToolStripMenuItem.Name = "restoreOriginalWindowSizeToolStripMenuItem"; + this.restoreOriginalWindowSizeToolStripMenuItem.Size = new System.Drawing.Size(233, 22); + this.restoreOriginalWindowSizeToolStripMenuItem.Text = "Restore Window Size"; + this.restoreOriginalWindowSizeToolStripMenuItem.Click += new System.EventHandler(this.restoreOriginalWindowSizeToolStripMenuItem_Click); + // + // saveWindowPositionToolStripMenuItem + // + this.saveWindowPositionToolStripMenuItem.Name = "saveWindowPositionToolStripMenuItem"; + this.saveWindowPositionToolStripMenuItem.Size = new System.Drawing.Size(233, 22); + this.saveWindowPositionToolStripMenuItem.Text = "Save Window Position"; + this.saveWindowPositionToolStripMenuItem.Click += new System.EventHandler(this.saveWindowPositionToolStripMenuItem_Click); + // + // previewModeToolStripMenuItem + // + this.previewModeToolStripMenuItem.Name = "previewModeToolStripMenuItem"; + this.previewModeToolStripMenuItem.Size = new System.Drawing.Size(233, 22); + this.previewModeToolStripMenuItem.Text = "Preview Mode"; + this.previewModeToolStripMenuItem.Click += new System.EventHandler(this.previewModeToolStripMenuItem_Click); + // + // alwaysExludeRamSearchListToolStripMenuItem + // + this.alwaysExludeRamSearchListToolStripMenuItem.Name = "alwaysExludeRamSearchListToolStripMenuItem"; + this.alwaysExludeRamSearchListToolStripMenuItem.Size = new System.Drawing.Size(233, 22); + this.alwaysExludeRamSearchListToolStripMenuItem.Text = "Always Exlude Ram Search List"; + this.alwaysExludeRamSearchListToolStripMenuItem.Click += new System.EventHandler(this.alwaysExludeRamSearchListToolStripMenuItem_Click); + // + // toolStripContainer1 + // + this.toolStripContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + // + // toolStripContainer1.ContentPanel + // + this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(211, 2); + this.toolStripContainer1.Location = new System.Drawing.Point(250, 33); + this.toolStripContainer1.Name = "toolStripContainer1"; + this.toolStripContainer1.Size = new System.Drawing.Size(211, 77); + this.toolStripContainer1.TabIndex = 5; + this.toolStripContainer1.Text = "toolStripContainer1"; + // + // toolStripContainer1.TopToolStripPanel + // + this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.toolStrip1); + this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.SearchtoolStrip1); + this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.toolStrip2); + // + // toolStrip1 + // + this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None; + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.NewSearchtoolStripButton, this.toolStripSeparator6, this.toolStripButton1, @@ -696,500 +697,500 @@ this.ClearChangeCountstoolStripButton, this.UndotoolStripButton, this.WatchtoolStripButton1}); - this.toolStrip1.Location = new System.Drawing.Point(3, 0); - this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.Size = new System.Drawing.Size(160, 25); - this.toolStrip1.TabIndex = 1; - // - // NewSearchtoolStripButton - // - this.NewSearchtoolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.NewSearchtoolStripButton.Image = global::BizHawk.MultiClient.Properties.Resources.restart; - this.NewSearchtoolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.NewSearchtoolStripButton.Name = "NewSearchtoolStripButton"; - this.NewSearchtoolStripButton.Size = new System.Drawing.Size(23, 22); - this.NewSearchtoolStripButton.Text = "New Search"; - this.NewSearchtoolStripButton.Click += new System.EventHandler(this.NewSearchtoolStripButton_Click); - // - // toolStripSeparator6 - // - this.toolStripSeparator6.Name = "toolStripSeparator6"; - this.toolStripSeparator6.Size = new System.Drawing.Size(6, 25); - // - // toolStripButton1 - // - this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image"))); - this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButton1.Name = "toolStripButton1"; - this.toolStripButton1.Size = new System.Drawing.Size(23, 22); - this.toolStripButton1.Text = "Search"; - this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click); - // - // toolStripSeparator7 - // - this.toolStripSeparator7.Name = "toolStripSeparator7"; - this.toolStripSeparator7.Size = new System.Drawing.Size(6, 25); - // - // SetCurrToPrevtoolStripButton2 - // - this.SetCurrToPrevtoolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.SetCurrToPrevtoolStripButton2.Image = global::BizHawk.MultiClient.Properties.Resources.Refresh; - this.SetCurrToPrevtoolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; - this.SetCurrToPrevtoolStripButton2.Name = "SetCurrToPrevtoolStripButton2"; - this.SetCurrToPrevtoolStripButton2.Size = new System.Drawing.Size(23, 22); - this.SetCurrToPrevtoolStripButton2.Text = "Copy Value to Prev"; - this.SetCurrToPrevtoolStripButton2.Click += new System.EventHandler(this.SetCurrToPrevtoolStripButton2_Click); - // - // ClearChangeCountstoolStripButton - // - this.ClearChangeCountstoolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.ClearChangeCountstoolStripButton.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ClearChangeCountstoolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("ClearChangeCountstoolStripButton.Image"))); - this.ClearChangeCountstoolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.ClearChangeCountstoolStripButton.Name = "ClearChangeCountstoolStripButton"; - this.ClearChangeCountstoolStripButton.Size = new System.Drawing.Size(23, 22); - this.ClearChangeCountstoolStripButton.Text = "C"; - this.ClearChangeCountstoolStripButton.ToolTipText = "Clear Change Counts"; - this.ClearChangeCountstoolStripButton.Click += new System.EventHandler(this.ClearChangeCountstoolStripButton_Click); - // - // UndotoolStripButton - // - this.UndotoolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.UndotoolStripButton.Image = global::BizHawk.MultiClient.Properties.Resources.undo; - this.UndotoolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.UndotoolStripButton.Name = "UndotoolStripButton"; - this.UndotoolStripButton.Size = new System.Drawing.Size(23, 22); - this.UndotoolStripButton.Text = "Undo Search"; - this.UndotoolStripButton.Click += new System.EventHandler(this.UndotoolStripButton_Click_1); - // - // WatchtoolStripButton1 - // - this.WatchtoolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.WatchtoolStripButton1.Image = global::BizHawk.MultiClient.Properties.Resources.FindHS; - this.WatchtoolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; - this.WatchtoolStripButton1.Name = "WatchtoolStripButton1"; - this.WatchtoolStripButton1.Size = new System.Drawing.Size(23, 22); - this.WatchtoolStripButton1.Text = "Watch"; - this.WatchtoolStripButton1.Click += new System.EventHandler(this.WatchtoolStripButton1_Click); - // - // toolStrip2 - // - this.toolStrip2.Dock = System.Windows.Forms.DockStyle.None; - this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStrip1.Location = new System.Drawing.Point(3, 0); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(160, 25); + this.toolStrip1.TabIndex = 1; + // + // NewSearchtoolStripButton + // + this.NewSearchtoolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.NewSearchtoolStripButton.Image = global::BizHawk.MultiClient.Properties.Resources.restart; + this.NewSearchtoolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.NewSearchtoolStripButton.Name = "NewSearchtoolStripButton"; + this.NewSearchtoolStripButton.Size = new System.Drawing.Size(23, 22); + this.NewSearchtoolStripButton.Text = "New Search"; + this.NewSearchtoolStripButton.Click += new System.EventHandler(this.NewSearchtoolStripButton_Click); + // + // toolStripSeparator6 + // + this.toolStripSeparator6.Name = "toolStripSeparator6"; + this.toolStripSeparator6.Size = new System.Drawing.Size(6, 25); + // + // toolStripButton1 + // + this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image"))); + this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton1.Name = "toolStripButton1"; + this.toolStripButton1.Size = new System.Drawing.Size(23, 22); + this.toolStripButton1.Text = "Search"; + this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click); + // + // toolStripSeparator7 + // + this.toolStripSeparator7.Name = "toolStripSeparator7"; + this.toolStripSeparator7.Size = new System.Drawing.Size(6, 25); + // + // SetCurrToPrevtoolStripButton2 + // + this.SetCurrToPrevtoolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.SetCurrToPrevtoolStripButton2.Image = global::BizHawk.MultiClient.Properties.Resources.Refresh; + this.SetCurrToPrevtoolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; + this.SetCurrToPrevtoolStripButton2.Name = "SetCurrToPrevtoolStripButton2"; + this.SetCurrToPrevtoolStripButton2.Size = new System.Drawing.Size(23, 22); + this.SetCurrToPrevtoolStripButton2.Text = "Copy Value to Prev"; + this.SetCurrToPrevtoolStripButton2.Click += new System.EventHandler(this.SetCurrToPrevtoolStripButton2_Click); + // + // ClearChangeCountstoolStripButton + // + this.ClearChangeCountstoolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.ClearChangeCountstoolStripButton.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.ClearChangeCountstoolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("ClearChangeCountstoolStripButton.Image"))); + this.ClearChangeCountstoolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.ClearChangeCountstoolStripButton.Name = "ClearChangeCountstoolStripButton"; + this.ClearChangeCountstoolStripButton.Size = new System.Drawing.Size(23, 22); + this.ClearChangeCountstoolStripButton.Text = "C"; + this.ClearChangeCountstoolStripButton.ToolTipText = "Clear Change Counts"; + this.ClearChangeCountstoolStripButton.Click += new System.EventHandler(this.ClearChangeCountstoolStripButton_Click); + // + // UndotoolStripButton + // + this.UndotoolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.UndotoolStripButton.Image = global::BizHawk.MultiClient.Properties.Resources.undo; + this.UndotoolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.UndotoolStripButton.Name = "UndotoolStripButton"; + this.UndotoolStripButton.Size = new System.Drawing.Size(23, 22); + this.UndotoolStripButton.Text = "Undo Search"; + this.UndotoolStripButton.Click += new System.EventHandler(this.UndotoolStripButton_Click_1); + // + // WatchtoolStripButton1 + // + this.WatchtoolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.WatchtoolStripButton1.Image = global::BizHawk.MultiClient.Properties.Resources.FindHS; + this.WatchtoolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; + this.WatchtoolStripButton1.Name = "WatchtoolStripButton1"; + this.WatchtoolStripButton1.Size = new System.Drawing.Size(23, 22); + this.WatchtoolStripButton1.Text = "Watch"; + this.WatchtoolStripButton1.Click += new System.EventHandler(this.WatchtoolStripButton1_Click); + // + // toolStrip2 + // + this.toolStrip2.Dock = System.Windows.Forms.DockStyle.None; + this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.DataSizetoolStripSplitButton1, this.DataTypetoolStripSplitButton1, this.EndiantoolSplitButton}); - this.toolStrip2.Location = new System.Drawing.Point(3, 50); - this.toolStrip2.Name = "toolStrip2"; - this.toolStrip2.Size = new System.Drawing.Size(206, 25); - this.toolStrip2.TabIndex = 2; - // - // DataSizetoolStripSplitButton1 - // - this.DataSizetoolStripSplitButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.DataSizetoolStripSplitButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStrip2.Location = new System.Drawing.Point(3, 50); + this.toolStrip2.Name = "toolStrip2"; + this.toolStrip2.Size = new System.Drawing.Size(206, 25); + this.toolStrip2.TabIndex = 2; + // + // DataSizetoolStripSplitButton1 + // + this.DataSizetoolStripSplitButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.DataSizetoolStripSplitButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.byteToolStripMenuItem, this.bytesToolStripMenuItem, this.dWordToolStripMenuItem1}); - this.DataSizetoolStripSplitButton1.Image = ((System.Drawing.Image)(resources.GetObject("DataSizetoolStripSplitButton1.Image"))); - this.DataSizetoolStripSplitButton1.ImageTransparentColor = System.Drawing.Color.Magenta; - this.DataSizetoolStripSplitButton1.Name = "DataSizetoolStripSplitButton1"; - this.DataSizetoolStripSplitButton1.Size = new System.Drawing.Size(68, 22); - this.DataSizetoolStripSplitButton1.Text = "Data Size"; - // - // byteToolStripMenuItem - // - this.byteToolStripMenuItem.Checked = true; - this.byteToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; - this.byteToolStripMenuItem.Name = "byteToolStripMenuItem"; - this.byteToolStripMenuItem.Size = new System.Drawing.Size(121, 22); - this.byteToolStripMenuItem.Text = "1 Byte"; - this.byteToolStripMenuItem.Click += new System.EventHandler(this.byteToolStripMenuItem_Click); - // - // bytesToolStripMenuItem - // - this.bytesToolStripMenuItem.Name = "bytesToolStripMenuItem"; - this.bytesToolStripMenuItem.Size = new System.Drawing.Size(121, 22); - this.bytesToolStripMenuItem.Text = "2 Bytes"; - this.bytesToolStripMenuItem.Click += new System.EventHandler(this.bytesToolStripMenuItem_Click); - // - // dWordToolStripMenuItem1 - // - this.dWordToolStripMenuItem1.Name = "dWordToolStripMenuItem1"; - this.dWordToolStripMenuItem1.Size = new System.Drawing.Size(121, 22); - this.dWordToolStripMenuItem1.Text = "4 Bytes"; - this.dWordToolStripMenuItem1.Click += new System.EventHandler(this.dWordToolStripMenuItem1_Click); - // - // DataTypetoolStripSplitButton1 - // - this.DataTypetoolStripSplitButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.DataTypetoolStripSplitButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.DataSizetoolStripSplitButton1.Image = ((System.Drawing.Image)(resources.GetObject("DataSizetoolStripSplitButton1.Image"))); + this.DataSizetoolStripSplitButton1.ImageTransparentColor = System.Drawing.Color.Magenta; + this.DataSizetoolStripSplitButton1.Name = "DataSizetoolStripSplitButton1"; + this.DataSizetoolStripSplitButton1.Size = new System.Drawing.Size(68, 22); + this.DataSizetoolStripSplitButton1.Text = "Data Size"; + // + // byteToolStripMenuItem + // + this.byteToolStripMenuItem.Checked = true; + this.byteToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; + this.byteToolStripMenuItem.Name = "byteToolStripMenuItem"; + this.byteToolStripMenuItem.Size = new System.Drawing.Size(121, 22); + this.byteToolStripMenuItem.Text = "1 Byte"; + this.byteToolStripMenuItem.Click += new System.EventHandler(this.byteToolStripMenuItem_Click); + // + // bytesToolStripMenuItem + // + this.bytesToolStripMenuItem.Name = "bytesToolStripMenuItem"; + this.bytesToolStripMenuItem.Size = new System.Drawing.Size(121, 22); + this.bytesToolStripMenuItem.Text = "2 Bytes"; + this.bytesToolStripMenuItem.Click += new System.EventHandler(this.bytesToolStripMenuItem_Click); + // + // dWordToolStripMenuItem1 + // + this.dWordToolStripMenuItem1.Name = "dWordToolStripMenuItem1"; + this.dWordToolStripMenuItem1.Size = new System.Drawing.Size(121, 22); + this.dWordToolStripMenuItem1.Text = "4 Bytes"; + this.dWordToolStripMenuItem1.Click += new System.EventHandler(this.dWordToolStripMenuItem1_Click); + // + // DataTypetoolStripSplitButton1 + // + this.DataTypetoolStripSplitButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.DataTypetoolStripSplitButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.unsignedToolStripMenuItem, this.signedToolStripMenuItem, this.hexadecimalToolStripMenuItem, this.toolStripSeparator3, this.includeMisalignedToolStripMenuItem}); - this.DataTypetoolStripSplitButton1.Image = ((System.Drawing.Image)(resources.GetObject("DataTypetoolStripSplitButton1.Image"))); - this.DataTypetoolStripSplitButton1.ImageTransparentColor = System.Drawing.Color.Magenta; - this.DataTypetoolStripSplitButton1.Name = "DataTypetoolStripSplitButton1"; - this.DataTypetoolStripSplitButton1.Size = new System.Drawing.Size(73, 22); - this.DataTypetoolStripSplitButton1.Text = "Data Type"; - // - // unsignedToolStripMenuItem - // - this.unsignedToolStripMenuItem.Checked = true; - this.unsignedToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; - this.unsignedToolStripMenuItem.Name = "unsignedToolStripMenuItem"; - this.unsignedToolStripMenuItem.Size = new System.Drawing.Size(176, 22); - this.unsignedToolStripMenuItem.Text = "Unsigned"; - this.unsignedToolStripMenuItem.Click += new System.EventHandler(this.unsignedToolStripMenuItem_Click); - // - // signedToolStripMenuItem - // - this.signedToolStripMenuItem.Name = "signedToolStripMenuItem"; - this.signedToolStripMenuItem.Size = new System.Drawing.Size(176, 22); - this.signedToolStripMenuItem.Text = "Signed"; - this.signedToolStripMenuItem.Click += new System.EventHandler(this.signedToolStripMenuItem_Click); - // - // hexadecimalToolStripMenuItem - // - this.hexadecimalToolStripMenuItem.Name = "hexadecimalToolStripMenuItem"; - this.hexadecimalToolStripMenuItem.Size = new System.Drawing.Size(176, 22); - this.hexadecimalToolStripMenuItem.Text = "Hexadecimal"; - this.hexadecimalToolStripMenuItem.Click += new System.EventHandler(this.hexadecimalToolStripMenuItem_Click); - // - // toolStripSeparator3 - // - this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(173, 6); - // - // includeMisalignedToolStripMenuItem - // - this.includeMisalignedToolStripMenuItem.Name = "includeMisalignedToolStripMenuItem"; - this.includeMisalignedToolStripMenuItem.Size = new System.Drawing.Size(176, 22); - this.includeMisalignedToolStripMenuItem.Text = "Include mis-aligned"; - this.includeMisalignedToolStripMenuItem.Click += new System.EventHandler(this.includeMisalignedToolStripMenuItem_Click); - // - // EndiantoolSplitButton - // - this.EndiantoolSplitButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.EndiantoolSplitButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.DataTypetoolStripSplitButton1.Image = ((System.Drawing.Image)(resources.GetObject("DataTypetoolStripSplitButton1.Image"))); + this.DataTypetoolStripSplitButton1.ImageTransparentColor = System.Drawing.Color.Magenta; + this.DataTypetoolStripSplitButton1.Name = "DataTypetoolStripSplitButton1"; + this.DataTypetoolStripSplitButton1.Size = new System.Drawing.Size(73, 22); + this.DataTypetoolStripSplitButton1.Text = "Data Type"; + // + // unsignedToolStripMenuItem + // + this.unsignedToolStripMenuItem.Checked = true; + this.unsignedToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; + this.unsignedToolStripMenuItem.Name = "unsignedToolStripMenuItem"; + this.unsignedToolStripMenuItem.Size = new System.Drawing.Size(176, 22); + this.unsignedToolStripMenuItem.Text = "Unsigned"; + this.unsignedToolStripMenuItem.Click += new System.EventHandler(this.unsignedToolStripMenuItem_Click); + // + // signedToolStripMenuItem + // + this.signedToolStripMenuItem.Name = "signedToolStripMenuItem"; + this.signedToolStripMenuItem.Size = new System.Drawing.Size(176, 22); + this.signedToolStripMenuItem.Text = "Signed"; + this.signedToolStripMenuItem.Click += new System.EventHandler(this.signedToolStripMenuItem_Click); + // + // hexadecimalToolStripMenuItem + // + this.hexadecimalToolStripMenuItem.Name = "hexadecimalToolStripMenuItem"; + this.hexadecimalToolStripMenuItem.Size = new System.Drawing.Size(176, 22); + this.hexadecimalToolStripMenuItem.Text = "Hexadecimal"; + this.hexadecimalToolStripMenuItem.Click += new System.EventHandler(this.hexadecimalToolStripMenuItem_Click); + // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(173, 6); + // + // includeMisalignedToolStripMenuItem + // + this.includeMisalignedToolStripMenuItem.Name = "includeMisalignedToolStripMenuItem"; + this.includeMisalignedToolStripMenuItem.Size = new System.Drawing.Size(176, 22); + this.includeMisalignedToolStripMenuItem.Text = "Include mis-aligned"; + this.includeMisalignedToolStripMenuItem.Click += new System.EventHandler(this.includeMisalignedToolStripMenuItem_Click); + // + // EndiantoolSplitButton + // + this.EndiantoolSplitButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.EndiantoolSplitButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.bigEndianToolStripMenuItem, this.littleEndianToolStripMenuItem}); - this.EndiantoolSplitButton.Image = ((System.Drawing.Image)(resources.GetObject("EndiantoolSplitButton.Image"))); - this.EndiantoolSplitButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.EndiantoolSplitButton.Name = "EndiantoolSplitButton"; - this.EndiantoolSplitButton.Size = new System.Drawing.Size(55, 22); - this.EndiantoolSplitButton.Text = "Endian"; - // - // bigEndianToolStripMenuItem - // - this.bigEndianToolStripMenuItem.Checked = true; - this.bigEndianToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; - this.bigEndianToolStripMenuItem.Name = "bigEndianToolStripMenuItem"; - this.bigEndianToolStripMenuItem.Size = new System.Drawing.Size(143, 22); - this.bigEndianToolStripMenuItem.Text = "Big Endian"; - this.bigEndianToolStripMenuItem.Click += new System.EventHandler(this.bigEndianToolStripMenuItem_Click); - // - // littleEndianToolStripMenuItem - // - this.littleEndianToolStripMenuItem.Name = "littleEndianToolStripMenuItem"; - this.littleEndianToolStripMenuItem.Size = new System.Drawing.Size(143, 22); - this.littleEndianToolStripMenuItem.Text = "Little Endian"; - this.littleEndianToolStripMenuItem.Click += new System.EventHandler(this.littleEndianToolStripMenuItem_Click); - // - // CompareToBox - // - this.CompareToBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.CompareToBox.Controls.Add(this.label1); - this.CompareToBox.Controls.Add(this.NumberOfChangesBox); - this.CompareToBox.Controls.Add(this.SpecificAddressBox); - this.CompareToBox.Controls.Add(this.SpecificValueBox); - this.CompareToBox.Controls.Add(this.NumberOfChangesRadio); - this.CompareToBox.Controls.Add(this.SpecificAddressRadio); - this.CompareToBox.Controls.Add(this.SpecificValueRadio); - this.CompareToBox.Controls.Add(this.PreviousValueRadio); - this.CompareToBox.Location = new System.Drawing.Point(250, 116); - this.CompareToBox.Name = "CompareToBox"; - this.CompareToBox.Size = new System.Drawing.Size(211, 111); - this.CompareToBox.TabIndex = 0; - this.CompareToBox.TabStop = false; - this.CompareToBox.Text = "Compare To / By"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(116, 67); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(18, 13); - this.label1.TabIndex = 10; - this.label1.Text = "0x"; - // - // NumberOfChangesBox - // - this.NumberOfChangesBox.Enabled = false; - this.NumberOfChangesBox.Location = new System.Drawing.Point(135, 82); - this.NumberOfChangesBox.MaxLength = 8; - this.NumberOfChangesBox.Name = "NumberOfChangesBox"; - this.NumberOfChangesBox.Size = new System.Drawing.Size(65, 20); - this.NumberOfChangesBox.TabIndex = 6; - this.NumberOfChangesBox.TextChanged += new System.EventHandler(this.NumberOfChangesBox_TextChanged); - this.NumberOfChangesBox.Leave += new System.EventHandler(this.NumberOfChangesBox_Leave); - this.NumberOfChangesBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.NumberOfChangesBox_KeyPress); - // - // SpecificAddressBox - // - this.SpecificAddressBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper; - this.SpecificAddressBox.Enabled = false; - this.SpecificAddressBox.Location = new System.Drawing.Point(135, 60); - this.SpecificAddressBox.MaxLength = 8; - this.SpecificAddressBox.Name = "SpecificAddressBox"; - this.SpecificAddressBox.Size = new System.Drawing.Size(65, 20); - this.SpecificAddressBox.TabIndex = 5; - this.SpecificAddressBox.TextChanged += new System.EventHandler(this.SpecificAddressBox_TextChanged); - this.SpecificAddressBox.Leave += new System.EventHandler(this.SpecificAddressBox_Leave); - this.SpecificAddressBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.SpecificAddressBox_KeyPress); - // - // SpecificValueBox - // - this.SpecificValueBox.Enabled = false; - this.SpecificValueBox.Location = new System.Drawing.Point(135, 38); - this.SpecificValueBox.MaxLength = 9; - this.SpecificValueBox.Name = "SpecificValueBox"; - this.SpecificValueBox.Size = new System.Drawing.Size(65, 20); - this.SpecificValueBox.TabIndex = 4; - this.SpecificValueBox.TextChanged += new System.EventHandler(this.SpecificValueBox_TextChanged); - this.SpecificValueBox.Leave += new System.EventHandler(this.SpecificValueBox_Leave); - this.SpecificValueBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.SpecificValueBox_KeyPress); - // - // NumberOfChangesRadio - // - this.NumberOfChangesRadio.AutoSize = true; - this.NumberOfChangesRadio.Location = new System.Drawing.Point(7, 85); - this.NumberOfChangesRadio.Name = "NumberOfChangesRadio"; - this.NumberOfChangesRadio.Size = new System.Drawing.Size(122, 17); - this.NumberOfChangesRadio.TabIndex = 3; - this.NumberOfChangesRadio.Text = "Number of Changes:"; - this.NumberOfChangesRadio.UseVisualStyleBackColor = true; - this.NumberOfChangesRadio.CheckedChanged += new System.EventHandler(this.NumberOfChangesRadio_CheckedChanged); - // - // SpecificAddressRadio - // - this.SpecificAddressRadio.AutoSize = true; - this.SpecificAddressRadio.Location = new System.Drawing.Point(7, 63); - this.SpecificAddressRadio.Name = "SpecificAddressRadio"; - this.SpecificAddressRadio.Size = new System.Drawing.Size(107, 17); - this.SpecificAddressRadio.TabIndex = 2; - this.SpecificAddressRadio.Text = "Specific Address:"; - this.SpecificAddressRadio.UseVisualStyleBackColor = true; - this.SpecificAddressRadio.CheckedChanged += new System.EventHandler(this.SpecificAddressRadio_CheckedChanged); - // - // SpecificValueRadio - // - this.SpecificValueRadio.AutoSize = true; - this.SpecificValueRadio.Location = new System.Drawing.Point(7, 41); - this.SpecificValueRadio.Name = "SpecificValueRadio"; - this.SpecificValueRadio.Size = new System.Drawing.Size(96, 17); - this.SpecificValueRadio.TabIndex = 1; - this.SpecificValueRadio.Text = "Specific Value:"; - this.SpecificValueRadio.UseVisualStyleBackColor = true; - this.SpecificValueRadio.CheckedChanged += new System.EventHandler(this.SpecificValueRadio_CheckedChanged); - // - // PreviousValueRadio - // - this.PreviousValueRadio.AutoSize = true; - this.PreviousValueRadio.Checked = true; - this.PreviousValueRadio.Location = new System.Drawing.Point(7, 20); - this.PreviousValueRadio.Name = "PreviousValueRadio"; - this.PreviousValueRadio.Size = new System.Drawing.Size(96, 17); - this.PreviousValueRadio.TabIndex = 0; - this.PreviousValueRadio.TabStop = true; - this.PreviousValueRadio.Text = "Previous Value"; - this.PreviousValueRadio.UseVisualStyleBackColor = true; - this.PreviousValueRadio.CheckedChanged += new System.EventHandler(this.PreviousValueRadio_CheckedChanged); - // - // ComparisonBox - // - this.ComparisonBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.ComparisonBox.Controls.Add(this.DifferentByBox); - this.ComparisonBox.Controls.Add(this.DifferentByRadio); - this.ComparisonBox.Controls.Add(this.NotEqualToRadio); - this.ComparisonBox.Controls.Add(this.EqualToRadio); - this.ComparisonBox.Controls.Add(this.GreaterThanOrEqualToRadio); - this.ComparisonBox.Controls.Add(this.LessThanOrEqualToRadio); - this.ComparisonBox.Controls.Add(this.GreaterThanRadio); - this.ComparisonBox.Controls.Add(this.LessThanRadio); - this.ComparisonBox.Location = new System.Drawing.Point(250, 233); - this.ComparisonBox.Name = "ComparisonBox"; - this.ComparisonBox.Size = new System.Drawing.Size(211, 159); - this.ComparisonBox.TabIndex = 6; - this.ComparisonBox.TabStop = false; - this.ComparisonBox.Text = "Comparison Operator"; - // - // DifferentByBox - // - this.DifferentByBox.Enabled = false; - this.DifferentByBox.Location = new System.Drawing.Point(90, 131); - this.DifferentByBox.MaxLength = 9; - this.DifferentByBox.Name = "DifferentByBox"; - this.DifferentByBox.Size = new System.Drawing.Size(50, 20); - this.DifferentByBox.TabIndex = 9; - this.DifferentByBox.TextChanged += new System.EventHandler(this.DifferentByBox_TextChanged); - this.DifferentByBox.Leave += new System.EventHandler(this.DifferentByBox_Leave); - this.DifferentByBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.DifferentByBox_KeyPress); - // - // DifferentByRadio - // - this.DifferentByRadio.AutoSize = true; - this.DifferentByRadio.Location = new System.Drawing.Point(7, 134); - this.DifferentByRadio.Name = "DifferentByRadio"; - this.DifferentByRadio.Size = new System.Drawing.Size(83, 17); - this.DifferentByRadio.TabIndex = 6; - this.DifferentByRadio.Text = "Different By:"; - this.DifferentByRadio.UseVisualStyleBackColor = true; - this.DifferentByRadio.CheckedChanged += new System.EventHandler(this.DifferentByRadio_CheckedChanged); - // - // NotEqualToRadio - // - this.NotEqualToRadio.AutoSize = true; - this.NotEqualToRadio.Location = new System.Drawing.Point(7, 35); - this.NotEqualToRadio.Name = "NotEqualToRadio"; - this.NotEqualToRadio.Size = new System.Drawing.Size(88, 17); - this.NotEqualToRadio.TabIndex = 5; - this.NotEqualToRadio.Text = "Not Equal To"; - this.NotEqualToRadio.UseVisualStyleBackColor = true; - this.NotEqualToRadio.CheckedChanged += new System.EventHandler(this.LessThanRadio_CheckedChanged); - // - // EqualToRadio - // - this.EqualToRadio.AutoSize = true; - this.EqualToRadio.Checked = true; - this.EqualToRadio.Location = new System.Drawing.Point(7, 15); - this.EqualToRadio.Name = "EqualToRadio"; - this.EqualToRadio.Size = new System.Drawing.Size(68, 17); - this.EqualToRadio.TabIndex = 4; - this.EqualToRadio.TabStop = true; - this.EqualToRadio.Text = "Equal To"; - this.EqualToRadio.UseVisualStyleBackColor = true; - this.EqualToRadio.CheckedChanged += new System.EventHandler(this.LessThanRadio_CheckedChanged); - // - // GreaterThanOrEqualToRadio - // - this.GreaterThanOrEqualToRadio.AutoSize = true; - this.GreaterThanOrEqualToRadio.Location = new System.Drawing.Point(7, 113); - this.GreaterThanOrEqualToRadio.Name = "GreaterThanOrEqualToRadio"; - this.GreaterThanOrEqualToRadio.Size = new System.Drawing.Size(146, 17); - this.GreaterThanOrEqualToRadio.TabIndex = 3; - this.GreaterThanOrEqualToRadio.Text = "Greater Than or Equal To"; - this.GreaterThanOrEqualToRadio.UseVisualStyleBackColor = true; - this.GreaterThanOrEqualToRadio.CheckedChanged += new System.EventHandler(this.LessThanRadio_CheckedChanged); - // - // LessThanOrEqualToRadio - // - this.LessThanOrEqualToRadio.AutoSize = true; - this.LessThanOrEqualToRadio.Location = new System.Drawing.Point(7, 93); - this.LessThanOrEqualToRadio.Name = "LessThanOrEqualToRadio"; - this.LessThanOrEqualToRadio.Size = new System.Drawing.Size(133, 17); - this.LessThanOrEqualToRadio.TabIndex = 2; - this.LessThanOrEqualToRadio.Text = "Less Than or Equal To"; - this.LessThanOrEqualToRadio.UseVisualStyleBackColor = true; - this.LessThanOrEqualToRadio.CheckedChanged += new System.EventHandler(this.LessThanRadio_CheckedChanged); - // - // GreaterThanRadio - // - this.GreaterThanRadio.AutoSize = true; - this.GreaterThanRadio.Location = new System.Drawing.Point(7, 74); - this.GreaterThanRadio.Name = "GreaterThanRadio"; - this.GreaterThanRadio.Size = new System.Drawing.Size(88, 17); - this.GreaterThanRadio.TabIndex = 1; - this.GreaterThanRadio.Text = "Greater Than"; - this.GreaterThanRadio.UseVisualStyleBackColor = true; - this.GreaterThanRadio.CheckedChanged += new System.EventHandler(this.LessThanRadio_CheckedChanged); - // - // LessThanRadio - // - this.LessThanRadio.AutoSize = true; - this.LessThanRadio.Location = new System.Drawing.Point(7, 54); - this.LessThanRadio.Name = "LessThanRadio"; - this.LessThanRadio.Size = new System.Drawing.Size(75, 17); - this.LessThanRadio.TabIndex = 0; - this.LessThanRadio.Text = "Less Than"; - this.LessThanRadio.UseVisualStyleBackColor = true; - this.LessThanRadio.CheckedChanged += new System.EventHandler(this.LessThanRadio_CheckedChanged); - // - // AutoSearchCheckBox - // - this.AutoSearchCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.AutoSearchCheckBox.Appearance = System.Windows.Forms.Appearance.Button; - this.AutoSearchCheckBox.AutoSize = true; - this.AutoSearchCheckBox.Location = new System.Drawing.Point(250, 400); - this.AutoSearchCheckBox.Name = "AutoSearchCheckBox"; - this.AutoSearchCheckBox.Size = new System.Drawing.Size(76, 23); - this.AutoSearchCheckBox.TabIndex = 7; - this.AutoSearchCheckBox.Text = "Auto Search"; - this.AutoSearchCheckBox.UseVisualStyleBackColor = true; - this.AutoSearchCheckBox.CheckedChanged += new System.EventHandler(this.AutoSearchCheckBox_CheckedChanged); - // - // MemDomainLabel - // - this.MemDomainLabel.AutoSize = true; - this.MemDomainLabel.Location = new System.Drawing.Point(129, 33); - this.MemDomainLabel.Name = "MemDomainLabel"; - this.MemDomainLabel.Size = new System.Drawing.Size(70, 13); - this.MemDomainLabel.TabIndex = 8; - this.MemDomainLabel.Text = "Main Memory"; - // - // OutputLabel - // - this.OutputLabel.AutoSize = true; - this.OutputLabel.Location = new System.Drawing.Point(9, 436); - this.OutputLabel.Name = "OutputLabel"; - this.OutputLabel.Size = new System.Drawing.Size(85, 13); - this.OutputLabel.TabIndex = 9; - this.OutputLabel.Text = " "; - // - // RamSearch - // - this.AllowDrop = true; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(472, 461); - this.Controls.Add(this.OutputLabel); - this.Controls.Add(this.MemDomainLabel); - this.Controls.Add(this.AutoSearchCheckBox); - this.Controls.Add(this.ComparisonBox); - this.Controls.Add(this.CompareToBox); - this.Controls.Add(this.toolStripContainer1); - this.Controls.Add(this.SearchListView); - this.Controls.Add(this.TotalSearchLabel); - this.Controls.Add(this.menuStrip1); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MainMenuStrip = this.menuStrip1; - this.Name = "RamSearch"; - this.Text = "Ram Search"; - this.Load += new System.EventHandler(this.RamSearch_Load); - this.DragDrop += new System.Windows.Forms.DragEventHandler(this.RamSearch_DragDrop); - this.DragEnter += new System.Windows.Forms.DragEventHandler(this.RamSearch_DragEnter); - this.SearchtoolStrip1.ResumeLayout(false); - this.SearchtoolStrip1.PerformLayout(); - this.contextMenuStrip1.ResumeLayout(false); - this.menuStrip1.ResumeLayout(false); - this.menuStrip1.PerformLayout(); - this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); - this.toolStripContainer1.TopToolStripPanel.PerformLayout(); - this.toolStripContainer1.ResumeLayout(false); - this.toolStripContainer1.PerformLayout(); - this.toolStrip1.ResumeLayout(false); - this.toolStrip1.PerformLayout(); - this.toolStrip2.ResumeLayout(false); - this.toolStrip2.PerformLayout(); - this.CompareToBox.ResumeLayout(false); - this.CompareToBox.PerformLayout(); - this.ComparisonBox.ResumeLayout(false); - this.ComparisonBox.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); + this.EndiantoolSplitButton.Image = ((System.Drawing.Image)(resources.GetObject("EndiantoolSplitButton.Image"))); + this.EndiantoolSplitButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.EndiantoolSplitButton.Name = "EndiantoolSplitButton"; + this.EndiantoolSplitButton.Size = new System.Drawing.Size(55, 22); + this.EndiantoolSplitButton.Text = "Endian"; + // + // bigEndianToolStripMenuItem + // + this.bigEndianToolStripMenuItem.Checked = true; + this.bigEndianToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; + this.bigEndianToolStripMenuItem.Name = "bigEndianToolStripMenuItem"; + this.bigEndianToolStripMenuItem.Size = new System.Drawing.Size(143, 22); + this.bigEndianToolStripMenuItem.Text = "Big Endian"; + this.bigEndianToolStripMenuItem.Click += new System.EventHandler(this.bigEndianToolStripMenuItem_Click); + // + // littleEndianToolStripMenuItem + // + this.littleEndianToolStripMenuItem.Name = "littleEndianToolStripMenuItem"; + this.littleEndianToolStripMenuItem.Size = new System.Drawing.Size(143, 22); + this.littleEndianToolStripMenuItem.Text = "Little Endian"; + this.littleEndianToolStripMenuItem.Click += new System.EventHandler(this.littleEndianToolStripMenuItem_Click); + // + // CompareToBox + // + this.CompareToBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.CompareToBox.Controls.Add(this.label1); + this.CompareToBox.Controls.Add(this.NumberOfChangesBox); + this.CompareToBox.Controls.Add(this.SpecificAddressBox); + this.CompareToBox.Controls.Add(this.SpecificValueBox); + this.CompareToBox.Controls.Add(this.NumberOfChangesRadio); + this.CompareToBox.Controls.Add(this.SpecificAddressRadio); + this.CompareToBox.Controls.Add(this.SpecificValueRadio); + this.CompareToBox.Controls.Add(this.PreviousValueRadio); + this.CompareToBox.Location = new System.Drawing.Point(250, 116); + this.CompareToBox.Name = "CompareToBox"; + this.CompareToBox.Size = new System.Drawing.Size(211, 111); + this.CompareToBox.TabIndex = 0; + this.CompareToBox.TabStop = false; + this.CompareToBox.Text = "Compare To / By"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(116, 67); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(18, 13); + this.label1.TabIndex = 10; + this.label1.Text = "0x"; + // + // NumberOfChangesBox + // + this.NumberOfChangesBox.Enabled = false; + this.NumberOfChangesBox.Location = new System.Drawing.Point(135, 82); + this.NumberOfChangesBox.MaxLength = 8; + this.NumberOfChangesBox.Name = "NumberOfChangesBox"; + this.NumberOfChangesBox.Size = new System.Drawing.Size(65, 20); + this.NumberOfChangesBox.TabIndex = 6; + this.NumberOfChangesBox.TextChanged += new System.EventHandler(this.NumberOfChangesBox_TextChanged); + this.NumberOfChangesBox.Leave += new System.EventHandler(this.NumberOfChangesBox_Leave); + this.NumberOfChangesBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.NumberOfChangesBox_KeyPress); + // + // SpecificAddressBox + // + this.SpecificAddressBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper; + this.SpecificAddressBox.Enabled = false; + this.SpecificAddressBox.Location = new System.Drawing.Point(135, 60); + this.SpecificAddressBox.MaxLength = 8; + this.SpecificAddressBox.Name = "SpecificAddressBox"; + this.SpecificAddressBox.Size = new System.Drawing.Size(65, 20); + this.SpecificAddressBox.TabIndex = 5; + this.SpecificAddressBox.TextChanged += new System.EventHandler(this.SpecificAddressBox_TextChanged); + this.SpecificAddressBox.Leave += new System.EventHandler(this.SpecificAddressBox_Leave); + this.SpecificAddressBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.SpecificAddressBox_KeyPress); + // + // SpecificValueBox + // + this.SpecificValueBox.Enabled = false; + this.SpecificValueBox.Location = new System.Drawing.Point(135, 38); + this.SpecificValueBox.MaxLength = 9; + this.SpecificValueBox.Name = "SpecificValueBox"; + this.SpecificValueBox.Size = new System.Drawing.Size(65, 20); + this.SpecificValueBox.TabIndex = 4; + this.SpecificValueBox.TextChanged += new System.EventHandler(this.SpecificValueBox_TextChanged); + this.SpecificValueBox.Leave += new System.EventHandler(this.SpecificValueBox_Leave); + this.SpecificValueBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.SpecificValueBox_KeyPress); + // + // NumberOfChangesRadio + // + this.NumberOfChangesRadio.AutoSize = true; + this.NumberOfChangesRadio.Location = new System.Drawing.Point(7, 85); + this.NumberOfChangesRadio.Name = "NumberOfChangesRadio"; + this.NumberOfChangesRadio.Size = new System.Drawing.Size(122, 17); + this.NumberOfChangesRadio.TabIndex = 3; + this.NumberOfChangesRadio.Text = "Number of Changes:"; + this.NumberOfChangesRadio.UseVisualStyleBackColor = true; + this.NumberOfChangesRadio.CheckedChanged += new System.EventHandler(this.NumberOfChangesRadio_CheckedChanged); + // + // SpecificAddressRadio + // + this.SpecificAddressRadio.AutoSize = true; + this.SpecificAddressRadio.Location = new System.Drawing.Point(7, 63); + this.SpecificAddressRadio.Name = "SpecificAddressRadio"; + this.SpecificAddressRadio.Size = new System.Drawing.Size(107, 17); + this.SpecificAddressRadio.TabIndex = 2; + this.SpecificAddressRadio.Text = "Specific Address:"; + this.SpecificAddressRadio.UseVisualStyleBackColor = true; + this.SpecificAddressRadio.CheckedChanged += new System.EventHandler(this.SpecificAddressRadio_CheckedChanged); + // + // SpecificValueRadio + // + this.SpecificValueRadio.AutoSize = true; + this.SpecificValueRadio.Location = new System.Drawing.Point(7, 41); + this.SpecificValueRadio.Name = "SpecificValueRadio"; + this.SpecificValueRadio.Size = new System.Drawing.Size(96, 17); + this.SpecificValueRadio.TabIndex = 1; + this.SpecificValueRadio.Text = "Specific Value:"; + this.SpecificValueRadio.UseVisualStyleBackColor = true; + this.SpecificValueRadio.CheckedChanged += new System.EventHandler(this.SpecificValueRadio_CheckedChanged); + // + // PreviousValueRadio + // + this.PreviousValueRadio.AutoSize = true; + this.PreviousValueRadio.Checked = true; + this.PreviousValueRadio.Location = new System.Drawing.Point(7, 20); + this.PreviousValueRadio.Name = "PreviousValueRadio"; + this.PreviousValueRadio.Size = new System.Drawing.Size(96, 17); + this.PreviousValueRadio.TabIndex = 0; + this.PreviousValueRadio.TabStop = true; + this.PreviousValueRadio.Text = "Previous Value"; + this.PreviousValueRadio.UseVisualStyleBackColor = true; + this.PreviousValueRadio.CheckedChanged += new System.EventHandler(this.PreviousValueRadio_CheckedChanged); + // + // ComparisonBox + // + this.ComparisonBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.ComparisonBox.Controls.Add(this.DifferentByBox); + this.ComparisonBox.Controls.Add(this.DifferentByRadio); + this.ComparisonBox.Controls.Add(this.NotEqualToRadio); + this.ComparisonBox.Controls.Add(this.EqualToRadio); + this.ComparisonBox.Controls.Add(this.GreaterThanOrEqualToRadio); + this.ComparisonBox.Controls.Add(this.LessThanOrEqualToRadio); + this.ComparisonBox.Controls.Add(this.GreaterThanRadio); + this.ComparisonBox.Controls.Add(this.LessThanRadio); + this.ComparisonBox.Location = new System.Drawing.Point(250, 233); + this.ComparisonBox.Name = "ComparisonBox"; + this.ComparisonBox.Size = new System.Drawing.Size(211, 159); + this.ComparisonBox.TabIndex = 6; + this.ComparisonBox.TabStop = false; + this.ComparisonBox.Text = "Comparison Operator"; + // + // DifferentByBox + // + this.DifferentByBox.Enabled = false; + this.DifferentByBox.Location = new System.Drawing.Point(90, 131); + this.DifferentByBox.MaxLength = 9; + this.DifferentByBox.Name = "DifferentByBox"; + this.DifferentByBox.Size = new System.Drawing.Size(50, 20); + this.DifferentByBox.TabIndex = 9; + this.DifferentByBox.TextChanged += new System.EventHandler(this.DifferentByBox_TextChanged); + this.DifferentByBox.Leave += new System.EventHandler(this.DifferentByBox_Leave); + this.DifferentByBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.DifferentByBox_KeyPress); + // + // DifferentByRadio + // + this.DifferentByRadio.AutoSize = true; + this.DifferentByRadio.Location = new System.Drawing.Point(7, 134); + this.DifferentByRadio.Name = "DifferentByRadio"; + this.DifferentByRadio.Size = new System.Drawing.Size(83, 17); + this.DifferentByRadio.TabIndex = 6; + this.DifferentByRadio.Text = "Different By:"; + this.DifferentByRadio.UseVisualStyleBackColor = true; + this.DifferentByRadio.CheckedChanged += new System.EventHandler(this.DifferentByRadio_CheckedChanged); + // + // NotEqualToRadio + // + this.NotEqualToRadio.AutoSize = true; + this.NotEqualToRadio.Location = new System.Drawing.Point(7, 35); + this.NotEqualToRadio.Name = "NotEqualToRadio"; + this.NotEqualToRadio.Size = new System.Drawing.Size(88, 17); + this.NotEqualToRadio.TabIndex = 5; + this.NotEqualToRadio.Text = "Not Equal To"; + this.NotEqualToRadio.UseVisualStyleBackColor = true; + this.NotEqualToRadio.CheckedChanged += new System.EventHandler(this.LessThanRadio_CheckedChanged); + // + // EqualToRadio + // + this.EqualToRadio.AutoSize = true; + this.EqualToRadio.Checked = true; + this.EqualToRadio.Location = new System.Drawing.Point(7, 15); + this.EqualToRadio.Name = "EqualToRadio"; + this.EqualToRadio.Size = new System.Drawing.Size(68, 17); + this.EqualToRadio.TabIndex = 4; + this.EqualToRadio.TabStop = true; + this.EqualToRadio.Text = "Equal To"; + this.EqualToRadio.UseVisualStyleBackColor = true; + this.EqualToRadio.CheckedChanged += new System.EventHandler(this.LessThanRadio_CheckedChanged); + // + // GreaterThanOrEqualToRadio + // + this.GreaterThanOrEqualToRadio.AutoSize = true; + this.GreaterThanOrEqualToRadio.Location = new System.Drawing.Point(7, 113); + this.GreaterThanOrEqualToRadio.Name = "GreaterThanOrEqualToRadio"; + this.GreaterThanOrEqualToRadio.Size = new System.Drawing.Size(146, 17); + this.GreaterThanOrEqualToRadio.TabIndex = 3; + this.GreaterThanOrEqualToRadio.Text = "Greater Than or Equal To"; + this.GreaterThanOrEqualToRadio.UseVisualStyleBackColor = true; + this.GreaterThanOrEqualToRadio.CheckedChanged += new System.EventHandler(this.LessThanRadio_CheckedChanged); + // + // LessThanOrEqualToRadio + // + this.LessThanOrEqualToRadio.AutoSize = true; + this.LessThanOrEqualToRadio.Location = new System.Drawing.Point(7, 93); + this.LessThanOrEqualToRadio.Name = "LessThanOrEqualToRadio"; + this.LessThanOrEqualToRadio.Size = new System.Drawing.Size(133, 17); + this.LessThanOrEqualToRadio.TabIndex = 2; + this.LessThanOrEqualToRadio.Text = "Less Than or Equal To"; + this.LessThanOrEqualToRadio.UseVisualStyleBackColor = true; + this.LessThanOrEqualToRadio.CheckedChanged += new System.EventHandler(this.LessThanRadio_CheckedChanged); + // + // GreaterThanRadio + // + this.GreaterThanRadio.AutoSize = true; + this.GreaterThanRadio.Location = new System.Drawing.Point(7, 74); + this.GreaterThanRadio.Name = "GreaterThanRadio"; + this.GreaterThanRadio.Size = new System.Drawing.Size(88, 17); + this.GreaterThanRadio.TabIndex = 1; + this.GreaterThanRadio.Text = "Greater Than"; + this.GreaterThanRadio.UseVisualStyleBackColor = true; + this.GreaterThanRadio.CheckedChanged += new System.EventHandler(this.LessThanRadio_CheckedChanged); + // + // LessThanRadio + // + this.LessThanRadio.AutoSize = true; + this.LessThanRadio.Location = new System.Drawing.Point(7, 54); + this.LessThanRadio.Name = "LessThanRadio"; + this.LessThanRadio.Size = new System.Drawing.Size(75, 17); + this.LessThanRadio.TabIndex = 0; + this.LessThanRadio.Text = "Less Than"; + this.LessThanRadio.UseVisualStyleBackColor = true; + this.LessThanRadio.CheckedChanged += new System.EventHandler(this.LessThanRadio_CheckedChanged); + // + // AutoSearchCheckBox + // + this.AutoSearchCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.AutoSearchCheckBox.Appearance = System.Windows.Forms.Appearance.Button; + this.AutoSearchCheckBox.AutoSize = true; + this.AutoSearchCheckBox.Location = new System.Drawing.Point(250, 400); + this.AutoSearchCheckBox.Name = "AutoSearchCheckBox"; + this.AutoSearchCheckBox.Size = new System.Drawing.Size(76, 23); + this.AutoSearchCheckBox.TabIndex = 7; + this.AutoSearchCheckBox.Text = "Auto Search"; + this.AutoSearchCheckBox.UseVisualStyleBackColor = true; + this.AutoSearchCheckBox.CheckedChanged += new System.EventHandler(this.AutoSearchCheckBox_CheckedChanged); + // + // MemDomainLabel + // + this.MemDomainLabel.AutoSize = true; + this.MemDomainLabel.Location = new System.Drawing.Point(129, 33); + this.MemDomainLabel.Name = "MemDomainLabel"; + this.MemDomainLabel.Size = new System.Drawing.Size(70, 13); + this.MemDomainLabel.TabIndex = 8; + this.MemDomainLabel.Text = "Main Memory"; + // + // OutputLabel + // + this.OutputLabel.AutoSize = true; + this.OutputLabel.Location = new System.Drawing.Point(9, 436); + this.OutputLabel.Name = "OutputLabel"; + this.OutputLabel.Size = new System.Drawing.Size(85, 13); + this.OutputLabel.TabIndex = 9; + this.OutputLabel.Text = " "; + // + // RamSearch + // + this.AllowDrop = true; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(472, 461); + this.Controls.Add(this.OutputLabel); + this.Controls.Add(this.MemDomainLabel); + this.Controls.Add(this.AutoSearchCheckBox); + this.Controls.Add(this.ComparisonBox); + this.Controls.Add(this.CompareToBox); + this.Controls.Add(this.toolStripContainer1); + this.Controls.Add(this.SearchListView); + this.Controls.Add(this.TotalSearchLabel); + this.Controls.Add(this.menuStrip1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MainMenuStrip = this.menuStrip1; + this.Name = "RamSearch"; + this.Text = "Ram Search"; + this.Load += new System.EventHandler(this.RamSearch_Load); + this.DragDrop += new System.Windows.Forms.DragEventHandler(this.RamSearch_DragDrop); + this.DragEnter += new System.Windows.Forms.DragEventHandler(this.RamSearch_DragEnter); + this.SearchtoolStrip1.ResumeLayout(false); + this.SearchtoolStrip1.PerformLayout(); + this.contextMenuStrip1.ResumeLayout(false); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); + this.toolStripContainer1.TopToolStripPanel.PerformLayout(); + this.toolStripContainer1.ResumeLayout(false); + this.toolStripContainer1.PerformLayout(); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + this.toolStrip2.ResumeLayout(false); + this.toolStrip2.PerformLayout(); + this.CompareToBox.ResumeLayout(false); + this.CompareToBox.PerformLayout(); + this.ComparisonBox.ResumeLayout(false); + this.ComparisonBox.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); } diff --git a/BizHawk.MultiClient/tools/RamSearch.cs b/BizHawk.MultiClient/tools/RamSearch.cs index f9fe0dd085..a0a9b8d8d7 100644 --- a/BizHawk.MultiClient/tools/RamSearch.cs +++ b/BizHawk.MultiClient/tools/RamSearch.cs @@ -11,605 +11,615 @@ using System.Globalization; namespace BizHawk.MultiClient { - /// - /// A winform designed to search through ram values - /// - public partial class RamSearch : Form - { - string systemID = "NULL"; - List searchList = new List(); - List undoList = new List(); - List weededList = new List(); //When addresses are weeded out, the new list goes here, before going into searchList - List prevList = new List(); - private bool IsAWeededList = false; //For deciding whether the weeded list is relevant (0 size could mean all were removed in a legit preview - List domainMenuItems = new List(); - MemoryDomain Domain = new MemoryDomain("NULL", 1, Endian.Little, addr => 0, (a, v) => { }); + //TODO: + //Sorting by Prev only does "Since prev frame", find a way to integrate the various prev options - public enum SCompareTo { PREV, VALUE, ADDRESS, CHANGES }; - public enum SOperator { LESS, GREATER, LESSEQUAL, GREATEREQUAL, EQUAL, NOTEQUAL, DIFFBY }; - public enum SSigned { SIGNED, UNSIGNED, HEX }; + /// + /// A winform designed to search through ram values + /// + public partial class RamSearch : Form + { + string systemID = "NULL"; + List searchList = new List(); + List undoList = new List(); + List weededList = new List(); //When addresses are weeded out, the new list goes here, before going into searchList + List prevList = new List(); + private bool IsAWeededList = false; //For deciding whether the weeded list is relevant (0 size could mean all were removed in a legit preview + List domainMenuItems = new List(); + MemoryDomain Domain = new MemoryDomain("NULL", 1, Endian.Little, addr => 0, (a, v) => { }); - //Reset window position item - int defaultWidth; //For saving the default size of the dialog, so the user can restore if desired - int defaultHeight; - int defaultAddressWidth; - int defaultValueWidth; - int defaultPrevWidth; - int defaultChangesWidth; - string currentSearchFile = ""; + public enum SCompareTo { PREV, VALUE, ADDRESS, CHANGES }; + public enum SOperator { LESS, GREATER, LESSEQUAL, GREATEREQUAL, EQUAL, NOTEQUAL, DIFFBY }; + public enum SSigned { SIGNED, UNSIGNED, HEX }; - public void SaveConfigSettings() - { - ColumnPositionSet(); - Global.Config.RamSearchAddressWidth = SearchListView.Columns[Global.Config.RamSearchAddressIndex].Width; - Global.Config.RamSearchValueWidth = SearchListView.Columns[Global.Config.RamSearchValueIndex].Width; - Global.Config.RamSearchPrevWidth = SearchListView.Columns[Global.Config.RamSearchPrevIndex].Width; - Global.Config.RamSearchChangesWidth = SearchListView.Columns[Global.Config.RamSearchChangesIndex].Width; + //Reset window position item + int defaultWidth; //For saving the default size of the dialog, so the user can restore if desired + int defaultHeight; + int defaultAddressWidth; + int defaultValueWidth; + int defaultPrevWidth; + int defaultChangesWidth; + string currentSearchFile = ""; - Global.Config.RamSearchWndx = this.Location.X; - Global.Config.RamSearchWndy = this.Location.Y; - Global.Config.RamSearchWidth = this.Right - this.Left; - Global.Config.RamSearchHeight = this.Bottom - this.Top; - } + bool sortReverse; + string sortedCol; - public RamSearch() - { - InitializeComponent(); - Closing += (o, e) => SaveConfigSettings(); - } + public void SaveConfigSettings() + { + ColumnPositionSet(); + Global.Config.RamSearchAddressWidth = SearchListView.Columns[Global.Config.RamSearchAddressIndex].Width; + Global.Config.RamSearchValueWidth = SearchListView.Columns[Global.Config.RamSearchValueIndex].Width; + Global.Config.RamSearchPrevWidth = SearchListView.Columns[Global.Config.RamSearchPrevIndex].Width; + Global.Config.RamSearchChangesWidth = SearchListView.Columns[Global.Config.RamSearchChangesIndex].Width; - public void UpdateValues() - { - if (!this.IsHandleCreated || this.IsDisposed) return; - for (int x = 0; x < searchList.Count; x++) - { - searchList[x].prev = searchList[x].value; - searchList[x].PeekAddress(Domain); + Global.Config.RamSearchWndx = this.Location.X; + Global.Config.RamSearchWndy = this.Location.Y; + Global.Config.RamSearchWidth = this.Right - this.Left; + Global.Config.RamSearchHeight = this.Bottom - this.Top; + } - if (searchList[x].prev != searchList[x].value) - searchList[x].changecount++; - - } - if (AutoSearchCheckBox.Checked) - DoSearch(); - else if (Global.Config.RamSearchPreviewMode) - DoPreview(); - SearchListView.Refresh(); - } + public RamSearch() + { + InitializeComponent(); + Closing += (o, e) => SaveConfigSettings(); + } - private void RamSearch_Load(object sender, EventArgs e) - { - LoadConfigSettings(); - StartNewSearch(); - SetMemoryDomainMenu(); - } + public void UpdateValues() + { + sortReverse = false; + sortedCol = ""; + if (!this.IsHandleCreated || this.IsDisposed) return; + for (int x = 0; x < searchList.Count; x++) + { + searchList[x].prev = searchList[x].value; + searchList[x].PeekAddress(Domain); - private void LoadConfigSettings() - { - ColumnPositionSet(); + if (searchList[x].prev != searchList[x].value) + searchList[x].changecount++; - defaultWidth = this.Size.Width; //Save these first so that the user can restore to its original size - defaultHeight = this.Size.Height; - defaultAddressWidth = SearchListView.Columns[Global.Config.RamSearchAddressIndex].Width; - defaultValueWidth = SearchListView.Columns[Global.Config.RamSearchValueIndex].Width; - defaultPrevWidth = SearchListView.Columns[Global.Config.RamSearchPrevIndex].Width; - defaultChangesWidth = SearchListView.Columns[Global.Config.RamSearchChangesIndex].Width; + } + if (AutoSearchCheckBox.Checked) + DoSearch(); + else if (Global.Config.RamSearchPreviewMode) + DoPreview(); + SearchListView.Refresh(); + } - if (Domain.Endian == Endian.Big) - { - bigEndianToolStripMenuItem.Checked = true; - littleEndianToolStripMenuItem.Checked = false; - } - else - { - bigEndianToolStripMenuItem.Checked = false; - littleEndianToolStripMenuItem.Checked = true; - } + private void RamSearch_Load(object sender, EventArgs e) + { + LoadConfigSettings(); + StartNewSearch(); + SetMemoryDomainMenu(); + } - if (Global.Config.RamSearchSaveWindowPosition && Global.Config.RamSearchWndx >= 0 && Global.Config.RamSearchWndy >= 0) - this.Location = new Point(Global.Config.RamSearchWndx, Global.Config.RamSearchWndy); + private void LoadConfigSettings() + { + ColumnPositionSet(); - if (Global.Config.RamSearchWidth >= 0 && Global.Config.RamSearchHeight >= 0) - { - this.Size = new System.Drawing.Size(Global.Config.RamSearchWidth, Global.Config.RamSearchHeight); - } + defaultWidth = this.Size.Width; //Save these first so that the user can restore to its original size + defaultHeight = this.Size.Height; + defaultAddressWidth = SearchListView.Columns[Global.Config.RamSearchAddressIndex].Width; + defaultValueWidth = SearchListView.Columns[Global.Config.RamSearchValueIndex].Width; + defaultPrevWidth = SearchListView.Columns[Global.Config.RamSearchPrevIndex].Width; + defaultChangesWidth = SearchListView.Columns[Global.Config.RamSearchChangesIndex].Width; - if (Global.Config.RamSearchAddressWidth > 0) - SearchListView.Columns[Global.Config.RamSearchAddressIndex].Width = Global.Config.RamSearchAddressWidth; - if (Global.Config.RamSearchValueWidth > 0) - SearchListView.Columns[Global.Config.RamSearchValueIndex].Width = Global.Config.RamSearchValueWidth; - if (Global.Config.RamSearchPrevWidth > 0) - SearchListView.Columns[Global.Config.RamSearchPrevIndex].Width = Global.Config.RamSearchPrevWidth; - if (Global.Config.RamSearchChangesWidth > 0) - SearchListView.Columns[Global.Config.RamSearchChangesIndex].Width = Global.Config.RamSearchChangesWidth; - } + if (Domain.Endian == Endian.Big) + { + bigEndianToolStripMenuItem.Checked = true; + littleEndianToolStripMenuItem.Checked = false; + } + else + { + bigEndianToolStripMenuItem.Checked = false; + littleEndianToolStripMenuItem.Checked = true; + } - private void SetMemoryDomainMenu() - { - memoryDomainsToolStripMenuItem.DropDownItems.Clear(); - if (Global.Emulator.MemoryDomains.Count > 0) - { - for (int x = 0; x < Global.Emulator.MemoryDomains.Count; x++) - { - string str = Global.Emulator.MemoryDomains[x].ToString(); - var item = new ToolStripMenuItem(); - item.Text = str; - { - int z = x; - item.Click += (o, ev) => SetMemoryDomain(z); - } - if (x == 0) - { - SetMemoryDomain(x); - } - memoryDomainsToolStripMenuItem.DropDownItems.Add(item); - domainMenuItems.Add(item); - } - } - else - memoryDomainsToolStripMenuItem.Enabled = false; - } + if (Global.Config.RamSearchSaveWindowPosition && Global.Config.RamSearchWndx >= 0 && Global.Config.RamSearchWndy >= 0) + this.Location = new Point(Global.Config.RamSearchWndx, Global.Config.RamSearchWndy); - public void Restart() - { - if (!this.IsHandleCreated || this.IsDisposed) return; - SetMemoryDomainMenu(); //Calls Start New Search - } + if (Global.Config.RamSearchWidth >= 0 && Global.Config.RamSearchHeight >= 0) + { + this.Size = new System.Drawing.Size(Global.Config.RamSearchWidth, Global.Config.RamSearchHeight); + } - private void SetMemoryDomain(int pos) - { - if (pos < Global.Emulator.MemoryDomains.Count) //Sanity check - { - Domain = Global.Emulator.MemoryDomains[pos]; - } - SetPlatformAndMemoryDomainLabel(); - StartNewSearch(); - } + if (Global.Config.RamSearchAddressWidth > 0) + SearchListView.Columns[Global.Config.RamSearchAddressIndex].Width = Global.Config.RamSearchAddressWidth; + if (Global.Config.RamSearchValueWidth > 0) + SearchListView.Columns[Global.Config.RamSearchValueIndex].Width = Global.Config.RamSearchValueWidth; + if (Global.Config.RamSearchPrevWidth > 0) + SearchListView.Columns[Global.Config.RamSearchPrevIndex].Width = Global.Config.RamSearchPrevWidth; + if (Global.Config.RamSearchChangesWidth > 0) + SearchListView.Columns[Global.Config.RamSearchChangesIndex].Width = Global.Config.RamSearchChangesWidth; + } - private void SetTotal() - { - int x = searchList.Count; - string str; - if (x == 1) - str = " address"; - else - str = " addresses"; - TotalSearchLabel.Text = x.ToString() + str; - } + private void SetMemoryDomainMenu() + { + memoryDomainsToolStripMenuItem.DropDownItems.Clear(); + if (Global.Emulator.MemoryDomains.Count > 0) + { + for (int x = 0; x < Global.Emulator.MemoryDomains.Count; x++) + { + string str = Global.Emulator.MemoryDomains[x].ToString(); + var item = new ToolStripMenuItem(); + item.Text = str; + { + int z = x; + item.Click += (o, ev) => SetMemoryDomain(z); + } + if (x == 0) + { + SetMemoryDomain(x); + } + memoryDomainsToolStripMenuItem.DropDownItems.Add(item); + domainMenuItems.Add(item); + } + } + else + memoryDomainsToolStripMenuItem.Enabled = false; + } - private void OpenSearchFile() - { - var file = GetFileFromUser(); - if (file != null) - { - LoadSearchFile(file.FullName, false, false, searchList); - DisplaySearchList(); - } - } + public void Restart() + { + if (!this.IsHandleCreated || this.IsDisposed) return; + SetMemoryDomainMenu(); //Calls Start New Search + } - private void openToolStripMenuItem_Click(object sender, EventArgs e) - { - OpenSearchFile(); - } + private void SetMemoryDomain(int pos) + { + if (pos < Global.Emulator.MemoryDomains.Count) //Sanity check + { + Domain = Global.Emulator.MemoryDomains[pos]; + } + SetPlatformAndMemoryDomainLabel(); + StartNewSearch(); + } - private void openToolStripButton_Click(object sender, EventArgs e) - { - OpenSearchFile(); - } + private void SetTotal() + { + int x = searchList.Count; + string str; + if (x == 1) + str = " address"; + else + str = " addresses"; + TotalSearchLabel.Text = x.ToString() + str; + } - private void saveAsToolStripMenuItem_Click(object sender, EventArgs e) - { - SaveAs(); - } + private void OpenSearchFile() + { + var file = GetFileFromUser(); + if (file != null) + { + LoadSearchFile(file.FullName, false, false, searchList); + DisplaySearchList(); + } + } - private void exitToolStripMenuItem_Click(object sender, EventArgs e) - { - this.Hide(); - } + private void openToolStripMenuItem_Click(object sender, EventArgs e) + { + OpenSearchFile(); + } - private void SpecificValueRadio_CheckedChanged(object sender, EventArgs e) - { - if (SpecificValueRadio.Checked) - { - if (SpecificValueBox.Text == "") SpecificValueBox.Text = "0"; - SpecificValueBox.Enabled = true; - SpecificAddressBox.Enabled = false; - NumberOfChangesBox.Enabled = false; - SpecificValueBox.Focus(); - SpecificValueBox.SelectAll(); - } - DoPreview(); - } + private void openToolStripButton_Click(object sender, EventArgs e) + { + OpenSearchFile(); + } - private void PreviousValueRadio_CheckedChanged(object sender, EventArgs e) - { - if (PreviousValueRadio.Checked) - { - SpecificValueBox.Enabled = false; - SpecificAddressBox.Enabled = false; - NumberOfChangesBox.Enabled = false; - } - DoPreview(); - } + private void saveAsToolStripMenuItem_Click(object sender, EventArgs e) + { + SaveAs(); + } - private void SpecificAddressRadio_CheckedChanged(object sender, EventArgs e) - { - if (SpecificAddressRadio.Checked) - { - if (SpecificAddressBox.Text == "") SpecificAddressBox.Text = "0"; - SpecificValueBox.Enabled = false; - SpecificAddressBox.Enabled = true; - NumberOfChangesBox.Enabled = false; - SpecificAddressBox.Focus(); - SpecificAddressBox.SelectAll(); - } - DoPreview(); - } + private void exitToolStripMenuItem_Click(object sender, EventArgs e) + { + this.Hide(); + } - private void NumberOfChangesRadio_CheckedChanged(object sender, EventArgs e) - { - if (NumberOfChangesRadio.Checked) - { - if (NumberOfChangesBox.Text == "") NumberOfChangesBox.Text = "0"; - SpecificValueBox.Enabled = false; - SpecificAddressBox.Enabled = false; - NumberOfChangesBox.Enabled = true; - NumberOfChangesBox.Focus(); - NumberOfChangesBox.SelectAll(); - } - } + private void SpecificValueRadio_CheckedChanged(object sender, EventArgs e) + { + if (SpecificValueRadio.Checked) + { + if (SpecificValueBox.Text == "") SpecificValueBox.Text = "0"; + SpecificValueBox.Enabled = true; + SpecificAddressBox.Enabled = false; + NumberOfChangesBox.Enabled = false; + SpecificValueBox.Focus(); + SpecificValueBox.SelectAll(); + } + DoPreview(); + } - private void DifferentByRadio_CheckedChanged(object sender, EventArgs e) - { - if (DifferentByRadio.Checked) - { - if (DifferentByBox.Text == "0") DifferentByBox.Text = "0"; - DifferentByBox.Enabled = true; - DoPreview(); - } - else - DifferentByBox.Enabled = false; - DifferentByBox.Focus(); - DifferentByBox.SelectAll(); - } + private void PreviousValueRadio_CheckedChanged(object sender, EventArgs e) + { + if (PreviousValueRadio.Checked) + { + SpecificValueBox.Enabled = false; + SpecificAddressBox.Enabled = false; + NumberOfChangesBox.Enabled = false; + } + DoPreview(); + } - private void AddToRamWatch() - { - ListView.SelectedIndexCollection indexes = SearchListView.SelectedIndices; + private void SpecificAddressRadio_CheckedChanged(object sender, EventArgs e) + { + if (SpecificAddressRadio.Checked) + { + if (SpecificAddressBox.Text == "") SpecificAddressBox.Text = "0"; + SpecificValueBox.Enabled = false; + SpecificAddressBox.Enabled = true; + NumberOfChangesBox.Enabled = false; + SpecificAddressBox.Focus(); + SpecificAddressBox.SelectAll(); + } + DoPreview(); + } - if (indexes.Count > 0) - { - Global.MainForm.LoadRamWatch(); - for (int x = 0; x < indexes.Count; x++) - Global.MainForm.RamWatch1.AddWatch(searchList[indexes[x]]); - } - } + private void NumberOfChangesRadio_CheckedChanged(object sender, EventArgs e) + { + if (NumberOfChangesRadio.Checked) + { + if (NumberOfChangesBox.Text == "") NumberOfChangesBox.Text = "0"; + SpecificValueBox.Enabled = false; + SpecificAddressBox.Enabled = false; + NumberOfChangesBox.Enabled = true; + NumberOfChangesBox.Focus(); + NumberOfChangesBox.SelectAll(); + } + } - private void WatchtoolStripButton1_Click(object sender, EventArgs e) - { - AddToRamWatch(); - } + private void DifferentByRadio_CheckedChanged(object sender, EventArgs e) + { + if (DifferentByRadio.Checked) + { + if (DifferentByBox.Text == "0") DifferentByBox.Text = "0"; + DifferentByBox.Enabled = true; + DoPreview(); + } + else + DifferentByBox.Enabled = false; + DifferentByBox.Focus(); + DifferentByBox.SelectAll(); + } - private void restoreOriginalWindowSizeToolStripMenuItem_Click(object sender, EventArgs e) - { - this.Size = new System.Drawing.Size(defaultWidth, defaultHeight); - Global.Config.RamSearchAddressIndex = 0; - Global.Config.RamSearchValueIndex = 1; - Global.Config.RamSearchPrevIndex = 2; - Global.Config.RamSearchChangesIndex = 3; - ColumnPositionSet(); + private void AddToRamWatch() + { + ListView.SelectedIndexCollection indexes = SearchListView.SelectedIndices; - SearchListView.Columns[0].Width = defaultAddressWidth; - SearchListView.Columns[1].Width = defaultValueWidth; - SearchListView.Columns[2].Width = defaultPrevWidth; - SearchListView.Columns[3].Width = defaultChangesWidth; - } + if (indexes.Count > 0) + { + Global.MainForm.LoadRamWatch(); + for (int x = 0; x < indexes.Count; x++) + Global.MainForm.RamWatch1.AddWatch(searchList[indexes[x]]); + } + } - private void NewSearchtoolStripButton_Click(object sender, EventArgs e) - { - StartNewSearch(); - } + private void WatchtoolStripButton1_Click(object sender, EventArgs e) + { + AddToRamWatch(); + } - private asigned GetDataType() - { - if (unsignedToolStripMenuItem.Checked) - return asigned.UNSIGNED; - if (signedToolStripMenuItem.Checked) - return asigned.SIGNED; - if (hexadecimalToolStripMenuItem.Checked) - return asigned.HEX; + private void restoreOriginalWindowSizeToolStripMenuItem_Click(object sender, EventArgs e) + { + this.Size = new System.Drawing.Size(defaultWidth, defaultHeight); + Global.Config.RamSearchAddressIndex = 0; + Global.Config.RamSearchValueIndex = 1; + Global.Config.RamSearchPrevIndex = 2; + Global.Config.RamSearchChangesIndex = 3; + ColumnPositionSet(); - return asigned.UNSIGNED; //Just in case - } + SearchListView.Columns[0].Width = defaultAddressWidth; + SearchListView.Columns[1].Width = defaultValueWidth; + SearchListView.Columns[2].Width = defaultPrevWidth; + SearchListView.Columns[3].Width = defaultChangesWidth; + } - private atype GetDataSize() - { - if (byteToolStripMenuItem.Checked) - return atype.BYTE; - if (bytesToolStripMenuItem.Checked) - return atype.WORD; - if (dWordToolStripMenuItem1.Checked) - return atype.DWORD; + private void NewSearchtoolStripButton_Click(object sender, EventArgs e) + { + StartNewSearch(); + } - return atype.BYTE; - } + private asigned GetDataType() + { + if (unsignedToolStripMenuItem.Checked) + return asigned.UNSIGNED; + if (signedToolStripMenuItem.Checked) + return asigned.SIGNED; + if (hexadecimalToolStripMenuItem.Checked) + return asigned.HEX; - private bool GetBigEndian() - { - if (bigEndianToolStripMenuItem.Checked) - return true; - else - return false; - } + return asigned.UNSIGNED; //Just in case + } - private void StartNewSearch() - { - weededList.Clear(); - IsAWeededList = false; - searchList.Clear(); - undoList.Clear(); - SetPlatformAndMemoryDomainLabel(); - int count = 0; - int divisor = 1; + private atype GetDataSize() + { + if (byteToolStripMenuItem.Checked) + return atype.BYTE; + if (bytesToolStripMenuItem.Checked) + return atype.WORD; + if (dWordToolStripMenuItem1.Checked) + return atype.DWORD; - if (!includeMisalignedToolStripMenuItem.Checked) - { - switch (GetDataSize()) - { - case atype.WORD: - divisor = 2; - break; - case atype.DWORD: - divisor = 4; - break; - default: - divisor = 1; - break; - } - } - - for (int x = 0; x <= ((Domain.Size / divisor)-1); x++) - { - searchList.Add(new Watch()); - searchList[x].address = count; - searchList[x].type = GetDataSize(); - searchList[x].bigendian = GetBigEndian(); - searchList[x].signed = GetDataType(); - searchList[x].PeekAddress(Domain); - searchList[x].prev = searchList[x].value; - if (includeMisalignedToolStripMenuItem.Checked) - count++; - else - { - switch (GetDataSize()) - { - case atype.BYTE: - count++; - break; - case atype.WORD: - count += 2; - break; - case atype.DWORD: - count += 4; - break; - } - } - - } - if (Global.Config.AlwaysExludeRamWatch) - ExludeRamWatchList(); - MakePreviousList(); - SetSpecificValueBoxMaxLength(); - OutputLabel.Text = "New search started"; - DisplaySearchList(); - } + return atype.BYTE; + } - private void MakePreviousList() - { - prevList = new List(); + private bool GetBigEndian() + { + if (bigEndianToolStripMenuItem.Checked) + return true; + else + return false; + } - for (int x = 0; x < searchList.Count; x++) - prevList.Add(new Watch(searchList[x])); - } + private void StartNewSearch() + { + weededList.Clear(); + IsAWeededList = false; + searchList.Clear(); + undoList.Clear(); + SetPlatformAndMemoryDomainLabel(); + int count = 0; + int divisor = 1; - private void DisplaySearchList() - { + if (!includeMisalignedToolStripMenuItem.Checked) + { + switch (GetDataSize()) + { + case atype.WORD: + divisor = 2; + break; + case atype.DWORD: + divisor = 4; + break; + default: + divisor = 1; + break; + } + } + + for (int x = 0; x <= ((Domain.Size / divisor) - 1); x++) + { + searchList.Add(new Watch()); + searchList[x].address = count; + searchList[x].type = GetDataSize(); + searchList[x].bigendian = GetBigEndian(); + searchList[x].signed = GetDataType(); + searchList[x].PeekAddress(Domain); + searchList[x].prev = searchList[x].value; + if (includeMisalignedToolStripMenuItem.Checked) + count++; + else + { + switch (GetDataSize()) + { + case atype.BYTE: + count++; + break; + case atype.WORD: + count += 2; + break; + case atype.DWORD: + count += 4; + break; + } + } + + } + if (Global.Config.AlwaysExludeRamWatch) + ExludeRamWatchList(); + MakePreviousList(); + SetSpecificValueBoxMaxLength(); + OutputLabel.Text = "New search started"; + sortReverse = false; + sortedCol = ""; + DisplaySearchList(); + } + + private void MakePreviousList() + { + prevList = new List(); + + for (int x = 0; x < searchList.Count; x++) + prevList.Add(new Watch(searchList[x])); + } + + private void DisplaySearchList() + { SearchListView.ItemCount = searchList.Count; - SetTotal(); - } + SetTotal(); + } - private void newSearchToolStripMenuItem_Click(object sender, EventArgs e) - { - StartNewSearch(); - } + private void newSearchToolStripMenuItem_Click(object sender, EventArgs e) + { + StartNewSearch(); + } - private void SetPlatformAndMemoryDomainLabel() - { - string memoryDomain = Domain.ToString(); - systemID = Global.Emulator.SystemId; - MemDomainLabel.Text = systemID + " " + memoryDomain; - } + private void SetPlatformAndMemoryDomainLabel() + { + string memoryDomain = Domain.ToString(); + systemID = Global.Emulator.SystemId; + MemDomainLabel.Text = systemID + " " + memoryDomain; + } - private Point GetPromptPoint() - { + private Point GetPromptPoint() + { - Point p = new Point(SearchListView.Location.X, SearchListView.Location.Y); - Point q = new Point(); - q = PointToScreen(p); - return q; - } + Point p = new Point(SearchListView.Location.X, SearchListView.Location.Y); + Point q = new Point(); + q = PointToScreen(p); + return q; + } - private void PokeAddress() - { - ListView.SelectedIndexCollection indexes = SearchListView.SelectedIndices; - RamPoke p = new RamPoke(); + private void PokeAddress() + { + ListView.SelectedIndexCollection indexes = SearchListView.SelectedIndices; + RamPoke p = new RamPoke(); - if (indexes.Count > 0) - p.SetWatchObject(searchList[indexes[0]]); - p.location = GetPromptPoint(); - p.ShowDialog(); - } + if (indexes.Count > 0) + p.SetWatchObject(searchList[indexes[0]]); + p.location = GetPromptPoint(); + p.ShowDialog(); + } - private void PoketoolStripButton1_Click(object sender, EventArgs e) - { - PokeAddress(); - } + private void PoketoolStripButton1_Click(object sender, EventArgs e) + { + PokeAddress(); + } - private string MakeAddressString(int num) - { - if (num == 1) - return "1 address"; - else - return num.ToString() + " addresses"; - } + private string MakeAddressString(int num) + { + if (num == 1) + return "1 address"; + else + return num.ToString() + " addresses"; + } - private void RemoveAddresses() - { - ListView.SelectedIndexCollection indexes = SearchListView.SelectedIndices; - if (indexes.Count > 0) - { - SaveUndo(); - OutputLabel.Text = MakeAddressString(indexes.Count) + " removed"; - for (int x = 0; x < indexes.Count; x++) - { - searchList.Remove(searchList[indexes[x]-x]); - } - DisplaySearchList(); - } - } + private void RemoveAddresses() + { + ListView.SelectedIndexCollection indexes = SearchListView.SelectedIndices; + if (indexes.Count > 0) + { + SaveUndo(); + OutputLabel.Text = MakeAddressString(indexes.Count) + " removed"; + for (int x = 0; x < indexes.Count; x++) + { + searchList.Remove(searchList[indexes[x] - x]); + } + DisplaySearchList(); + } + } - private void cutToolStripButton_Click(object sender, EventArgs e) - { - RemoveAddresses(); - } + private void cutToolStripButton_Click(object sender, EventArgs e) + { + RemoveAddresses(); + } - /// - /// Saves the current search list to the undo list - /// This function should be called before any destructive operation to the list! - /// - private void SaveUndo() - { - undoList.Clear(); - for (int x = 0; x < searchList.Count; x++) - undoList.Add(new Watch(searchList[x])); - } + /// + /// Saves the current search list to the undo list + /// This function should be called before any destructive operation to the list! + /// + private void SaveUndo() + { + undoList.Clear(); + for (int x = 0; x < searchList.Count; x++) + undoList.Add(new Watch(searchList[x])); + } - private void DoUndo() - { - if (undoList.Count > 0) - { - OutputLabel.Text = MakeAddressString(undoList.Count - searchList.Count) + " restored"; - searchList = new List(undoList); - undoList.Clear(); - DisplaySearchList(); - } - } + private void DoUndo() + { + if (undoList.Count > 0) + { + OutputLabel.Text = MakeAddressString(undoList.Count - searchList.Count) + " restored"; + searchList = new List(undoList); + undoList.Clear(); + DisplaySearchList(); + } + } - private void UndotoolStripButton_Click(object sender, EventArgs e) - { - DoUndo(); - } + private void UndotoolStripButton_Click(object sender, EventArgs e) + { + DoUndo(); + } private void SearchListView_QueryItemBkColor(int index, int column, ref Color color) { - if (IsAWeededList) - { - if (!weededList.Contains(searchList[index])) - { - color = Color.Pink; - if (Global.MainForm.Cheats1.IsActiveCheat(Domain, searchList[index].address)) - color = Color.Purple; - } - else if (Global.MainForm.Cheats1.IsActiveCheat(Domain, searchList[index].address)) - color = Color.LightCyan; - else - color = Color.White; - } + if (IsAWeededList) + { + if (!weededList.Contains(searchList[index])) + { + color = Color.Pink; + if (Global.MainForm.Cheats1.IsActiveCheat(Domain, searchList[index].address)) + color = Color.Purple; + } + else if (Global.MainForm.Cheats1.IsActiveCheat(Domain, searchList[index].address)) + color = Color.LightCyan; + else + color = Color.White; + } } private void SearchListView_QueryItemText(int index, int column, out string text) { text = ""; - if (column == 0) - { - text = searchList[index].address.ToString("X" + GetNumDigits(Domain.Size-1).ToString()); - } - if (column == 1) - { - if (searchList[index].signed == asigned.UNSIGNED) - text = searchList[index].value.ToString(); - else if (searchList[index].signed == asigned.SIGNED) - text = ((sbyte)searchList[index].value).ToString(); - else if (searchList[index].signed == asigned.HEX) - { - switch (searchList[index].type) - { - case atype.BYTE: - text = String.Format("{0:X2}", searchList[index].value); - break; - case atype.WORD: - text = String.Format("{0:X4}", searchList[index].value); - break; - case atype.DWORD: - text = String.Format("{0:X8}", searchList[index].value); - break; - } - } - } - if (column == 2) - { - if (searchList[index].signed == asigned.UNSIGNED) - { - if (Global.Config.RamSearchPreviousAs == 2) //If prev frame - text = searchList[index].prev.ToString(); - else - text = prevList[index].value.ToString(); - } - else if (searchList[index].signed == asigned.SIGNED) - { - if (Global.Config.RamSearchPreviousAs == 2) //If prev frame - text = ((sbyte)searchList[index].prev).ToString(); - else - text = ((sbyte)prevList[index].value).ToString(); - } - else if (searchList[index].signed == asigned.HEX) - { - if (Global.Config.RamSearchPreviousAs == 2) //If prev frame - { - switch (searchList[index].type) - { - case atype.BYTE: - text = String.Format("{0:X2}", searchList[index].prev); - break; - case atype.WORD: - text = String.Format("{0:X4}", searchList[index].prev); - break; - case atype.DWORD: - text = String.Format("{0:X8}", searchList[index].prev); - break; - } - } - else - { - switch (searchList[index].type) - { - case atype.BYTE: - text = String.Format("{0:X2}", prevList[index].value); - break; - case atype.WORD: - text = String.Format("{0:X4}", prevList[index].value); - break; - case atype.DWORD: - text = String.Format("{0:X8}", prevList[index].value); - break; - } - } - } - } - if (column == 3) - { - text = searchList[index].changecount.ToString(); - } + if (column == 0) + { + text = searchList[index].address.ToString("X" + GetNumDigits(Domain.Size - 1).ToString()); + } + if (column == 1) + { + if (searchList[index].signed == asigned.UNSIGNED) + text = searchList[index].value.ToString(); + else if (searchList[index].signed == asigned.SIGNED) + text = ((sbyte)searchList[index].value).ToString(); + else if (searchList[index].signed == asigned.HEX) + { + switch (searchList[index].type) + { + case atype.BYTE: + text = String.Format("{0:X2}", searchList[index].value); + break; + case atype.WORD: + text = String.Format("{0:X4}", searchList[index].value); + break; + case atype.DWORD: + text = String.Format("{0:X8}", searchList[index].value); + break; + } + } + } + if (column == 2) + { + if (searchList[index].signed == asigned.UNSIGNED) + { + if (Global.Config.RamSearchPreviousAs == 2) //If prev frame + text = searchList[index].prev.ToString(); + else + text = prevList[index].value.ToString(); + } + else if (searchList[index].signed == asigned.SIGNED) + { + if (Global.Config.RamSearchPreviousAs == 2) //If prev frame + text = ((sbyte)searchList[index].prev).ToString(); + else + text = ((sbyte)prevList[index].value).ToString(); + } + else if (searchList[index].signed == asigned.HEX) + { + if (Global.Config.RamSearchPreviousAs == 2) //If prev frame + { + switch (searchList[index].type) + { + case atype.BYTE: + text = String.Format("{0:X2}", searchList[index].prev); + break; + case atype.WORD: + text = String.Format("{0:X4}", searchList[index].prev); + break; + case atype.DWORD: + text = String.Format("{0:X8}", searchList[index].prev); + break; + } + } + else + { + switch (searchList[index].type) + { + case atype.BYTE: + text = String.Format("{0:X2}", prevList[index].value); + break; + case atype.WORD: + text = String.Format("{0:X4}", prevList[index].value); + break; + case atype.DWORD: + text = String.Format("{0:X8}", prevList[index].value); + break; + } + } + } + } + if (column == 3) + { + text = searchList[index].changecount.ToString(); + } } private void SearchListView_QueryItemIndent(int index, out int itemIndent) @@ -622,1409 +632,1425 @@ namespace BizHawk.MultiClient imageIndex = -1; } - private void ClearChangeCounts() - { - SaveUndo(); - for (int x = 0; x < searchList.Count; x++) - searchList[x].changecount = 0; - DisplaySearchList(); - OutputLabel.Text = "Change counts cleared"; - } - - private void ClearChangeCountstoolStripButton_Click(object sender, EventArgs e) - { - ClearChangeCounts(); - } - - private void UndotoolStripButton_Click_1(object sender, EventArgs e) - { - DoUndo(); - } - - private void ReplaceSearchListWithWeedOutList() - { - searchList = new List(weededList); - weededList.Clear(); - IsAWeededList = false; - } - - private void DoPreview() - { - if (Global.Config.RamSearchPreviewMode) - { - if (GenerateWeedOutList()) - { - DisplaySearchList(); - OutputLabel.Text = MakeAddressString(searchList.Count - weededList.Count) + " would be removed"; - } - } - } - - private void DoSearch() - { - if (GenerateWeedOutList()) - { - SaveUndo(); - OutputLabel.Text = MakeAddressString(searchList.Count - weededList.Count) + " removed"; - ReplaceSearchListWithWeedOutList(); - if (Global.Config.RamSearchPreviousAs != 1) MakePreviousList(); //1 = Original value - DisplaySearchList(); - } - else - OutputLabel.Text = "Search failed."; - } - - private void toolStripButton1_Click(object sender, EventArgs e) - { - DoSearch(); - } - - private SCompareTo GetCompareTo() - { - if (PreviousValueRadio.Checked) - return SCompareTo.PREV; - if (SpecificValueRadio.Checked) - return SCompareTo.VALUE; - if (SpecificAddressRadio.Checked) - return SCompareTo.ADDRESS; - if (NumberOfChangesRadio.Checked) - return SCompareTo.CHANGES; - - return SCompareTo.PREV; //Just in case - } - - private SOperator GetOperator() - { - if (LessThanRadio.Checked) - return SOperator.LESS; - if (GreaterThanRadio.Checked) - return SOperator.GREATER; - if (LessThanOrEqualToRadio.Checked) - return SOperator.LESSEQUAL; - if (GreaterThanOrEqualToRadio.Checked) - return SOperator.GREATEREQUAL; - if (EqualToRadio.Checked) - return SOperator.EQUAL; - if (NotEqualToRadio.Checked) - return SOperator.NOTEQUAL; - if (DifferentByRadio.Checked) - return SOperator.DIFFBY; - - return SOperator.LESS; //Just in case - } - - private bool GenerateWeedOutList() - { - //Switch based on user criteria - //Generate search list - //Use search list to generate a list of flagged address (for displaying pink) - IsAWeededList = true; - weededList.Clear(); - switch (GetCompareTo()) - { - case SCompareTo.PREV: - return DoPreviousValue(); - case SCompareTo.VALUE: - return DoSpecificValue(); - case SCompareTo.ADDRESS: - return DoSpecificAddress(); - case SCompareTo.CHANGES: - return DoNumberOfChanges(); - default: - return false; - } - } - - private int GetPreviousValue(int pos) - { - if (Global.Config.RamSearchPreviousAs == 2) //If Previous frame - return searchList[pos].prev; - else - return prevList[pos].value; - } - - private bool DoPreviousValue() - { - switch (GetOperator()) - { - case SOperator.LESS: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].value < GetPreviousValue(x)) - weededList.Add(searchList[x]); - } - break; - case SOperator.GREATER: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].value > GetPreviousValue(x)) - weededList.Add(searchList[x]); - } - break; - case SOperator.LESSEQUAL: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].value <= GetPreviousValue(x)) - weededList.Add(searchList[x]); - } - break; - case SOperator.GREATEREQUAL: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].value >= GetPreviousValue(x)) - weededList.Add(searchList[x]); - } - break; - case SOperator.EQUAL: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].value == GetPreviousValue(x)) - weededList.Add(searchList[x]); - } - break; - case SOperator.NOTEQUAL: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].value != GetPreviousValue(x)) - weededList.Add(searchList[x]); - } - break; - case SOperator.DIFFBY: - int diff = GetDifferentBy(); - if (diff < 0) return false; - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].value == GetPreviousValue(x) + diff || searchList[x].value == GetPreviousValue(x) - diff) - weededList.Add(searchList[x]); - } - break; - } - return true; - } - - private bool DoSpecificValue() - { - int value = GetSpecificValue(); - if (value < -99999999) - { - MessageBox.Show("Missing or invalid value", "Invalid value", MessageBoxButtons.OK, MessageBoxIcon.Error); - SpecificValueBox.Focus(); - SpecificValueBox.SelectAll(); - return false; - } - switch (GetOperator()) - { - case SOperator.LESS: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].value < value) - weededList.Add(searchList[x]); - } - break; - case SOperator.GREATER: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].value > value) - weededList.Add(searchList[x]); - } - break; - case SOperator.LESSEQUAL: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].value <= value) - weededList.Add(searchList[x]); - } - break; - case SOperator.GREATEREQUAL: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].value >= value) - weededList.Add(searchList[x]); - } - break; - case SOperator.EQUAL: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].value == value) - weededList.Add(searchList[x]); - } - break; - case SOperator.NOTEQUAL: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].value != value) - weededList.Add(searchList[x]); - } - break; - case SOperator.DIFFBY: - int diff = GetDifferentBy(); - if (diff < 0) return false; - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].value == value + diff || searchList[x].value == value - diff) - weededList.Add(searchList[x]); - } - break; - } - return true; - } - - private int GetSpecificValue() - { - if (SpecificValueBox.Text == "" || SpecificValueBox.Text == "-") return 0; - bool i = false; - switch (GetDataType()) - { - case asigned.UNSIGNED: - i = InputValidate.IsValidUnsignedNumber(SpecificValueBox.Text); - if (!i) return -99999999; - return (int)Int64.Parse(SpecificValueBox.Text); //Note: 64 to be safe since 4 byte values can be entered - case asigned.SIGNED: - i = InputValidate.IsValidSignedNumber(SpecificValueBox.Text); - if (!i) return -99999999; - return (int)Int64.Parse(SpecificValueBox.Text); - case asigned.HEX: - i = InputValidate.IsValidHexNumber(SpecificValueBox.Text); - if (!i) return -99999999; - return (int)Int64.Parse(SpecificValueBox.Text, NumberStyles.HexNumber); - } - return -99999999; //What are the odds someone wants to search for this value? - } - - private int GetSpecificAddress() - { - if (SpecificAddressBox.Text == "") return 0; - bool i = InputValidate.IsValidHexNumber(SpecificAddressBox.Text); - if (!i) return -1; - - return int.Parse(SpecificAddressBox.Text, NumberStyles.HexNumber); - } - - private int GetDifferentBy() - { - if (DifferentByBox.Text == "") return 0; - bool i = InputValidate.IsValidUnsignedNumber(DifferentByBox.Text); - if (!i) - { - MessageBox.Show("Missing or invalid Different By value", "Invalid value", MessageBoxButtons.OK, MessageBoxIcon.Error); - DifferentByBox.Focus(); - DifferentByBox.SelectAll(); - return -1; - } - else - return int.Parse(DifferentByBox.Text); - } - - private bool DoSpecificAddress() - { - int address = GetSpecificAddress(); - if (address < 0) - { - MessageBox.Show("Missing or invalid address", "Invalid address", MessageBoxButtons.OK, MessageBoxIcon.Error); - SpecificAddressBox.Focus(); - SpecificAddressBox.SelectAll(); - return false; - } - switch (GetOperator()) - { - case SOperator.LESS: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].address < address) - weededList.Add(searchList[x]); - } - break; - case SOperator.GREATER: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].address > address) - weededList.Add(searchList[x]); - } - break; - case SOperator.LESSEQUAL: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].address <= address) - weededList.Add(searchList[x]); - } - break; - case SOperator.GREATEREQUAL: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].address >= address) - weededList.Add(searchList[x]); - } - break; - case SOperator.EQUAL: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].address == address) - weededList.Add(searchList[x]); - } - break; - case SOperator.NOTEQUAL: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].address != address) - weededList.Add(searchList[x]); - } - break; - case SOperator.DIFFBY: - { - int diff = GetDifferentBy(); - if (diff < 0) return false; - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].address == address + diff || searchList[x].address == address - diff) - weededList.Add(searchList[x]); - } - } - break; - } - return true; - } - - private int GetSpecificChanges() - { - if (NumberOfChangesBox.Text == "") return 0; - bool i = InputValidate.IsValidUnsignedNumber(NumberOfChangesBox.Text); - if (!i) return -1; - - return int.Parse(NumberOfChangesBox.Text); - } - - private bool DoNumberOfChanges() - { - int changes = GetSpecificChanges(); - if (changes < 0) - { - MessageBox.Show("Missing or invalid number of changes", "Invalid number", MessageBoxButtons.OK, MessageBoxIcon.Error); - NumberOfChangesBox.Focus(); - NumberOfChangesBox.SelectAll(); - return false; - } - switch (GetOperator()) - { - case SOperator.LESS: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].changecount < changes) - weededList.Add(searchList[x]); - } - break; - case SOperator.GREATER: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].changecount > changes) - weededList.Add(searchList[x]); - } - break; - case SOperator.LESSEQUAL: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].changecount <= changes) - weededList.Add(searchList[x]); - } - break; - case SOperator.GREATEREQUAL: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].changecount >= changes) - weededList.Add(searchList[x]); - } - break; - case SOperator.EQUAL: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].changecount == changes) - weededList.Add(searchList[x]); - } - break; - case SOperator.NOTEQUAL: - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].changecount != changes) - weededList.Add(searchList[x]); - } - break; - case SOperator.DIFFBY: - int diff = GetDifferentBy(); - if (diff < 0) return false; - for (int x = 0; x < searchList.Count; x++) - { - if (searchList[x].address == changes + diff || searchList[x].address == changes - diff) - weededList.Add(searchList[x]); - } - break; - } - return true; - } - - private void ConvertListDataType(asigned s) - { - for (int x = 0; x < searchList.Count; x++) - searchList[x].signed = s; - } - - private void signedToolStripMenuItem_Click(object sender, EventArgs e) - { - unsignedToolStripMenuItem.Checked = false; - signedToolStripMenuItem.Checked = true; - hexadecimalToolStripMenuItem.Checked = false; - ConvertListDataType(asigned.SIGNED); - SetSpecificValueBoxMaxLength(); - DisplaySearchList(); - } - - private void unsignedToolStripMenuItem_Click(object sender, EventArgs e) - { - unsignedToolStripMenuItem.Checked = true; - signedToolStripMenuItem.Checked = false; - hexadecimalToolStripMenuItem.Checked = false; - ConvertListDataType(asigned.UNSIGNED); - SetSpecificValueBoxMaxLength(); - DisplaySearchList(); - } - - private void hexadecimalToolStripMenuItem_Click(object sender, EventArgs e) - { - unsignedToolStripMenuItem.Checked = false; - signedToolStripMenuItem.Checked = false; - hexadecimalToolStripMenuItem.Checked = true; - ConvertListDataType(asigned.HEX); - SetSpecificValueBoxMaxLength(); - DisplaySearchList(); - } - - private void SearchListView_MouseDoubleClick(object sender, MouseEventArgs e) - { - ListView.SelectedIndexCollection indexes = SearchListView.SelectedIndices; - if (indexes.Count > 0) - { - AddToRamWatch(); - } - } - - private void SetSpecificValueBoxMaxLength() - { - switch (GetDataType()) - { - case asigned.UNSIGNED: - switch (GetDataSize()) - { - case atype.BYTE: - SpecificValueBox.MaxLength = 3; - break; - case atype.WORD: - SpecificValueBox.MaxLength = 5; - break; - case atype.DWORD: - SpecificValueBox.MaxLength = 10; - break; - default: - SpecificValueBox.MaxLength = 10; - break; - } - break; - case asigned.SIGNED: - switch (GetDataSize()) - { - case atype.BYTE: - SpecificValueBox.MaxLength = 4; - break; - case atype.WORD: - SpecificValueBox.MaxLength = 6; - break; - case atype.DWORD: - SpecificValueBox.MaxLength = 11; - break; - default: - SpecificValueBox.MaxLength = 11; - break; - } - break; - case asigned.HEX: - switch (GetDataSize()) - { - case atype.BYTE: - SpecificValueBox.MaxLength = 2; - break; - case atype.WORD: - SpecificValueBox.MaxLength = 4; - break; - case atype.DWORD: - SpecificValueBox.MaxLength = 8; - break; - default: - SpecificValueBox.MaxLength = 8; - break; - } - break; - default: - SpecificValueBox.MaxLength = 11; - break; - } - } - - private void byteToolStripMenuItem_Click(object sender, EventArgs e) - { - byteToolStripMenuItem.Checked = true; - bytesToolStripMenuItem.Checked = false; - dWordToolStripMenuItem1.Checked = false; - SetSpecificValueBoxMaxLength(); - } - - private void bytesToolStripMenuItem_Click(object sender, EventArgs e) - { - byteToolStripMenuItem.Checked = false; - bytesToolStripMenuItem.Checked = true; - dWordToolStripMenuItem1.Checked = false; - SetSpecificValueBoxMaxLength(); - } - - private void dWordToolStripMenuItem1_Click(object sender, EventArgs e) - { - byteToolStripMenuItem.Checked = false; - bytesToolStripMenuItem.Checked = false; - dWordToolStripMenuItem1.Checked = true; - SetSpecificValueBoxMaxLength(); - } - - private void bigEndianToolStripMenuItem_Click(object sender, EventArgs e) - { - bigEndianToolStripMenuItem.Checked = true; - littleEndianToolStripMenuItem.Checked = false; - } - - private void littleEndianToolStripMenuItem_Click(object sender, EventArgs e) - { - bigEndianToolStripMenuItem.Checked = false; - littleEndianToolStripMenuItem.Checked = true; - } - - private void AutoSearchCheckBox_CheckedChanged(object sender, EventArgs e) - { - if (AutoSearchCheckBox.Checked) - AutoSearchCheckBox.BackColor = Color.Pink; - else - AutoSearchCheckBox.BackColor = this.BackColor; - } - - private void SpecificValueBox_Leave(object sender, EventArgs e) - { - DoPreview(); - } - - private void SpecificAddressBox_Leave(object sender, EventArgs e) - { - DoPreview(); - } - - private void NumberOfChangesBox_Leave(object sender, EventArgs e) - { - DoPreview(); - } - - private void DifferentByBox_Leave(object sender, EventArgs e) - { - if (!InputValidate.IsValidUnsignedNumber(DifferentByBox.Text)) //Actually the only way this could happen is from putting dashes after the first character - { - DifferentByBox.Focus(); - DifferentByBox.SelectAll(); - ToolTip t = new ToolTip(); - t.Show("Must be a valid unsigned decimal value", DifferentByBox, 5000); - return; - } - DoPreview(); - } - - private bool SaveSearchFile(string path) - { - var file = new FileInfo(path); - - using (StreamWriter sw = new StreamWriter(path)) - { - string str = "Domain " + Domain.Name + "\n"; - - for (int x = 0; x < searchList.Count; x++) - { - str += string.Format("{0:X4}", searchList[x].address) + "\t"; - str += searchList[x].GetTypeByChar().ToString() + "\t"; - str += searchList[x].GetSignedByChar().ToString() + "\t"; - - if (searchList[x].bigendian == true) - str += "1\t"; - else - str += "0\t"; - - str += searchList[x].notes + "\n"; - } - - sw.WriteLine(str); - } - return true; - } - - private FileInfo GetSaveFileFromUser() - { - var sfd = new SaveFileDialog(); - if (currentSearchFile.Length > 0) - { - sfd.FileName = Path.GetFileNameWithoutExtension(currentSearchFile); - sfd.InitialDirectory = Path.GetDirectoryName(currentSearchFile); - } - else if (!(Global.Emulator is NullEmulator)) - { - sfd.FileName = Global.Game.FilesystemSafeName; - sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.WatchPath, ""); - } - else - { - sfd.FileName = "NULL"; - sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.WatchPath, ""); - } - sfd.Filter = "Watch Files (*.wch)|*.wch|All Files|*.*"; - sfd.RestoreDirectory = true; - Global.Sound.StopSound(); - var result = sfd.ShowDialog(); - Global.Sound.StartSound(); - if (result != DialogResult.OK) - return null; - var file = new FileInfo(sfd.FileName); - return file; - } - - public void SaveAs() - { - var file = GetSaveFileFromUser(); - if (file != null) - { - SaveSearchFile(file.FullName); - currentSearchFile = file.FullName; - OutputLabel.Text = Path.GetFileName(currentSearchFile) + " saved."; - } - } - - private void LoadSearchFromRecent(string file) - { - bool r = LoadSearchFile(file, false, false, searchList); - if (!r) - { - DialogResult result = MessageBox.Show("Could not open " + file + "\nRemove from list?", "File not found", MessageBoxButtons.YesNo, MessageBoxIcon.Error); - if (result == DialogResult.Yes) - Global.Config.RecentSearches.Remove(file); - } - DisplaySearchList(); - } - - public int HowMany(string str, char c) - { - int count = 0; - for (int x = 0; x < str.Length; x++) - { - if (str[x] == c) - count++; - } - return count; - } - - private int GetDomainPos(string name) - { - //Attempts to find the memory domain by name, if it fails, it defaults to index 0 - for (int x = 0; x < Global.Emulator.MemoryDomains.Count; x++) - { - if (Global.Emulator.MemoryDomains[x].Name == name) - return x; - } - return 0; - } - - bool LoadSearchFile(string path, bool append, bool truncate, List list) - { - int y, z; - var file = new FileInfo(path); - if (file.Exists == false) return false; - - using (StreamReader sr = file.OpenText()) - { - if (!append && !truncate) - currentSearchFile = path; - - int count = 0; - string s = ""; - string temp = ""; - - if (!append) - list.Clear(); //Wipe existing list and read from file - - while ((s = sr.ReadLine()) != null) - { - //parse each line and add to watchList - - //.wch files from other emulators start with a number representing the number of watch, that line can be discarded here - //Any properly formatted line couldn't possibly be this short anyway, this also takes care of any garbage lines that might be in a file - if (s.Length < 5) continue; - - if (s.Substring(0, 6) == "Domain") - SetMemoryDomain(GetDomainPos(s.Substring(7, s.Length - 7))); - - z = HowMany(s, '\t'); - if (z == 5) - { - //If 5, then this is a .wch file format made from another emulator, the first column (watch position) is not needed here - y = s.IndexOf('\t') + 1; - s = s.Substring(y, s.Length - y); //5 digit value representing the watch position number - } - else if (z != 4) - continue; //If not 4, something is wrong with this line, ignore it - count++; - Watch w = new Watch(); - - temp = s.Substring(0, s.IndexOf('\t')); - w.address = int.Parse(temp, NumberStyles.HexNumber); - - y = s.IndexOf('\t') + 1; - s = s.Substring(y, s.Length - y); //Type - w.SetTypeByChar(s[0]); - - y = s.IndexOf('\t') + 1; - s = s.Substring(y, s.Length - y); //Signed - w.SetSignedByChar(s[0]); - - y = s.IndexOf('\t') + 1; - s = s.Substring(y, s.Length - y); //Endian - y = Int16.Parse(s[0].ToString()); - if (y == 0) - w.bigendian = false; - else - w.bigendian = true; - - //w.notes = s.Substring(2, s.Length - 2); //User notes - - list.Add(w); - } - - if (!append && !truncate) - { - Global.Config.RecentSearches.Add(file.FullName); - OutputLabel.Text = Path.GetFileName(file.FullName); - //Update the number of watches - SetTotal(); - } - } - - return true; - } - - private void recentToolStripMenuItem_DropDownOpened(object sender, EventArgs e) - { - //Clear out recent Roms list - //repopulate it with an up to date list - recentToolStripMenuItem.DropDownItems.Clear(); - - if (Global.Config.RecentSearches.IsEmpty()) - { - var none = new ToolStripMenuItem(); - none.Enabled = false; - none.Text = "None"; - recentToolStripMenuItem.DropDownItems.Add(none); - } - else - { - for (int x = 0; x < Global.Config.RecentSearches.Length(); x++) - { - string path = Global.Config.RecentSearches.GetRecentFileByPosition(x); - var item = new ToolStripMenuItem(); - item.Text = path; - item.Click += (o, ev) => LoadSearchFromRecent(path); - recentToolStripMenuItem.DropDownItems.Add(item); - } - } - - recentToolStripMenuItem.DropDownItems.Add("-"); - - var clearitem = new ToolStripMenuItem(); - clearitem.Text = "&Clear"; - clearitem.Click += (o, ev) => Global.Config.RecentSearches.Clear(); - recentToolStripMenuItem.DropDownItems.Add(clearitem); - - var auto = new ToolStripMenuItem(); - auto.Text = "&Auto-Load"; - auto.Click += (o, ev) => UpdateAutoLoadRamSearch(); - if (Global.Config.AutoLoadRamSearch == true) - auto.Checked = true; - else - auto.Checked = false; - recentToolStripMenuItem.DropDownItems.Add(auto); - } - - private void UpdateAutoLoadRamSearch() - { - autoLoadToolStripMenuItem.Checked = Global.Config.AutoLoadRamSearch ^= true; - } - - private void appendFileToolStripMenuItem_Click(object sender, EventArgs e) - { - var file = GetFileFromUser(); - if (file != null) - LoadSearchFile(file.FullName, true, false, searchList); - DisplaySearchList(); - } - - private FileInfo GetFileFromUser() - { - var ofd = new OpenFileDialog(); - if (currentSearchFile.Length > 0) - ofd.FileName = Path.GetFileNameWithoutExtension(currentSearchFile); - ofd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.WatchPath, ""); - ofd.Filter = "Watch Files (*.wch)|*.wch|All Files|*.*"; - ofd.RestoreDirectory = true; - if (currentSearchFile.Length > 0) - ofd.FileName = Path.GetFileNameWithoutExtension(currentSearchFile); - Global.Sound.StopSound(); - var result = ofd.ShowDialog(); - Global.Sound.StartSound(); - if (result != DialogResult.OK) - return null; - var file = new FileInfo(ofd.FileName); - return file; - } - - private void includeMisalignedToolStripMenuItem_Click(object sender, EventArgs e) - { - includeMisalignedToolStripMenuItem.Checked ^= true; - } - - private void saveWindowPositionToolStripMenuItem_Click(object sender, EventArgs e) - { - Global.Config.RamSearchSaveWindowPosition ^= true; - } - - private void optionsToolStripMenuItem_DropDownOpened(object sender, EventArgs e) - { - saveWindowPositionToolStripMenuItem.Checked = Global.Config.RamSearchSaveWindowPosition; - previewModeToolStripMenuItem.Checked = Global.Config.RamSearchPreviewMode; - alwaysExludeRamSearchListToolStripMenuItem.Checked = Global.Config.AlwaysExludeRamWatch; - } - - private void searchToolStripMenuItem1_Click(object sender, EventArgs e) - { - DoSearch(); - } - - private void clearChangeCountsToolStripMenuItem_Click(object sender, EventArgs e) - { - ClearChangeCounts(); - } - - private void undoToolStripMenuItem_Click_1(object sender, EventArgs e) - { - DoUndo(); - } - - private void removeSelectedToolStripMenuItem_Click(object sender, EventArgs e) - { - RemoveAddresses(); - } - - private void saveToolStripMenuItem_Click(object sender, EventArgs e) - { - if (string.Compare(currentSearchFile, "") == 0) SaveAs(); - SaveSearchFile(currentSearchFile); - } - - private void addSelectedToRamWatchToolStripMenuItem_Click(object sender, EventArgs e) - { - AddToRamWatch(); - } - - private void pokeAddressToolStripMenuItem_Click(object sender, EventArgs e) - { - PokeAddress(); - } - - private void searchToolStripMenuItem_DropDownOpened(object sender, EventArgs e) - { - if (searchList.Count == 0) - searchToolStripMenuItem.Enabled = false; - else - searchToolStripMenuItem.Enabled = true; - - if (undoList.Count == 0) - undoToolStripMenuItem.Enabled = false; - else - undoToolStripMenuItem.Enabled = true; - - ListView.SelectedIndexCollection indexes = SearchListView.SelectedIndices; - - if (indexes.Count == 0) - { - removeSelectedToolStripMenuItem.Enabled = false; - addSelectedToRamWatchToolStripMenuItem.Enabled = false; - pokeAddressToolStripMenuItem.Enabled = false; - } - else - { - removeSelectedToolStripMenuItem.Enabled = true; - addSelectedToRamWatchToolStripMenuItem.Enabled = true; - pokeAddressToolStripMenuItem.Enabled = true; - } - } - - private void sinceLastSearchToolStripMenuItem_Click(object sender, EventArgs e) - { - Global.Config.RamSearchPreviousAs = 0; - } - - private void sinceLastFrameToolStripMenuItem_Click(object sender, EventArgs e) - { - Global.Config.RamSearchPreviousAs = 2; - } - - private void originalValueToolStripMenuItem_Click(object sender, EventArgs e) - { - Global.Config.RamSearchPreviousAs = 1; - } - - private void definePreviousValueToolStripMenuItem_DropDownOpened(object sender, EventArgs e) - { - switch (Global.Config.RamSearchPreviousAs) - { - case 0: //Since last Search - sinceLastSearchToolStripMenuItem.Checked = true; - originalValueToolStripMenuItem.Checked = false; - sinceLastFrameToolStripMenuItem.Checked = false; - break; - case 1: //Original value (since Start new search) - sinceLastSearchToolStripMenuItem.Checked = false; - originalValueToolStripMenuItem.Checked = true; - sinceLastFrameToolStripMenuItem.Checked = false; - break; - case 2: //Since last Frame - sinceLastSearchToolStripMenuItem.Checked = false; - originalValueToolStripMenuItem.Checked = false; - sinceLastFrameToolStripMenuItem.Checked = true; - break; - default://Default to last search - sinceLastSearchToolStripMenuItem.Checked = true; - originalValueToolStripMenuItem.Checked = false; - sinceLastFrameToolStripMenuItem.Checked = false; - break; - } - } - - private void LessThanRadio_CheckedChanged(object sender, EventArgs e) - { - if (!DifferentByRadio.Checked) DoPreview(); - } - - private void previewModeToolStripMenuItem_Click(object sender, EventArgs e) - { - Global.Config.RamSearchPreviewMode ^= true; - } - - private void SpecificValueBox_TextChanged(object sender, EventArgs e) - { - DoPreview(); - } - - private void SpecificValueBox_KeyPress(object sender, KeyPressEventArgs e) - { - if (e.KeyChar == '\b') return; - - switch (GetDataType()) - { - case asigned.UNSIGNED: - if (!InputValidate.IsValidUnsignedNumber(e.KeyChar)) - e.Handled = true; - break; - case asigned.SIGNED: - if (!InputValidate.IsValidSignedNumber(e.KeyChar)) - e.Handled = true; - break; - case asigned.HEX: - if (!InputValidate.IsValidHexNumber(e.KeyChar)) - e.Handled = true; - break; - } - } - - private void SpecificAddressBox_KeyPress(object sender, KeyPressEventArgs e) - { - if (e.KeyChar == '\b') return; - - if (!InputValidate.IsValidHexNumber(e.KeyChar)) - e.Handled = true; - } - - private void NumberOfChangesBox_KeyPress(object sender, KeyPressEventArgs e) - { - if (e.KeyChar == '\b') return; - - if (!InputValidate.IsValidUnsignedNumber(e.KeyChar)) - e.Handled = true; - } - - private void DifferentByBox_KeyPress(object sender, KeyPressEventArgs e) - { - if (e.KeyChar == '\b') return; - - if (!InputValidate.IsValidUnsignedNumber(e.KeyChar)) - e.Handled = true; - } - - private void SpecificAddressBox_TextChanged(object sender, EventArgs e) - { - DoPreview(); - } - - private void NumberOfChangesBox_TextChanged(object sender, EventArgs e) - { - DoPreview(); - } - - private void DifferentByBox_TextChanged(object sender, EventArgs e) - { - DoPreview(); - } - - private void TruncateFromFileToolStripMenuItem_Click(object sender, EventArgs e) - { - TruncateFromFile(); - } - - private void DoTruncate(List temp) - { - weededList.Clear(); - bool found = false; - for (int x = 0; x < searchList.Count; x++) - { - found = false; - for (int y = 0; y < temp.Count; y++) - { - if (searchList[x].address == temp[y].address) - { - found = true; - break; - } - - } - if (!found) - weededList.Add(searchList[x]); - } - SaveUndo(); - OutputLabel.Text = MakeAddressString(searchList.Count - weededList.Count) + " removed"; - ReplaceSearchListWithWeedOutList(); - if (Global.Config.RamSearchPreviousAs != 1) MakePreviousList(); //1 = Original value - DisplaySearchList(); - } - - private void TruncateFromFile() - { - //TODO: what about byte size? Think about the implications of this - var file = GetFileFromUser(); - if (file != null) - { - List temp = new List(); - LoadSearchFile(file.FullName, false, true, temp); - DoTruncate(temp); - } - } - - /// - /// Removes Ram Watch list from the search list - /// - private void ExludeRamWatchList() - { - DoTruncate(Global.MainForm.RamWatch1.GetRamWatchList()); - } - - private void TruncateFromFiletoolStripButton2_Click(object sender, EventArgs e) - { - TruncateFromFile(); - } - - private void exludeRamWatchListToolStripMenuItem_Click(object sender, EventArgs e) - { - ExludeRamWatchList(); - } - - private void ExcludeRamWatchtoolStripButton2_Click(object sender, EventArgs e) - { - ExludeRamWatchList(); - } - - private void alwaysExludeRamSearchListToolStripMenuItem_Click(object sender, EventArgs e) - { - Global.Config.AlwaysExludeRamWatch ^= true; - } - - private void CopyValueToPrev() - { - for (int x = 0; x < searchList.Count; x++) - { - prevList[x].value = searchList[x].value; - searchList[x].prev = searchList[x].value; - } - DisplaySearchList(); - DoPreview(); - } - - private void SetCurrToPrevtoolStripButton2_Click(object sender, EventArgs e) - { - CopyValueToPrev(); - } - - private void copyValueToPrevToolStripMenuItem_Click(object sender, EventArgs e) - { - CopyValueToPrev(); - } - - private void startNewSearchToolStripMenuItem_Click(object sender, EventArgs e) - { - StartNewSearch(); - } - - private void searchToolStripMenuItem2_Click(object sender, EventArgs e) - { - DoSearch(); - } - - private int GetNumDigits(Int32 i) - { - //if (i == 0) return 0; - //if (i < 0x10) return 1; - //if (i < 0x100) return 2; - //if (i < 0x1000) return 3; //adelikat: commenting these out because I decided that regardless of domain, 4 digits should be the minimum - if (i < 0x10000) return 4; - if (i < 0x100000) return 5; - if (i < 0x1000000) return 6; - if (i < 0x10000000) return 7; - else return 8; - } - - private void FreezeAddressToolStrip_Click(object sender, EventArgs e) - { - FreezeAddress(); - } - - private void FreezeAddress() - { - ListView.SelectedIndexCollection indexes = SearchListView.SelectedIndices; - if (indexes.Count > 0) - { - switch (searchList[indexes[0]].type) - { - case atype.BYTE: - Cheat c = new Cheat("", searchList[indexes[0]].address, (byte)searchList[indexes[0]].value, - true, Domain); - Global.MainForm.Cheats1.AddCheat(c); - break; - case atype.WORD: - { - byte low = (byte)(searchList[indexes[0]].value / 256); - byte high = (byte)(searchList[indexes[0]].value); - int a1 = searchList[indexes[0]].address; - int a2 = searchList[indexes[0]].address + 1; - if (searchList[indexes[0]].bigendian) - { - Cheat c1 = new Cheat("", a1, low, true, Domain); - Cheat c2 = new Cheat("", a2, high, true, Domain); - Global.MainForm.Cheats1.AddCheat(c1); - Global.MainForm.Cheats1.AddCheat(c2); - } - else - { - Cheat c1 = new Cheat("", a1, high, true, Domain); - Cheat c2 = new Cheat("", a2, low, true, Domain); - Global.MainForm.Cheats1.AddCheat(c1); - Global.MainForm.Cheats1.AddCheat(c2); - } - } - break; - case atype.DWORD: - { - byte HIWORDhigh = (byte)(searchList[indexes[0]].value / 0x1000000); - byte HIWORDlow = (byte)(searchList[indexes[0]].value / 0x10000); - byte LOWORDhigh = (byte)(searchList[indexes[0]].value / 0x100); - byte LOWORDlow = (byte)(searchList[indexes[0]].value); - int a1 = searchList[indexes[0]].address; - int a2 = searchList[indexes[0]].address + 1; - int a3 = searchList[indexes[0]].address + 2; - int a4 = searchList[indexes[0]].address + 3; - if (searchList[indexes[0]].bigendian) - { - Cheat c1 = new Cheat("", a1, HIWORDhigh, true, Domain); - Cheat c2 = new Cheat("", a2, HIWORDlow, true, Domain); - Cheat c3 = new Cheat("", a3, LOWORDhigh, true, Domain); - Cheat c4 = new Cheat("", a4, LOWORDlow, true, Domain); - Global.MainForm.Cheats1.AddCheat(c1); - Global.MainForm.Cheats1.AddCheat(c2); - Global.MainForm.Cheats1.AddCheat(c3); - Global.MainForm.Cheats1.AddCheat(c4); - } - else - { - Cheat c1 = new Cheat("", a1, LOWORDlow, true, Domain); - Cheat c2 = new Cheat("", a2, LOWORDhigh, true, Domain); - Cheat c3 = new Cheat("", a3, HIWORDlow, true, Domain); - Cheat c4 = new Cheat("", a4, HIWORDhigh, true, Domain); - Global.MainForm.Cheats1.AddCheat(c1); - Global.MainForm.Cheats1.AddCheat(c2); - Global.MainForm.Cheats1.AddCheat(c3); - Global.MainForm.Cheats1.AddCheat(c4); - } - } - break; - } - } - } - - private void freezeAddressToolStripMenuItem_Click(object sender, EventArgs e) - { - FreezeAddress(); - } - - private void contextMenuStrip1_Opening(object sender, CancelEventArgs e) - { - ListView.SelectedIndexCollection indexes = SearchListView.SelectedIndices; - if (indexes.Count == 0) - { - contextMenuStrip1.Items[3].Visible = false; - contextMenuStrip1.Items[4].Visible = false; - contextMenuStrip1.Items[5].Visible = false; - contextMenuStrip1.Items[6].Visible = false; - } - else - { - for (int x = 0; x < contextMenuStrip1.Items.Count; x++) - contextMenuStrip1.Items[x].Visible = true; - } - } - - private void removeSelectedToolStripMenuItem1_Click(object sender, EventArgs e) - { - RemoveAddresses(); - } - - private void addToRamWatchToolStripMenuItem_Click(object sender, EventArgs e) - { - AddToRamWatch(); - } - - private void pokeAddressToolStripMenuItem1_Click(object sender, EventArgs e) - { - PokeAddress(); - } - - private void freezeAddressToolStripMenuItem1_Click(object sender, EventArgs e) - { - FreezeAddress(); - } - - private void CheckDomainMenuItems() - { - for (int x = 0; x < domainMenuItems.Count; x++) - { - if (Domain.Name == domainMenuItems[x].Text) - domainMenuItems[x].Checked = true; - else - domainMenuItems[x].Checked = false; - } - } - - private void memoryDomainsToolStripMenuItem_DropDownOpened(object sender, EventArgs e) - { - CheckDomainMenuItems(); - } - - private void SearchListView_ColumnReordered(object sender, ColumnReorderedEventArgs e) - { - ColumnHeader header = e.Header; - - int lowIndex = 0; - int highIndex = 0; - int changeIndex = 0; - if (e.NewDisplayIndex > e.OldDisplayIndex) - { - changeIndex = -1; - highIndex = e.NewDisplayIndex; - lowIndex = e.OldDisplayIndex; - } - else - { - changeIndex = 1; - highIndex = e.OldDisplayIndex; - lowIndex = e.NewDisplayIndex; - } - - if (Global.Config.RamSearchAddressIndex >= lowIndex && Global.Config.RamSearchAddressIndex <= highIndex) - Global.Config.RamSearchAddressIndex += changeIndex; - if (Global.Config.RamSearchValueIndex >= lowIndex && Global.Config.RamSearchValueIndex <= highIndex) - Global.Config.RamSearchValueIndex += changeIndex; - if (Global.Config.RamSearchPrevIndex >= lowIndex && Global.Config.RamSearchPrevIndex <= highIndex) - Global.Config.RamSearchPrevIndex += changeIndex; - if (Global.Config.RamSearchChangesIndex >= lowIndex && Global.Config.RamSearchChangesIndex <= highIndex) - Global.Config.RamSearchChangesIndex += changeIndex; - - if (header.Text == "Address") - Global.Config.RamSearchAddressIndex = e.NewDisplayIndex; - else if (header.Text == "Value") - Global.Config.RamSearchValueIndex = e.NewDisplayIndex; - else if (header.Text == "Prev") - Global.Config.RamSearchPrevIndex = e.NewDisplayIndex; - else if (header.Text == "Changes") - Global.Config.RamSearchChangesIndex = e.NewDisplayIndex; - } - - private void ColumnPositionSet() - { - List columnHeaders = new List(); - int i = 0; - for (i = 0; i < SearchListView.Columns.Count; i++) - columnHeaders.Add(SearchListView.Columns[i]); - - SearchListView.Columns.Clear(); - - i = 0; - do - { - string column = ""; - if (Global.Config.RamSearchAddressIndex == i) - column = "Address"; - else if (Global.Config.RamSearchValueIndex == i) - column = "Value"; - else if (Global.Config.RamSearchPrevIndex == i) - column = "Prev"; - else if (Global.Config.RamSearchChangesIndex == i) - column = "Changes"; - - for (int k = 0; k < columnHeaders.Count(); k++) - { - if (columnHeaders[k].Text == column) - { - SearchListView.Columns.Add(columnHeaders[k]); - columnHeaders.Remove(columnHeaders[k]); - break; - } - } - i++; - } while (columnHeaders.Count() > 0); - } - - private void RamSearch_DragEnter(object sender, DragEventArgs e) - { - e.Effect = e.Data.GetDataPresent(DataFormats.FileDrop) ? DragDropEffects.Copy : DragDropEffects.None; string[] filePaths = (string[])e.Data.GetData(DataFormats.FileDrop); - } - - private void RamSearch_DragDrop(object sender, DragEventArgs e) - { - string[] filePaths = (string[])e.Data.GetData(DataFormats.FileDrop); - if (Path.GetExtension(filePaths[0]) == (".wch")) - { - LoadSearchFile(filePaths[0], false, false, searchList); - DisplaySearchList(); - } - } - } + private void ClearChangeCounts() + { + SaveUndo(); + for (int x = 0; x < searchList.Count; x++) + searchList[x].changecount = 0; + DisplaySearchList(); + OutputLabel.Text = "Change counts cleared"; + } + + private void ClearChangeCountstoolStripButton_Click(object sender, EventArgs e) + { + ClearChangeCounts(); + } + + private void UndotoolStripButton_Click_1(object sender, EventArgs e) + { + DoUndo(); + } + + private void ReplaceSearchListWithWeedOutList() + { + searchList = new List(weededList); + weededList.Clear(); + IsAWeededList = false; + } + + private void DoPreview() + { + if (Global.Config.RamSearchPreviewMode) + { + if (GenerateWeedOutList()) + { + DisplaySearchList(); + OutputLabel.Text = MakeAddressString(searchList.Count - weededList.Count) + " would be removed"; + } + } + } + + private void DoSearch() + { + if (GenerateWeedOutList()) + { + SaveUndo(); + OutputLabel.Text = MakeAddressString(searchList.Count - weededList.Count) + " removed"; + ReplaceSearchListWithWeedOutList(); + if (Global.Config.RamSearchPreviousAs != 1) MakePreviousList(); //1 = Original value + DisplaySearchList(); + } + else + OutputLabel.Text = "Search failed."; + } + + private void toolStripButton1_Click(object sender, EventArgs e) + { + DoSearch(); + } + + private SCompareTo GetCompareTo() + { + if (PreviousValueRadio.Checked) + return SCompareTo.PREV; + if (SpecificValueRadio.Checked) + return SCompareTo.VALUE; + if (SpecificAddressRadio.Checked) + return SCompareTo.ADDRESS; + if (NumberOfChangesRadio.Checked) + return SCompareTo.CHANGES; + + return SCompareTo.PREV; //Just in case + } + + private SOperator GetOperator() + { + if (LessThanRadio.Checked) + return SOperator.LESS; + if (GreaterThanRadio.Checked) + return SOperator.GREATER; + if (LessThanOrEqualToRadio.Checked) + return SOperator.LESSEQUAL; + if (GreaterThanOrEqualToRadio.Checked) + return SOperator.GREATEREQUAL; + if (EqualToRadio.Checked) + return SOperator.EQUAL; + if (NotEqualToRadio.Checked) + return SOperator.NOTEQUAL; + if (DifferentByRadio.Checked) + return SOperator.DIFFBY; + + return SOperator.LESS; //Just in case + } + + private bool GenerateWeedOutList() + { + //Switch based on user criteria + //Generate search list + //Use search list to generate a list of flagged address (for displaying pink) + IsAWeededList = true; + weededList.Clear(); + switch (GetCompareTo()) + { + case SCompareTo.PREV: + return DoPreviousValue(); + case SCompareTo.VALUE: + return DoSpecificValue(); + case SCompareTo.ADDRESS: + return DoSpecificAddress(); + case SCompareTo.CHANGES: + return DoNumberOfChanges(); + default: + return false; + } + } + + private int GetPreviousValue(int pos) + { + if (Global.Config.RamSearchPreviousAs == 2) //If Previous frame + return searchList[pos].prev; + else + return prevList[pos].value; + } + + private bool DoPreviousValue() + { + switch (GetOperator()) + { + case SOperator.LESS: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].value < GetPreviousValue(x)) + weededList.Add(searchList[x]); + } + break; + case SOperator.GREATER: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].value > GetPreviousValue(x)) + weededList.Add(searchList[x]); + } + break; + case SOperator.LESSEQUAL: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].value <= GetPreviousValue(x)) + weededList.Add(searchList[x]); + } + break; + case SOperator.GREATEREQUAL: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].value >= GetPreviousValue(x)) + weededList.Add(searchList[x]); + } + break; + case SOperator.EQUAL: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].value == GetPreviousValue(x)) + weededList.Add(searchList[x]); + } + break; + case SOperator.NOTEQUAL: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].value != GetPreviousValue(x)) + weededList.Add(searchList[x]); + } + break; + case SOperator.DIFFBY: + int diff = GetDifferentBy(); + if (diff < 0) return false; + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].value == GetPreviousValue(x) + diff || searchList[x].value == GetPreviousValue(x) - diff) + weededList.Add(searchList[x]); + } + break; + } + return true; + } + + private bool DoSpecificValue() + { + int value = GetSpecificValue(); + if (value < -99999999) + { + MessageBox.Show("Missing or invalid value", "Invalid value", MessageBoxButtons.OK, MessageBoxIcon.Error); + SpecificValueBox.Focus(); + SpecificValueBox.SelectAll(); + return false; + } + switch (GetOperator()) + { + case SOperator.LESS: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].value < value) + weededList.Add(searchList[x]); + } + break; + case SOperator.GREATER: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].value > value) + weededList.Add(searchList[x]); + } + break; + case SOperator.LESSEQUAL: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].value <= value) + weededList.Add(searchList[x]); + } + break; + case SOperator.GREATEREQUAL: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].value >= value) + weededList.Add(searchList[x]); + } + break; + case SOperator.EQUAL: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].value == value) + weededList.Add(searchList[x]); + } + break; + case SOperator.NOTEQUAL: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].value != value) + weededList.Add(searchList[x]); + } + break; + case SOperator.DIFFBY: + int diff = GetDifferentBy(); + if (diff < 0) return false; + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].value == value + diff || searchList[x].value == value - diff) + weededList.Add(searchList[x]); + } + break; + } + return true; + } + + private int GetSpecificValue() + { + if (SpecificValueBox.Text == "" || SpecificValueBox.Text == "-") return 0; + bool i = false; + switch (GetDataType()) + { + case asigned.UNSIGNED: + i = InputValidate.IsValidUnsignedNumber(SpecificValueBox.Text); + if (!i) return -99999999; + return (int)Int64.Parse(SpecificValueBox.Text); //Note: 64 to be safe since 4 byte values can be entered + case asigned.SIGNED: + i = InputValidate.IsValidSignedNumber(SpecificValueBox.Text); + if (!i) return -99999999; + return (int)Int64.Parse(SpecificValueBox.Text); + case asigned.HEX: + i = InputValidate.IsValidHexNumber(SpecificValueBox.Text); + if (!i) return -99999999; + return (int)Int64.Parse(SpecificValueBox.Text, NumberStyles.HexNumber); + } + return -99999999; //What are the odds someone wants to search for this value? + } + + private int GetSpecificAddress() + { + if (SpecificAddressBox.Text == "") return 0; + bool i = InputValidate.IsValidHexNumber(SpecificAddressBox.Text); + if (!i) return -1; + + return int.Parse(SpecificAddressBox.Text, NumberStyles.HexNumber); + } + + private int GetDifferentBy() + { + if (DifferentByBox.Text == "") return 0; + bool i = InputValidate.IsValidUnsignedNumber(DifferentByBox.Text); + if (!i) + { + MessageBox.Show("Missing or invalid Different By value", "Invalid value", MessageBoxButtons.OK, MessageBoxIcon.Error); + DifferentByBox.Focus(); + DifferentByBox.SelectAll(); + return -1; + } + else + return int.Parse(DifferentByBox.Text); + } + + private bool DoSpecificAddress() + { + int address = GetSpecificAddress(); + if (address < 0) + { + MessageBox.Show("Missing or invalid address", "Invalid address", MessageBoxButtons.OK, MessageBoxIcon.Error); + SpecificAddressBox.Focus(); + SpecificAddressBox.SelectAll(); + return false; + } + switch (GetOperator()) + { + case SOperator.LESS: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].address < address) + weededList.Add(searchList[x]); + } + break; + case SOperator.GREATER: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].address > address) + weededList.Add(searchList[x]); + } + break; + case SOperator.LESSEQUAL: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].address <= address) + weededList.Add(searchList[x]); + } + break; + case SOperator.GREATEREQUAL: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].address >= address) + weededList.Add(searchList[x]); + } + break; + case SOperator.EQUAL: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].address == address) + weededList.Add(searchList[x]); + } + break; + case SOperator.NOTEQUAL: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].address != address) + weededList.Add(searchList[x]); + } + break; + case SOperator.DIFFBY: + { + int diff = GetDifferentBy(); + if (diff < 0) return false; + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].address == address + diff || searchList[x].address == address - diff) + weededList.Add(searchList[x]); + } + } + break; + } + return true; + } + + private int GetSpecificChanges() + { + if (NumberOfChangesBox.Text == "") return 0; + bool i = InputValidate.IsValidUnsignedNumber(NumberOfChangesBox.Text); + if (!i) return -1; + + return int.Parse(NumberOfChangesBox.Text); + } + + private bool DoNumberOfChanges() + { + int changes = GetSpecificChanges(); + if (changes < 0) + { + MessageBox.Show("Missing or invalid number of changes", "Invalid number", MessageBoxButtons.OK, MessageBoxIcon.Error); + NumberOfChangesBox.Focus(); + NumberOfChangesBox.SelectAll(); + return false; + } + switch (GetOperator()) + { + case SOperator.LESS: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].changecount < changes) + weededList.Add(searchList[x]); + } + break; + case SOperator.GREATER: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].changecount > changes) + weededList.Add(searchList[x]); + } + break; + case SOperator.LESSEQUAL: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].changecount <= changes) + weededList.Add(searchList[x]); + } + break; + case SOperator.GREATEREQUAL: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].changecount >= changes) + weededList.Add(searchList[x]); + } + break; + case SOperator.EQUAL: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].changecount == changes) + weededList.Add(searchList[x]); + } + break; + case SOperator.NOTEQUAL: + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].changecount != changes) + weededList.Add(searchList[x]); + } + break; + case SOperator.DIFFBY: + int diff = GetDifferentBy(); + if (diff < 0) return false; + for (int x = 0; x < searchList.Count; x++) + { + if (searchList[x].address == changes + diff || searchList[x].address == changes - diff) + weededList.Add(searchList[x]); + } + break; + } + return true; + } + + private void ConvertListDataType(asigned s) + { + for (int x = 0; x < searchList.Count; x++) + searchList[x].signed = s; + } + + private void signedToolStripMenuItem_Click(object sender, EventArgs e) + { + unsignedToolStripMenuItem.Checked = false; + signedToolStripMenuItem.Checked = true; + hexadecimalToolStripMenuItem.Checked = false; + ConvertListDataType(asigned.SIGNED); + SetSpecificValueBoxMaxLength(); + DisplaySearchList(); + } + + private void unsignedToolStripMenuItem_Click(object sender, EventArgs e) + { + unsignedToolStripMenuItem.Checked = true; + signedToolStripMenuItem.Checked = false; + hexadecimalToolStripMenuItem.Checked = false; + ConvertListDataType(asigned.UNSIGNED); + SetSpecificValueBoxMaxLength(); + DisplaySearchList(); + } + + private void hexadecimalToolStripMenuItem_Click(object sender, EventArgs e) + { + unsignedToolStripMenuItem.Checked = false; + signedToolStripMenuItem.Checked = false; + hexadecimalToolStripMenuItem.Checked = true; + ConvertListDataType(asigned.HEX); + SetSpecificValueBoxMaxLength(); + DisplaySearchList(); + } + + private void SearchListView_MouseDoubleClick(object sender, MouseEventArgs e) + { + ListView.SelectedIndexCollection indexes = SearchListView.SelectedIndices; + if (indexes.Count > 0) + { + AddToRamWatch(); + } + } + + private void SetSpecificValueBoxMaxLength() + { + switch (GetDataType()) + { + case asigned.UNSIGNED: + switch (GetDataSize()) + { + case atype.BYTE: + SpecificValueBox.MaxLength = 3; + break; + case atype.WORD: + SpecificValueBox.MaxLength = 5; + break; + case atype.DWORD: + SpecificValueBox.MaxLength = 10; + break; + default: + SpecificValueBox.MaxLength = 10; + break; + } + break; + case asigned.SIGNED: + switch (GetDataSize()) + { + case atype.BYTE: + SpecificValueBox.MaxLength = 4; + break; + case atype.WORD: + SpecificValueBox.MaxLength = 6; + break; + case atype.DWORD: + SpecificValueBox.MaxLength = 11; + break; + default: + SpecificValueBox.MaxLength = 11; + break; + } + break; + case asigned.HEX: + switch (GetDataSize()) + { + case atype.BYTE: + SpecificValueBox.MaxLength = 2; + break; + case atype.WORD: + SpecificValueBox.MaxLength = 4; + break; + case atype.DWORD: + SpecificValueBox.MaxLength = 8; + break; + default: + SpecificValueBox.MaxLength = 8; + break; + } + break; + default: + SpecificValueBox.MaxLength = 11; + break; + } + } + + private void byteToolStripMenuItem_Click(object sender, EventArgs e) + { + byteToolStripMenuItem.Checked = true; + bytesToolStripMenuItem.Checked = false; + dWordToolStripMenuItem1.Checked = false; + SetSpecificValueBoxMaxLength(); + } + + private void bytesToolStripMenuItem_Click(object sender, EventArgs e) + { + byteToolStripMenuItem.Checked = false; + bytesToolStripMenuItem.Checked = true; + dWordToolStripMenuItem1.Checked = false; + SetSpecificValueBoxMaxLength(); + } + + private void dWordToolStripMenuItem1_Click(object sender, EventArgs e) + { + byteToolStripMenuItem.Checked = false; + bytesToolStripMenuItem.Checked = false; + dWordToolStripMenuItem1.Checked = true; + SetSpecificValueBoxMaxLength(); + } + + private void bigEndianToolStripMenuItem_Click(object sender, EventArgs e) + { + bigEndianToolStripMenuItem.Checked = true; + littleEndianToolStripMenuItem.Checked = false; + } + + private void littleEndianToolStripMenuItem_Click(object sender, EventArgs e) + { + bigEndianToolStripMenuItem.Checked = false; + littleEndianToolStripMenuItem.Checked = true; + } + + private void AutoSearchCheckBox_CheckedChanged(object sender, EventArgs e) + { + if (AutoSearchCheckBox.Checked) + AutoSearchCheckBox.BackColor = Color.Pink; + else + AutoSearchCheckBox.BackColor = this.BackColor; + } + + private void SpecificValueBox_Leave(object sender, EventArgs e) + { + DoPreview(); + } + + private void SpecificAddressBox_Leave(object sender, EventArgs e) + { + DoPreview(); + } + + private void NumberOfChangesBox_Leave(object sender, EventArgs e) + { + DoPreview(); + } + + private void DifferentByBox_Leave(object sender, EventArgs e) + { + if (!InputValidate.IsValidUnsignedNumber(DifferentByBox.Text)) //Actually the only way this could happen is from putting dashes after the first character + { + DifferentByBox.Focus(); + DifferentByBox.SelectAll(); + ToolTip t = new ToolTip(); + t.Show("Must be a valid unsigned decimal value", DifferentByBox, 5000); + return; + } + DoPreview(); + } + + private bool SaveSearchFile(string path) + { + var file = new FileInfo(path); + + using (StreamWriter sw = new StreamWriter(path)) + { + string str = "Domain " + Domain.Name + "\n"; + + for (int x = 0; x < searchList.Count; x++) + { + str += string.Format("{0:X4}", searchList[x].address) + "\t"; + str += searchList[x].GetTypeByChar().ToString() + "\t"; + str += searchList[x].GetSignedByChar().ToString() + "\t"; + + if (searchList[x].bigendian == true) + str += "1\t"; + else + str += "0\t"; + + str += searchList[x].notes + "\n"; + } + + sw.WriteLine(str); + } + return true; + } + + private FileInfo GetSaveFileFromUser() + { + var sfd = new SaveFileDialog(); + if (currentSearchFile.Length > 0) + { + sfd.FileName = Path.GetFileNameWithoutExtension(currentSearchFile); + sfd.InitialDirectory = Path.GetDirectoryName(currentSearchFile); + } + else if (!(Global.Emulator is NullEmulator)) + { + sfd.FileName = Global.Game.FilesystemSafeName; + sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.WatchPath, ""); + } + else + { + sfd.FileName = "NULL"; + sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.WatchPath, ""); + } + sfd.Filter = "Watch Files (*.wch)|*.wch|All Files|*.*"; + sfd.RestoreDirectory = true; + Global.Sound.StopSound(); + var result = sfd.ShowDialog(); + Global.Sound.StartSound(); + if (result != DialogResult.OK) + return null; + var file = new FileInfo(sfd.FileName); + return file; + } + + public void SaveAs() + { + var file = GetSaveFileFromUser(); + if (file != null) + { + SaveSearchFile(file.FullName); + currentSearchFile = file.FullName; + OutputLabel.Text = Path.GetFileName(currentSearchFile) + " saved."; + } + } + + private void LoadSearchFromRecent(string file) + { + bool r = LoadSearchFile(file, false, false, searchList); + if (!r) + { + DialogResult result = MessageBox.Show("Could not open " + file + "\nRemove from list?", "File not found", MessageBoxButtons.YesNo, MessageBoxIcon.Error); + if (result == DialogResult.Yes) + Global.Config.RecentSearches.Remove(file); + } + DisplaySearchList(); + } + + public int HowMany(string str, char c) + { + int count = 0; + for (int x = 0; x < str.Length; x++) + { + if (str[x] == c) + count++; + } + return count; + } + + private int GetDomainPos(string name) + { + //Attempts to find the memory domain by name, if it fails, it defaults to index 0 + for (int x = 0; x < Global.Emulator.MemoryDomains.Count; x++) + { + if (Global.Emulator.MemoryDomains[x].Name == name) + return x; + } + return 0; + } + + bool LoadSearchFile(string path, bool append, bool truncate, List list) + { + int y, z; + var file = new FileInfo(path); + if (file.Exists == false) return false; + + using (StreamReader sr = file.OpenText()) + { + if (!append && !truncate) + currentSearchFile = path; + + int count = 0; + string s = ""; + string temp = ""; + + if (!append) + list.Clear(); //Wipe existing list and read from file + + while ((s = sr.ReadLine()) != null) + { + //parse each line and add to watchList + + //.wch files from other emulators start with a number representing the number of watch, that line can be discarded here + //Any properly formatted line couldn't possibly be this short anyway, this also takes care of any garbage lines that might be in a file + if (s.Length < 5) continue; + + if (s.Substring(0, 6) == "Domain") + SetMemoryDomain(GetDomainPos(s.Substring(7, s.Length - 7))); + + z = HowMany(s, '\t'); + if (z == 5) + { + //If 5, then this is a .wch file format made from another emulator, the first column (watch position) is not needed here + y = s.IndexOf('\t') + 1; + s = s.Substring(y, s.Length - y); //5 digit value representing the watch position number + } + else if (z != 4) + continue; //If not 4, something is wrong with this line, ignore it + count++; + Watch w = new Watch(); + + temp = s.Substring(0, s.IndexOf('\t')); + w.address = int.Parse(temp, NumberStyles.HexNumber); + + y = s.IndexOf('\t') + 1; + s = s.Substring(y, s.Length - y); //Type + w.SetTypeByChar(s[0]); + + y = s.IndexOf('\t') + 1; + s = s.Substring(y, s.Length - y); //Signed + w.SetSignedByChar(s[0]); + + y = s.IndexOf('\t') + 1; + s = s.Substring(y, s.Length - y); //Endian + y = Int16.Parse(s[0].ToString()); + if (y == 0) + w.bigendian = false; + else + w.bigendian = true; + + //w.notes = s.Substring(2, s.Length - 2); //User notes + + list.Add(w); + } + + if (!append && !truncate) + { + Global.Config.RecentSearches.Add(file.FullName); + OutputLabel.Text = Path.GetFileName(file.FullName); + //Update the number of watches + SetTotal(); + } + } + + return true; + } + + private void recentToolStripMenuItem_DropDownOpened(object sender, EventArgs e) + { + //Clear out recent Roms list + //repopulate it with an up to date list + recentToolStripMenuItem.DropDownItems.Clear(); + + if (Global.Config.RecentSearches.IsEmpty()) + { + var none = new ToolStripMenuItem(); + none.Enabled = false; + none.Text = "None"; + recentToolStripMenuItem.DropDownItems.Add(none); + } + else + { + for (int x = 0; x < Global.Config.RecentSearches.Length(); x++) + { + string path = Global.Config.RecentSearches.GetRecentFileByPosition(x); + var item = new ToolStripMenuItem(); + item.Text = path; + item.Click += (o, ev) => LoadSearchFromRecent(path); + recentToolStripMenuItem.DropDownItems.Add(item); + } + } + + recentToolStripMenuItem.DropDownItems.Add("-"); + + var clearitem = new ToolStripMenuItem(); + clearitem.Text = "&Clear"; + clearitem.Click += (o, ev) => Global.Config.RecentSearches.Clear(); + recentToolStripMenuItem.DropDownItems.Add(clearitem); + + var auto = new ToolStripMenuItem(); + auto.Text = "&Auto-Load"; + auto.Click += (o, ev) => UpdateAutoLoadRamSearch(); + if (Global.Config.AutoLoadRamSearch == true) + auto.Checked = true; + else + auto.Checked = false; + recentToolStripMenuItem.DropDownItems.Add(auto); + } + + private void UpdateAutoLoadRamSearch() + { + autoLoadToolStripMenuItem.Checked = Global.Config.AutoLoadRamSearch ^= true; + } + + private void appendFileToolStripMenuItem_Click(object sender, EventArgs e) + { + var file = GetFileFromUser(); + if (file != null) + LoadSearchFile(file.FullName, true, false, searchList); + DisplaySearchList(); + } + + private FileInfo GetFileFromUser() + { + var ofd = new OpenFileDialog(); + if (currentSearchFile.Length > 0) + ofd.FileName = Path.GetFileNameWithoutExtension(currentSearchFile); + ofd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.WatchPath, ""); + ofd.Filter = "Watch Files (*.wch)|*.wch|All Files|*.*"; + ofd.RestoreDirectory = true; + if (currentSearchFile.Length > 0) + ofd.FileName = Path.GetFileNameWithoutExtension(currentSearchFile); + Global.Sound.StopSound(); + var result = ofd.ShowDialog(); + Global.Sound.StartSound(); + if (result != DialogResult.OK) + return null; + var file = new FileInfo(ofd.FileName); + return file; + } + + private void includeMisalignedToolStripMenuItem_Click(object sender, EventArgs e) + { + includeMisalignedToolStripMenuItem.Checked ^= true; + } + + private void saveWindowPositionToolStripMenuItem_Click(object sender, EventArgs e) + { + Global.Config.RamSearchSaveWindowPosition ^= true; + } + + private void optionsToolStripMenuItem_DropDownOpened(object sender, EventArgs e) + { + saveWindowPositionToolStripMenuItem.Checked = Global.Config.RamSearchSaveWindowPosition; + previewModeToolStripMenuItem.Checked = Global.Config.RamSearchPreviewMode; + alwaysExludeRamSearchListToolStripMenuItem.Checked = Global.Config.AlwaysExludeRamWatch; + } + + private void searchToolStripMenuItem1_Click(object sender, EventArgs e) + { + DoSearch(); + } + + private void clearChangeCountsToolStripMenuItem_Click(object sender, EventArgs e) + { + ClearChangeCounts(); + } + + private void undoToolStripMenuItem_Click_1(object sender, EventArgs e) + { + DoUndo(); + } + + private void removeSelectedToolStripMenuItem_Click(object sender, EventArgs e) + { + RemoveAddresses(); + } + + private void saveToolStripMenuItem_Click(object sender, EventArgs e) + { + if (string.Compare(currentSearchFile, "") == 0) SaveAs(); + SaveSearchFile(currentSearchFile); + } + + private void addSelectedToRamWatchToolStripMenuItem_Click(object sender, EventArgs e) + { + AddToRamWatch(); + } + + private void pokeAddressToolStripMenuItem_Click(object sender, EventArgs e) + { + PokeAddress(); + } + + private void searchToolStripMenuItem_DropDownOpened(object sender, EventArgs e) + { + if (searchList.Count == 0) + searchToolStripMenuItem.Enabled = false; + else + searchToolStripMenuItem.Enabled = true; + + if (undoList.Count == 0) + undoToolStripMenuItem.Enabled = false; + else + undoToolStripMenuItem.Enabled = true; + + ListView.SelectedIndexCollection indexes = SearchListView.SelectedIndices; + + if (indexes.Count == 0) + { + removeSelectedToolStripMenuItem.Enabled = false; + addSelectedToRamWatchToolStripMenuItem.Enabled = false; + pokeAddressToolStripMenuItem.Enabled = false; + } + else + { + removeSelectedToolStripMenuItem.Enabled = true; + addSelectedToRamWatchToolStripMenuItem.Enabled = true; + pokeAddressToolStripMenuItem.Enabled = true; + } + } + + private void sinceLastSearchToolStripMenuItem_Click(object sender, EventArgs e) + { + Global.Config.RamSearchPreviousAs = 0; + } + + private void sinceLastFrameToolStripMenuItem_Click(object sender, EventArgs e) + { + Global.Config.RamSearchPreviousAs = 2; + } + + private void originalValueToolStripMenuItem_Click(object sender, EventArgs e) + { + Global.Config.RamSearchPreviousAs = 1; + } + + private void definePreviousValueToolStripMenuItem_DropDownOpened(object sender, EventArgs e) + { + switch (Global.Config.RamSearchPreviousAs) + { + case 0: //Since last Search + sinceLastSearchToolStripMenuItem.Checked = true; + originalValueToolStripMenuItem.Checked = false; + sinceLastFrameToolStripMenuItem.Checked = false; + break; + case 1: //Original value (since Start new search) + sinceLastSearchToolStripMenuItem.Checked = false; + originalValueToolStripMenuItem.Checked = true; + sinceLastFrameToolStripMenuItem.Checked = false; + break; + case 2: //Since last Frame + sinceLastSearchToolStripMenuItem.Checked = false; + originalValueToolStripMenuItem.Checked = false; + sinceLastFrameToolStripMenuItem.Checked = true; + break; + default://Default to last search + sinceLastSearchToolStripMenuItem.Checked = true; + originalValueToolStripMenuItem.Checked = false; + sinceLastFrameToolStripMenuItem.Checked = false; + break; + } + } + + private void LessThanRadio_CheckedChanged(object sender, EventArgs e) + { + if (!DifferentByRadio.Checked) DoPreview(); + } + + private void previewModeToolStripMenuItem_Click(object sender, EventArgs e) + { + Global.Config.RamSearchPreviewMode ^= true; + } + + private void SpecificValueBox_TextChanged(object sender, EventArgs e) + { + DoPreview(); + } + + private void SpecificValueBox_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar == '\b') return; + + switch (GetDataType()) + { + case asigned.UNSIGNED: + if (!InputValidate.IsValidUnsignedNumber(e.KeyChar)) + e.Handled = true; + break; + case asigned.SIGNED: + if (!InputValidate.IsValidSignedNumber(e.KeyChar)) + e.Handled = true; + break; + case asigned.HEX: + if (!InputValidate.IsValidHexNumber(e.KeyChar)) + e.Handled = true; + break; + } + } + + private void SpecificAddressBox_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar == '\b') return; + + if (!InputValidate.IsValidHexNumber(e.KeyChar)) + e.Handled = true; + } + + private void NumberOfChangesBox_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar == '\b') return; + + if (!InputValidate.IsValidUnsignedNumber(e.KeyChar)) + e.Handled = true; + } + + private void DifferentByBox_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar == '\b') return; + + if (!InputValidate.IsValidUnsignedNumber(e.KeyChar)) + e.Handled = true; + } + + private void SpecificAddressBox_TextChanged(object sender, EventArgs e) + { + DoPreview(); + } + + private void NumberOfChangesBox_TextChanged(object sender, EventArgs e) + { + DoPreview(); + } + + private void DifferentByBox_TextChanged(object sender, EventArgs e) + { + DoPreview(); + } + + private void TruncateFromFileToolStripMenuItem_Click(object sender, EventArgs e) + { + TruncateFromFile(); + } + + private void DoTruncate(List temp) + { + weededList.Clear(); + bool found = false; + for (int x = 0; x < searchList.Count; x++) + { + found = false; + for (int y = 0; y < temp.Count; y++) + { + if (searchList[x].address == temp[y].address) + { + found = true; + break; + } + + } + if (!found) + weededList.Add(searchList[x]); + } + SaveUndo(); + OutputLabel.Text = MakeAddressString(searchList.Count - weededList.Count) + " removed"; + ReplaceSearchListWithWeedOutList(); + if (Global.Config.RamSearchPreviousAs != 1) MakePreviousList(); //1 = Original value + DisplaySearchList(); + } + + private void TruncateFromFile() + { + //TODO: what about byte size? Think about the implications of this + var file = GetFileFromUser(); + if (file != null) + { + List temp = new List(); + LoadSearchFile(file.FullName, false, true, temp); + DoTruncate(temp); + } + } + + /// + /// Removes Ram Watch list from the search list + /// + private void ExludeRamWatchList() + { + DoTruncate(Global.MainForm.RamWatch1.GetRamWatchList()); + } + + private void TruncateFromFiletoolStripButton2_Click(object sender, EventArgs e) + { + TruncateFromFile(); + } + + private void exludeRamWatchListToolStripMenuItem_Click(object sender, EventArgs e) + { + ExludeRamWatchList(); + } + + private void ExcludeRamWatchtoolStripButton2_Click(object sender, EventArgs e) + { + ExludeRamWatchList(); + } + + private void alwaysExludeRamSearchListToolStripMenuItem_Click(object sender, EventArgs e) + { + Global.Config.AlwaysExludeRamWatch ^= true; + } + + private void CopyValueToPrev() + { + for (int x = 0; x < searchList.Count; x++) + { + prevList[x].value = searchList[x].value; + searchList[x].prev = searchList[x].value; + } + DisplaySearchList(); + DoPreview(); + } + + private void SetCurrToPrevtoolStripButton2_Click(object sender, EventArgs e) + { + CopyValueToPrev(); + } + + private void copyValueToPrevToolStripMenuItem_Click(object sender, EventArgs e) + { + CopyValueToPrev(); + } + + private void startNewSearchToolStripMenuItem_Click(object sender, EventArgs e) + { + StartNewSearch(); + } + + private void searchToolStripMenuItem2_Click(object sender, EventArgs e) + { + DoSearch(); + } + + private int GetNumDigits(Int32 i) + { + //if (i == 0) return 0; + //if (i < 0x10) return 1; + //if (i < 0x100) return 2; + //if (i < 0x1000) return 3; //adelikat: commenting these out because I decided that regardless of domain, 4 digits should be the minimum + if (i < 0x10000) return 4; + if (i < 0x100000) return 5; + if (i < 0x1000000) return 6; + if (i < 0x10000000) return 7; + else return 8; + } + + private void FreezeAddressToolStrip_Click(object sender, EventArgs e) + { + FreezeAddress(); + } + + private void FreezeAddress() + { + ListView.SelectedIndexCollection indexes = SearchListView.SelectedIndices; + if (indexes.Count > 0) + { + switch (searchList[indexes[0]].type) + { + case atype.BYTE: + Cheat c = new Cheat("", searchList[indexes[0]].address, (byte)searchList[indexes[0]].value, + true, Domain); + Global.MainForm.Cheats1.AddCheat(c); + break; + case atype.WORD: + { + byte low = (byte)(searchList[indexes[0]].value / 256); + byte high = (byte)(searchList[indexes[0]].value); + int a1 = searchList[indexes[0]].address; + int a2 = searchList[indexes[0]].address + 1; + if (searchList[indexes[0]].bigendian) + { + Cheat c1 = new Cheat("", a1, low, true, Domain); + Cheat c2 = new Cheat("", a2, high, true, Domain); + Global.MainForm.Cheats1.AddCheat(c1); + Global.MainForm.Cheats1.AddCheat(c2); + } + else + { + Cheat c1 = new Cheat("", a1, high, true, Domain); + Cheat c2 = new Cheat("", a2, low, true, Domain); + Global.MainForm.Cheats1.AddCheat(c1); + Global.MainForm.Cheats1.AddCheat(c2); + } + } + break; + case atype.DWORD: + { + byte HIWORDhigh = (byte)(searchList[indexes[0]].value / 0x1000000); + byte HIWORDlow = (byte)(searchList[indexes[0]].value / 0x10000); + byte LOWORDhigh = (byte)(searchList[indexes[0]].value / 0x100); + byte LOWORDlow = (byte)(searchList[indexes[0]].value); + int a1 = searchList[indexes[0]].address; + int a2 = searchList[indexes[0]].address + 1; + int a3 = searchList[indexes[0]].address + 2; + int a4 = searchList[indexes[0]].address + 3; + if (searchList[indexes[0]].bigendian) + { + Cheat c1 = new Cheat("", a1, HIWORDhigh, true, Domain); + Cheat c2 = new Cheat("", a2, HIWORDlow, true, Domain); + Cheat c3 = new Cheat("", a3, LOWORDhigh, true, Domain); + Cheat c4 = new Cheat("", a4, LOWORDlow, true, Domain); + Global.MainForm.Cheats1.AddCheat(c1); + Global.MainForm.Cheats1.AddCheat(c2); + Global.MainForm.Cheats1.AddCheat(c3); + Global.MainForm.Cheats1.AddCheat(c4); + } + else + { + Cheat c1 = new Cheat("", a1, LOWORDlow, true, Domain); + Cheat c2 = new Cheat("", a2, LOWORDhigh, true, Domain); + Cheat c3 = new Cheat("", a3, HIWORDlow, true, Domain); + Cheat c4 = new Cheat("", a4, HIWORDhigh, true, Domain); + Global.MainForm.Cheats1.AddCheat(c1); + Global.MainForm.Cheats1.AddCheat(c2); + Global.MainForm.Cheats1.AddCheat(c3); + Global.MainForm.Cheats1.AddCheat(c4); + } + } + break; + } + } + } + + private void freezeAddressToolStripMenuItem_Click(object sender, EventArgs e) + { + FreezeAddress(); + } + + private void contextMenuStrip1_Opening(object sender, CancelEventArgs e) + { + ListView.SelectedIndexCollection indexes = SearchListView.SelectedIndices; + if (indexes.Count == 0) + { + contextMenuStrip1.Items[3].Visible = false; + contextMenuStrip1.Items[4].Visible = false; + contextMenuStrip1.Items[5].Visible = false; + contextMenuStrip1.Items[6].Visible = false; + } + else + { + for (int x = 0; x < contextMenuStrip1.Items.Count; x++) + contextMenuStrip1.Items[x].Visible = true; + } + } + + private void removeSelectedToolStripMenuItem1_Click(object sender, EventArgs e) + { + RemoveAddresses(); + } + + private void addToRamWatchToolStripMenuItem_Click(object sender, EventArgs e) + { + AddToRamWatch(); + } + + private void pokeAddressToolStripMenuItem1_Click(object sender, EventArgs e) + { + PokeAddress(); + } + + private void freezeAddressToolStripMenuItem1_Click(object sender, EventArgs e) + { + FreezeAddress(); + } + + private void CheckDomainMenuItems() + { + for (int x = 0; x < domainMenuItems.Count; x++) + { + if (Domain.Name == domainMenuItems[x].Text) + domainMenuItems[x].Checked = true; + else + domainMenuItems[x].Checked = false; + } + } + + private void memoryDomainsToolStripMenuItem_DropDownOpened(object sender, EventArgs e) + { + CheckDomainMenuItems(); + } + + private void SearchListView_ColumnReordered(object sender, ColumnReorderedEventArgs e) + { + ColumnHeader header = e.Header; + + int lowIndex = 0; + int highIndex = 0; + int changeIndex = 0; + if (e.NewDisplayIndex > e.OldDisplayIndex) + { + changeIndex = -1; + highIndex = e.NewDisplayIndex; + lowIndex = e.OldDisplayIndex; + } + else + { + changeIndex = 1; + highIndex = e.OldDisplayIndex; + lowIndex = e.NewDisplayIndex; + } + + if (Global.Config.RamSearchAddressIndex >= lowIndex && Global.Config.RamSearchAddressIndex <= highIndex) + Global.Config.RamSearchAddressIndex += changeIndex; + if (Global.Config.RamSearchValueIndex >= lowIndex && Global.Config.RamSearchValueIndex <= highIndex) + Global.Config.RamSearchValueIndex += changeIndex; + if (Global.Config.RamSearchPrevIndex >= lowIndex && Global.Config.RamSearchPrevIndex <= highIndex) + Global.Config.RamSearchPrevIndex += changeIndex; + if (Global.Config.RamSearchChangesIndex >= lowIndex && Global.Config.RamSearchChangesIndex <= highIndex) + Global.Config.RamSearchChangesIndex += changeIndex; + + if (header.Text == "Address") + Global.Config.RamSearchAddressIndex = e.NewDisplayIndex; + else if (header.Text == "Value") + Global.Config.RamSearchValueIndex = e.NewDisplayIndex; + else if (header.Text == "Prev") + Global.Config.RamSearchPrevIndex = e.NewDisplayIndex; + else if (header.Text == "Changes") + Global.Config.RamSearchChangesIndex = e.NewDisplayIndex; + } + + private void ColumnPositionSet() + { + List columnHeaders = new List(); + int i = 0; + for (i = 0; i < SearchListView.Columns.Count; i++) + columnHeaders.Add(SearchListView.Columns[i]); + + SearchListView.Columns.Clear(); + + i = 0; + do + { + string column = ""; + if (Global.Config.RamSearchAddressIndex == i) + column = "Address"; + else if (Global.Config.RamSearchValueIndex == i) + column = "Value"; + else if (Global.Config.RamSearchPrevIndex == i) + column = "Prev"; + else if (Global.Config.RamSearchChangesIndex == i) + column = "Changes"; + + for (int k = 0; k < columnHeaders.Count(); k++) + { + if (columnHeaders[k].Text == column) + { + SearchListView.Columns.Add(columnHeaders[k]); + columnHeaders.Remove(columnHeaders[k]); + break; + } + } + i++; + } while (columnHeaders.Count() > 0); + } + + private void RamSearch_DragEnter(object sender, DragEventArgs e) + { + e.Effect = e.Data.GetDataPresent(DataFormats.FileDrop) ? DragDropEffects.Copy : DragDropEffects.None; string[] filePaths = (string[])e.Data.GetData(DataFormats.FileDrop); + } + + private void RamSearch_DragDrop(object sender, DragEventArgs e) + { + string[] filePaths = (string[])e.Data.GetData(DataFormats.FileDrop); + if (Path.GetExtension(filePaths[0]) == (".wch")) + { + LoadSearchFile(filePaths[0], false, false, searchList); + DisplaySearchList(); + } + } + + private void OrderColumn(int columnToOrder) + { + string columnName = SearchListView.Columns[columnToOrder].Text; + if (sortedCol.CompareTo(columnName) != 0) + sortReverse = false; + searchList.Sort((x, y) => x.CompareTo(y, columnName) * (sortReverse ? -1 : 1)); + sortedCol = columnName; + sortReverse = !(sortReverse); + SearchListView.Refresh(); + } + + private void SearchListView_ColumnClick(object sender, ColumnClickEventArgs e) + { + OrderColumn(e.Column); + } + } } diff --git a/BizHawk.MultiClient/tools/RamWatch.Designer.cs b/BizHawk.MultiClient/tools/RamWatch.Designer.cs index 167ae5331d..b18ccfb4ed 100644 --- a/BizHawk.MultiClient/tools/RamWatch.Designer.cs +++ b/BizHawk.MultiClient/tools/RamWatch.Designer.cs @@ -361,28 +361,28 @@ this.showChangeCountsToolStripMenuItem.Checked = true; this.showChangeCountsToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; this.showChangeCountsToolStripMenuItem.Name = "showChangeCountsToolStripMenuItem"; - this.showChangeCountsToolStripMenuItem.Size = new System.Drawing.Size(206, 22); + this.showChangeCountsToolStripMenuItem.Size = new System.Drawing.Size(203, 22); this.showChangeCountsToolStripMenuItem.Text = "Change Counts"; this.showChangeCountsToolStripMenuItem.Click += new System.EventHandler(this.showChangeCountsToolStripMenuItem_Click); // // showPreviousValueToolStripMenuItem // this.showPreviousValueToolStripMenuItem.Name = "showPreviousValueToolStripMenuItem"; - this.showPreviousValueToolStripMenuItem.Size = new System.Drawing.Size(206, 22); + this.showPreviousValueToolStripMenuItem.Size = new System.Drawing.Size(203, 22); this.showPreviousValueToolStripMenuItem.Text = "Previous Value"; this.showPreviousValueToolStripMenuItem.Click += new System.EventHandler(this.showPreviousValueToolStripMenuItem_Click); // // prevValueShowsChangeAmountToolStripMenuItem // this.prevValueShowsChangeAmountToolStripMenuItem.Name = "prevValueShowsChangeAmountToolStripMenuItem"; - this.prevValueShowsChangeAmountToolStripMenuItem.Size = new System.Drawing.Size(206, 22); + this.prevValueShowsChangeAmountToolStripMenuItem.Size = new System.Drawing.Size(203, 22); this.prevValueShowsChangeAmountToolStripMenuItem.Text = "Prev Value as change"; this.prevValueShowsChangeAmountToolStripMenuItem.Click += new System.EventHandler(this.prevValueShowsChangeAmountToolStripMenuItem_Click); // // toolStripSeparator7 // this.toolStripSeparator7.Name = "toolStripSeparator7"; - this.toolStripSeparator7.Size = new System.Drawing.Size(203, 6); + this.toolStripSeparator7.Size = new System.Drawing.Size(200, 6); // // restoreWindowSizeToolStripMenuItem // @@ -416,6 +416,7 @@ this.WatchListView.TabIndex = 1; this.WatchListView.UseCompatibleStateImageBehavior = false; this.WatchListView.View = System.Windows.Forms.View.Details; + this.WatchListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.WatchListView_ColumnClick); this.WatchListView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.WatchListView_MouseDoubleClick); this.WatchListView.ColumnReordered += new System.Windows.Forms.ColumnReorderedEventHandler(this.ColumnReorder); this.WatchListView.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.WatchListView_AfterLabelEdit); diff --git a/BizHawk.MultiClient/tools/RamWatch.cs b/BizHawk.MultiClient/tools/RamWatch.cs index 80731cb311..178ff1e015 100644 --- a/BizHawk.MultiClient/tools/RamWatch.cs +++ b/BizHawk.MultiClient/tools/RamWatch.cs @@ -17,8 +17,8 @@ namespace BizHawk.MultiClient public partial class RamWatch : Form { //TODO: - //Restore window size should restore column order as well //When receiving a watch from a different domain, should something be done? + //when sorting, "Prev as Change" option not taken into account int defaultWidth; //For saving the default size of the dialog, so the user can restore if desired int defaultHeight; @@ -35,6 +35,9 @@ namespace BizHawk.MultiClient bool changes = false; List domainMenuItems = new List(); + string sortedCol; + bool sortReverse; + public void Restart() { if (!this.IsHandleCreated || this.IsDisposed) return; @@ -132,6 +135,8 @@ namespace BizHawk.MultiClient WatchListView.QueryItemBkColor += new QueryItemBkColorHandler(WatchListView_QueryItemBkColor); WatchListView.VirtualMode = true; Closing += (o, e) => SaveConfigSettings(); + sortReverse = false; + sortedCol = ""; } protected override void OnClosing(CancelEventArgs e) @@ -312,6 +317,8 @@ namespace BizHawk.MultiClient currentWatchFile = ""; changes = false; MessageLabel.Text = ""; + sortReverse = false; + sortedCol = ""; } } @@ -1376,5 +1383,21 @@ namespace BizHawk.MultiClient i++; } while (columnHeaders.Count() > 0); } + + private void OrderColumn(int columnToOrder) + { + string columnName = WatchListView.Columns[columnToOrder].Text; + if (sortedCol.CompareTo(columnName) != 0) + sortReverse = false; + watchList.Sort((x, y) => x.CompareTo(y, columnName));//* (sortReverse ? -1 : 1)); + //sortedCol = columnName; + //sortReverse = !(sortReverse); + WatchListView.Refresh(); + } + + private void WatchListView_ColumnClick(object sender, ColumnClickEventArgs e) + { + OrderColumn(e.Column); + } } } \ No newline at end of file diff --git a/BizHawk.MultiClient/tools/Watch.cs b/BizHawk.MultiClient/tools/Watch.cs index d232c0b774..d36b1c0973 100644 --- a/BizHawk.MultiClient/tools/Watch.cs +++ b/BizHawk.MultiClient/tools/Watch.cs @@ -5,230 +5,383 @@ using System.Text; namespace BizHawk.MultiClient { - public enum atype { BYTE, WORD, DWORD, SEPARATOR }; //TODO: more custom types too like 12.4 and 24.12 fixed point - public enum asigned { SIGNED, UNSIGNED, HEX }; + public enum atype { BYTE, WORD, DWORD, SEPARATOR }; //TODO: more custom types too like 12.4 and 24.12 fixed point + public enum asigned { SIGNED, UNSIGNED, HEX }; - /// - /// An object that represent a ram address and related properties - /// - public class Watch - { - public Watch() - { - address = 0; - value = 0; - type = atype.BYTE; - signed = asigned.UNSIGNED; - bigendian = true; - notes = ""; - changecount = 0; - prev = 0; - } + /// + /// An object that represent a ram address and related properties + /// + public class Watch + { + public Watch() + { + address = 0; + value = 0; + type = atype.BYTE; + signed = asigned.UNSIGNED; + bigendian = true; + notes = ""; + changecount = 0; + prev = 0; + } - public Watch(Watch w) - { - address = w.address; - value = w.value; - type = w.type; - signed = w.signed; - bigendian = w.bigendian; - notes = w.notes; - changecount = w.changecount; - prev = w.prev; - } + public Watch(Watch w) + { + address = w.address; + value = w.value; + type = w.type; + signed = w.signed; + bigendian = w.bigendian; + notes = w.notes; + changecount = w.changecount; + prev = w.prev; + } - public Watch(int Address, int Value, atype Type, asigned Signed, bool BigEndian, string Notes) - { - address = Address; - value = Value; - type = Type; - signed = Signed; - bigendian = BigEndian; - notes = Notes; - changecount = 0; - prev = 0; - } - public int address { get; set; } - public int value { get; set; } //Current value - public int prev { get; set; } - public atype type { get; set; } //Address type (byte, word, dword, etc - public asigned signed { get; set; } //Signed/Unsigned? - public bool bigendian { get; set; } - public string notes { get; set; } //User notes - public int changecount { get; set; } - + public Watch(int Address, int Value, atype Type, asigned Signed, bool BigEndian, string Notes) + { + address = Address; + value = Value; + type = Type; + signed = Signed; + bigendian = BigEndian; + notes = Notes; + changecount = 0; + prev = 0; + } + public int address { get; set; } + public int value { get; set; } //Current value + public int prev { get; set; } + public atype type { get; set; } //Address type (byte, word, dword, etc + public asigned signed { get; set; } //Signed/Unsigned? + public bool bigendian { get; set; } + public string notes { get; set; } //User notes + public int changecount { get; set; } - public bool SetTypeByChar(char c) //b = byte, w = word, d = dword - { - switch (c) - { - case 'b': - type = atype.BYTE; - return true; - case 'w': - type = atype.WORD; - return true; - case 'd': - type = atype.DWORD; - return true; - case 'S': - type = atype.SEPARATOR; - return true; - default: - return false; - } - } - public char GetTypeByChar() - { - switch (type) - { - case atype.BYTE: - return 'b'; - case atype.WORD: - return 'w'; - case atype.DWORD: - return 'd'; - case atype.SEPARATOR: - return 'S'; - default: - return 'b'; //Just in case - } - } + public bool SetTypeByChar(char c) //b = byte, w = word, d = dword + { + switch (c) + { + case 'b': + type = atype.BYTE; + return true; + case 'w': + type = atype.WORD; + return true; + case 'd': + type = atype.DWORD; + return true; + case 'S': + type = atype.SEPARATOR; + return true; + default: + return false; + } + } - public bool SetSignedByChar(char c) //s = signed, u = unsigned, h = hex - { - switch (c) - { - case 's': - signed = asigned.SIGNED; - return true; - case 'u': - signed = asigned.UNSIGNED; - return true; - case 'h': - signed = asigned.HEX; - return true; - default: - return false; - } - } + public char GetTypeByChar() + { + switch (type) + { + case atype.BYTE: + return 'b'; + case atype.WORD: + return 'w'; + case atype.DWORD: + return 'd'; + case atype.SEPARATOR: + return 'S'; + default: + return 'b'; //Just in case + } + } - public char GetSignedByChar() - { - switch (signed) - { - case asigned.SIGNED: - return 's'; - case asigned.UNSIGNED: - return 'u'; - case asigned.HEX: - return 'h'; - default: - return 's'; //Just in case - } - } + public bool SetSignedByChar(char c) //s = signed, u = unsigned, h = hex + { + switch (c) + { + case 's': + signed = asigned.SIGNED; + return true; + case 'u': + signed = asigned.UNSIGNED; + return true; + case 'h': + signed = asigned.HEX; + return true; + default: + return false; + } + } - private void PeekByte(MemoryDomain domain) - { - value = domain.PeekByte(address); - } + public char GetSignedByChar() + { + switch (signed) + { + case asigned.SIGNED: + return 's'; + case asigned.UNSIGNED: + return 'u'; + case asigned.HEX: + return 'h'; + default: + return 's'; //Just in case + } + } - private int PeekWord(MemoryDomain domain, int addr) - { - int temp = 0; - if (bigendian) - { - temp = ((domain.PeekByte(addr) * 256) + - domain.PeekByte(addr + 1)); - } - else - { - temp = ((domain.PeekByte(addr) + - domain.PeekByte(addr + 1) * 256)); - } - return temp; - } + private void PeekByte(MemoryDomain domain) + { + value = domain.PeekByte(address); + } - private void PeekDWord(MemoryDomain domain) - { - value = ((PeekWord(domain, address) * 65536) + - PeekWord(domain, address + 2)); - } + private int PeekWord(MemoryDomain domain, int addr) + { + int temp = 0; + if (bigendian) + { + temp = ((domain.PeekByte(addr) * 256) + + domain.PeekByte(addr + 1)); + } + else + { + temp = ((domain.PeekByte(addr) + + domain.PeekByte(addr + 1) * 256)); + } + return temp; + } - public void PeekAddress(MemoryDomain domain) - { - if (type == atype.SEPARATOR) - return; + private void PeekDWord(MemoryDomain domain) + { + value = ((PeekWord(domain, address) * 65536) + + PeekWord(domain, address + 2)); + } - switch(type) - { - case atype.BYTE: - PeekByte(domain); - break; - case atype.WORD: - value = PeekWord(domain, address); - break; - case atype.DWORD: - PeekDWord(domain); - break; - } - } + public void PeekAddress(MemoryDomain domain) + { + if (type == atype.SEPARATOR) + return; - private void PokeByte(MemoryDomain domain) - { - domain.PokeByte(address, (byte)value); - } + switch (type) + { + case atype.BYTE: + PeekByte(domain); + break; + case atype.WORD: + value = PeekWord(domain, address); + break; + case atype.DWORD: + PeekDWord(domain); + break; + } + } - private void PokeWord(MemoryDomain domain) - { - if (bigendian) - { - domain.PokeByte(address, (byte)(value / 256)); - domain.PokeByte(address + 1, (byte)(value % 256)); - } - else - { - domain.PokeByte(address + 1, (byte)(value / 256)); - domain.PokeByte(address, (byte)(value % 256)); - } - } + private void PokeByte(MemoryDomain domain) + { + domain.PokeByte(address, (byte)value); + } - private void PokeDWord(MemoryDomain domain) - { - if (bigendian) - { - domain.PokeByte(address, (byte)(value << 6)); - domain.PokeByte(address + 1, (byte)(value << 4)); - domain.PokeByte(address + 2, (byte)(value << 2)); - domain.PokeByte(address + 3, (byte)(value)); - } - else - { - domain.PokeByte(address + 1, (byte)(value << 6)); - domain.PokeByte(address, (byte)(value << 4)); - domain.PokeByte(address + 3, (byte)(value << 2)); - domain.PokeByte(address + 2, (byte)(value)); - } - } + private void PokeWord(MemoryDomain domain) + { + if (bigendian) + { + domain.PokeByte(address, (byte)(value / 256)); + domain.PokeByte(address + 1, (byte)(value % 256)); + } + else + { + domain.PokeByte(address + 1, (byte)(value / 256)); + domain.PokeByte(address, (byte)(value % 256)); + } + } - public void PokeAddress(MemoryDomain domain) - { - if (type == atype.SEPARATOR) - return; + private void PokeDWord(MemoryDomain domain) + { + if (bigendian) + { + domain.PokeByte(address, (byte)(value << 6)); + domain.PokeByte(address + 1, (byte)(value << 4)); + domain.PokeByte(address + 2, (byte)(value << 2)); + domain.PokeByte(address + 3, (byte)(value)); + } + else + { + domain.PokeByte(address + 1, (byte)(value << 6)); + domain.PokeByte(address, (byte)(value << 4)); + domain.PokeByte(address + 3, (byte)(value << 2)); + domain.PokeByte(address + 2, (byte)(value)); + } + } - switch (type) - { - case atype.BYTE: - PokeByte(domain); - break; - case atype.WORD: - PokeWord(domain); - break; - case atype.DWORD: - PokeDWord(domain); - break; - } - } - } + public void PokeAddress(MemoryDomain domain) + { + if (type == atype.SEPARATOR) + return; + + switch (type) + { + case atype.BYTE: + PokeByte(domain); + break; + case atype.WORD: + PokeWord(domain); + break; + case atype.DWORD: + PokeDWord(domain); + break; + } + } + + private int CompareAddress(Watch Other) + { + if (this.address < Other.address) + return -1; + else if (this.address > Other.address) + return 1; + else + return 0; + } + + private int CompareValue(Watch Other) + { + if (this.value < Other.value) + return -1; + else if (this.value > Other.value) + return 1; + else + return 0; + } + + private int ComparePrev(Watch Other) + { + if (this.prev < Other.prev) + return -1; + else if (this.prev > Other.prev) + return 1; + else + return 0; + } + + private int CompareChanges(Watch Other) + { + if (this.changecount < Other.changecount) + return -1; + else if (this.changecount > Other.changecount) + return 1; + else + return 0; + } + + private int CompareNotes(Watch Other) + { + if (this.notes == null & Other.notes == null) + return 0; + else if (this.notes == null) + return -1; + else if (Other.notes == null) + return 1; + else + return this.notes.CompareTo(Other.notes); + } + + public int CompareTo(Watch Other, string parameter) + { + int compare = 0; + if (parameter == "Address") + { + compare = CompareAddress(Other); + if (compare == 0) + { + compare = CompareValue(Other); + if (compare == 0) + { + compare = CompareChanges(Other); + if (compare == 0) + { + compare = ComparePrev(Other); + if (compare == 0) + compare = CompareNotes(Other); + } + } + } + } + + else if (parameter == "Value") + { + compare = CompareValue(Other); + if (compare == 0) + { + compare = CompareAddress(Other); + if (compare == 0) + { + compare = CompareChanges(Other); + if (compare == 0) + { + compare = ComparePrev(Other); + if (compare == 0) + compare = CompareNotes(Other); + } + } + } + } + + else if (parameter == "Prev") + { + compare = ComparePrev(Other); + if (compare == 0) + { + compare = CompareAddress(Other); + if (compare == 0) + { + compare = CompareValue(Other); + if (compare == 0) + { + compare = CompareChanges(Other); + if (compare == 0) + compare = CompareNotes(Other); + } + } + } + } + + else if (parameter == "Changes") + { + compare = CompareChanges(Other); + if (compare == 0) + { + compare = CompareAddress(Other); + if (compare == 0) + { + compare = CompareValue(Other); + if (compare == 0) + { + compare = ComparePrev(Other); + if (compare == 0) + compare = CompareNotes(Other); + } + } + } + } + + else if (parameter == "Notes") + { + compare = CompareNotes(Other); + if (compare == 0) + { + compare = CompareAddress(Other); + if (compare == 0) + { + compare = CompareValue(Other); + if (compare == 0) + { + compare = CompareChanges(Other); + if (compare == 0) + compare = ComparePrev(Other); + } + } + } + } + + return compare; + } + } }