Ground work for defining previous value, and some other fix ups
This commit is contained in:
parent
f6e1ed2ec4
commit
ae11756cf0
|
@ -62,7 +62,8 @@
|
|||
public int RamSearchWndx = -1; //Negative numbers will be ignored even with save window position set
|
||||
public int RamSearchWndy = -1;
|
||||
public int RamSearchWidth = -1; //Negative numbers will be ignored
|
||||
public int RamSearchHeight = -1;
|
||||
public int RamSearchHeight = -1;
|
||||
public int RamSearchPreviousAs = 0;
|
||||
|
||||
//Movie Settings
|
||||
public RecentFiles RecentMovies = new RecentFiles(8);
|
||||
|
|
|
@ -68,6 +68,10 @@
|
|||
this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.restoreOriginalWindowSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveWindowPositionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.definePreviousValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.sinceLastSearchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.sinceLastChangeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.sinceLastFrameToolStripMenuItem = 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();
|
||||
|
@ -131,7 +135,7 @@
|
|||
this.PoketoolStripButton1});
|
||||
this.SearchtoolStrip1.Location = new System.Drawing.Point(3, 0);
|
||||
this.SearchtoolStrip1.Name = "SearchtoolStrip1";
|
||||
this.SearchtoolStrip1.Size = new System.Drawing.Size(131, 25);
|
||||
this.SearchtoolStrip1.Size = new System.Drawing.Size(162, 25);
|
||||
this.SearchtoolStrip1.TabIndex = 0;
|
||||
this.SearchtoolStrip1.Text = "Search";
|
||||
//
|
||||
|
@ -155,7 +159,7 @@
|
|||
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.saveWindowPositionToolStripMenuItem_Click);
|
||||
this.saveToolStripButton.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator
|
||||
//
|
||||
|
@ -436,7 +440,8 @@
|
|||
//
|
||||
this.optionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.restoreOriginalWindowSizeToolStripMenuItem,
|
||||
this.saveWindowPositionToolStripMenuItem});
|
||||
this.saveWindowPositionToolStripMenuItem,
|
||||
this.definePreviousValueToolStripMenuItem});
|
||||
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
|
||||
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(56, 20);
|
||||
this.optionsToolStripMenuItem.Text = "&Options";
|
||||
|
@ -445,16 +450,48 @@
|
|||
// restoreOriginalWindowSizeToolStripMenuItem
|
||||
//
|
||||
this.restoreOriginalWindowSizeToolStripMenuItem.Name = "restoreOriginalWindowSizeToolStripMenuItem";
|
||||
this.restoreOriginalWindowSizeToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
|
||||
this.restoreOriginalWindowSizeToolStripMenuItem.Size = new System.Drawing.Size(204, 22);
|
||||
this.restoreOriginalWindowSizeToolStripMenuItem.Text = "Restore Window Size";
|
||||
//
|
||||
// saveWindowPositionToolStripMenuItem
|
||||
//
|
||||
this.saveWindowPositionToolStripMenuItem.Name = "saveWindowPositionToolStripMenuItem";
|
||||
this.saveWindowPositionToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
|
||||
this.saveWindowPositionToolStripMenuItem.Size = new System.Drawing.Size(204, 22);
|
||||
this.saveWindowPositionToolStripMenuItem.Text = "Save Window Position";
|
||||
this.saveWindowPositionToolStripMenuItem.Click += new System.EventHandler(this.saveWindowPositionToolStripMenuItem_Click);
|
||||
//
|
||||
// definePreviousValueToolStripMenuItem
|
||||
//
|
||||
this.definePreviousValueToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.sinceLastSearchToolStripMenuItem,
|
||||
this.sinceLastChangeToolStripMenuItem,
|
||||
this.sinceLastFrameToolStripMenuItem});
|
||||
this.definePreviousValueToolStripMenuItem.Name = "definePreviousValueToolStripMenuItem";
|
||||
this.definePreviousValueToolStripMenuItem.Size = new System.Drawing.Size(204, 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(170, 22);
|
||||
this.sinceLastSearchToolStripMenuItem.Text = "Since last Search";
|
||||
this.sinceLastSearchToolStripMenuItem.Click += new System.EventHandler(this.sinceLastSearchToolStripMenuItem_Click);
|
||||
//
|
||||
// sinceLastChangeToolStripMenuItem
|
||||
//
|
||||
this.sinceLastChangeToolStripMenuItem.Name = "sinceLastChangeToolStripMenuItem";
|
||||
this.sinceLastChangeToolStripMenuItem.Size = new System.Drawing.Size(170, 22);
|
||||
this.sinceLastChangeToolStripMenuItem.Text = "Since last Change";
|
||||
this.sinceLastChangeToolStripMenuItem.Click += new System.EventHandler(this.sinceLastChangeToolStripMenuItem_Click);
|
||||
//
|
||||
// sinceLastFrameToolStripMenuItem
|
||||
//
|
||||
this.sinceLastFrameToolStripMenuItem.Name = "sinceLastFrameToolStripMenuItem";
|
||||
this.sinceLastFrameToolStripMenuItem.Size = new System.Drawing.Size(170, 22);
|
||||
this.sinceLastFrameToolStripMenuItem.Text = "Since last Frame";
|
||||
this.sinceLastFrameToolStripMenuItem.Click += new System.EventHandler(this.sinceLastFrameToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripContainer1
|
||||
//
|
||||
this.toolStripContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
|
@ -485,7 +522,7 @@
|
|||
this.UndotoolStripButton});
|
||||
this.toolStrip1.Location = new System.Drawing.Point(3, 25);
|
||||
this.toolStrip1.Name = "toolStrip1";
|
||||
this.toolStrip1.Size = new System.Drawing.Size(133, 25);
|
||||
this.toolStrip1.Size = new System.Drawing.Size(102, 25);
|
||||
this.toolStrip1.TabIndex = 1;
|
||||
//
|
||||
// NewSearchtoolStripButton
|
||||
|
@ -1016,5 +1053,9 @@
|
|||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
|
||||
private System.Windows.Forms.ToolStripMenuItem addSelectedToRamWatchToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem pokeAddressToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem definePreviousValueToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem sinceLastSearchToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem sinceLastChangeToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem sinceLastFrameToolStripMenuItem;
|
||||
}
|
||||
}
|
|
@ -20,12 +20,18 @@ namespace BizHawk.MultiClient
|
|||
//Window position gets saved but doesn't load properly
|
||||
//Implement Preview search
|
||||
//Implement definitions of Previous value
|
||||
//TODO: multiple memory domains
|
||||
//Multiple memory domains
|
||||
//Option to remove current Ram Watch list from search list
|
||||
//Option to always remove Ram Watch list from search list
|
||||
//Truncate from file in File menu (and toolstrip?)
|
||||
//When a new ROM is loaded - run Start new Search (or just clear list?)
|
||||
//Save Dialog - user cancelling crashes, same for Ram Search
|
||||
|
||||
string systemID = "NULL";
|
||||
List<Watch> searchList = new List<Watch>();
|
||||
List<Watch> undoList = new List<Watch>();
|
||||
List<Watch> weededList = new List<Watch>(); //When addresses are weeded out, the new list goes here, before going into searchList
|
||||
List<Watch> prevList = new List<Watch>();
|
||||
|
||||
public enum SCompareTo { PREV, VALUE, ADDRESS, CHANGES };
|
||||
public enum SOperator { LESS, GREATER, LESSEQUAL, GREATEREQUAL, EQUAL, NOTEQUAL, DIFFBY };
|
||||
|
@ -468,6 +474,7 @@ namespace BizHawk.MultiClient
|
|||
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)
|
||||
|
@ -1248,7 +1255,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.Compare(currentSearchFile, "") == 0) return;
|
||||
if (string.Compare(currentSearchFile, "") == 0) SaveAs();
|
||||
SaveSearchFile(currentSearchFile);
|
||||
}
|
||||
|
||||
|
@ -1289,6 +1296,48 @@ namespace BizHawk.MultiClient
|
|||
pokeAddressToolStripMenuItem.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void sinceLastSearchToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.RamSearchPreviousAs = 0;
|
||||
}
|
||||
|
||||
private void sinceLastChangeToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.RamSearchPreviousAs = 1;
|
||||
}
|
||||
|
||||
private void sinceLastFrameToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.RamSearchPreviousAs = 2;
|
||||
}
|
||||
|
||||
private void definePreviousValueToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
switch (Global.Config.RamSearchPreviousAs)
|
||||
{
|
||||
case 0: //Since last Search
|
||||
sinceLastSearchToolStripMenuItem.Checked = true;
|
||||
sinceLastChangeToolStripMenuItem.Checked = false;
|
||||
sinceLastFrameToolStripMenuItem.Checked = false;
|
||||
break;
|
||||
case 1: //Since last Change
|
||||
sinceLastSearchToolStripMenuItem.Checked = false;
|
||||
sinceLastChangeToolStripMenuItem.Checked = true;
|
||||
sinceLastFrameToolStripMenuItem.Checked = false;
|
||||
break;
|
||||
case 2: //Since last Frame
|
||||
sinceLastSearchToolStripMenuItem.Checked = false;
|
||||
sinceLastChangeToolStripMenuItem.Checked = true;
|
||||
sinceLastFrameToolStripMenuItem.Checked = false;
|
||||
break;
|
||||
default://Default to last search
|
||||
sinceLastSearchToolStripMenuItem.Checked = true;
|
||||
sinceLastChangeToolStripMenuItem.Checked = false;
|
||||
sinceLastFrameToolStripMenuItem.Checked = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue