Ram Watch - scrap the previous as last change feature in favor of a Previous as original value option
This commit is contained in:
parent
9816a04a4f
commit
776a314eb8
|
@ -15,6 +15,7 @@ namespace BizHawk.MultiClient
|
|||
//TODO:
|
||||
//If signed/unsigned/hex radios selected, auto-change the value box
|
||||
//Checked signed/u/h value on RamPoke_Load and set value appopriately
|
||||
//Memory domain selection
|
||||
public Watch watch = new Watch();
|
||||
public Point location = new Point();
|
||||
|
||||
|
|
|
@ -66,12 +66,11 @@
|
|||
this.addSelectedToRamWatchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.pokeAddressToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
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.restoreOriginalWindowSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveWindowPositionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.previewModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();
|
||||
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
||||
|
@ -114,6 +113,7 @@
|
|||
this.AutoSearchCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.MemDomainLabel = new System.Windows.Forms.Label();
|
||||
this.OutputLabel = new System.Windows.Forms.Label();
|
||||
this.originalValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.SearchtoolStrip1.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.toolStripContainer1.TopToolStripPanel.SuspendLayout();
|
||||
|
@ -449,6 +449,31 @@
|
|||
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(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(166, 22);
|
||||
this.sinceLastSearchToolStripMenuItem.Text = "Since last Search";
|
||||
this.sinceLastSearchToolStripMenuItem.Click += new System.EventHandler(this.sinceLastSearchToolStripMenuItem_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";
|
||||
|
@ -462,38 +487,6 @@
|
|||
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);
|
||||
//
|
||||
// previewModeToolStripMenuItem
|
||||
//
|
||||
this.previewModeToolStripMenuItem.Name = "previewModeToolStripMenuItem";
|
||||
|
@ -848,7 +841,7 @@
|
|||
// NotEqualToRadio
|
||||
//
|
||||
this.NotEqualToRadio.AutoSize = true;
|
||||
this.NotEqualToRadio.Location = new System.Drawing.Point(7, 114);
|
||||
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;
|
||||
|
@ -859,10 +852,12 @@
|
|||
// EqualToRadio
|
||||
//
|
||||
this.EqualToRadio.AutoSize = true;
|
||||
this.EqualToRadio.Location = new System.Drawing.Point(7, 95);
|
||||
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);
|
||||
|
@ -870,7 +865,7 @@
|
|||
// GreaterThanOrEqualToRadio
|
||||
//
|
||||
this.GreaterThanOrEqualToRadio.AutoSize = true;
|
||||
this.GreaterThanOrEqualToRadio.Location = new System.Drawing.Point(7, 76);
|
||||
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;
|
||||
|
@ -881,7 +876,7 @@
|
|||
// LessThanOrEqualToRadio
|
||||
//
|
||||
this.LessThanOrEqualToRadio.AutoSize = true;
|
||||
this.LessThanOrEqualToRadio.Location = new System.Drawing.Point(7, 57);
|
||||
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;
|
||||
|
@ -892,7 +887,7 @@
|
|||
// GreaterThanRadio
|
||||
//
|
||||
this.GreaterThanRadio.AutoSize = true;
|
||||
this.GreaterThanRadio.Location = new System.Drawing.Point(7, 38);
|
||||
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;
|
||||
|
@ -903,12 +898,10 @@
|
|||
// LessThanRadio
|
||||
//
|
||||
this.LessThanRadio.AutoSize = true;
|
||||
this.LessThanRadio.Checked = true;
|
||||
this.LessThanRadio.Location = new System.Drawing.Point(7, 18);
|
||||
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.TabStop = true;
|
||||
this.LessThanRadio.Text = "Less Than";
|
||||
this.LessThanRadio.UseVisualStyleBackColor = true;
|
||||
this.LessThanRadio.CheckedChanged += new System.EventHandler(this.LessThanRadio_CheckedChanged);
|
||||
|
@ -944,6 +937,13 @@
|
|||
this.OutputLabel.TabIndex = 9;
|
||||
this.OutputLabel.Text = " ";
|
||||
//
|
||||
// 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);
|
||||
//
|
||||
// RamSearch
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -1070,8 +1070,8 @@
|
|||
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;
|
||||
private System.Windows.Forms.ToolStripMenuItem previewModeToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem originalValueToolStripMenuItem;
|
||||
}
|
||||
}
|
|
@ -29,6 +29,9 @@ namespace BizHawk.MultiClient
|
|||
//Weddedlist & undoList are getting references instead of copies, somehow still works but there has to be some failures as a result, fix
|
||||
//Add previous as original value option
|
||||
//Add button to set copy current values to prev
|
||||
//ON start new search, a preview of equal to prev value would remove all searches, there's an error here
|
||||
//On start new search, don't do preview
|
||||
|
||||
|
||||
string systemID = "NULL";
|
||||
List<Watch> searchList = new List<Watch>();
|
||||
|
@ -476,17 +479,21 @@ namespace BizHawk.MultiClient
|
|||
if (Global.Config.RamSearchPreviousAs == 2) //If prev frame
|
||||
text = searchList[index].prev.ToString();
|
||||
else
|
||||
text = prevList[index].value.ToString();
|
||||
//text = "urmom";
|
||||
|
||||
text = prevList[index].value.ToString();
|
||||
}
|
||||
else if (searchList[index].signed == asigned.SIGNED)
|
||||
{
|
||||
text = ((sbyte)searchList[index].prev).ToString();
|
||||
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)
|
||||
{
|
||||
text = searchList[index].prev.ToString("X");
|
||||
if (Global.Config.RamSearchPreviousAs == 2) //If prev frame
|
||||
text = searchList[index].prev.ToString("X");
|
||||
else
|
||||
text = prevList[index].value.ToString("X");
|
||||
}
|
||||
}
|
||||
if (column == 3)
|
||||
|
@ -619,7 +626,7 @@ namespace BizHawk.MultiClient
|
|||
private int GetPreviousValue(int pos)
|
||||
{
|
||||
if (Global.Config.RamSearchPreviousAs == 2) //If Previous frame
|
||||
return searchList[pos].prev; //TODO: return value based on user choice
|
||||
return searchList[pos].prev;
|
||||
else
|
||||
return prevList[pos].value;
|
||||
}
|
||||
|
@ -1361,38 +1368,38 @@ namespace BizHawk.MultiClient
|
|||
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 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;
|
||||
sinceLastChangeToolStripMenuItem.Checked = false;
|
||||
originalValueToolStripMenuItem.Checked = false;
|
||||
sinceLastFrameToolStripMenuItem.Checked = false;
|
||||
break;
|
||||
case 1: //Since last Change
|
||||
case 1: //Original value (since Start new search)
|
||||
sinceLastSearchToolStripMenuItem.Checked = false;
|
||||
sinceLastChangeToolStripMenuItem.Checked = true;
|
||||
originalValueToolStripMenuItem.Checked = true;
|
||||
sinceLastFrameToolStripMenuItem.Checked = false;
|
||||
break;
|
||||
case 2: //Since last Frame
|
||||
sinceLastSearchToolStripMenuItem.Checked = false;
|
||||
sinceLastChangeToolStripMenuItem.Checked = true;
|
||||
sinceLastFrameToolStripMenuItem.Checked = false;
|
||||
originalValueToolStripMenuItem.Checked = false;
|
||||
sinceLastFrameToolStripMenuItem.Checked = true;
|
||||
break;
|
||||
default://Default to last search
|
||||
sinceLastSearchToolStripMenuItem.Checked = true;
|
||||
sinceLastChangeToolStripMenuItem.Checked = false;
|
||||
originalValueToolStripMenuItem.Checked = false;
|
||||
sinceLastFrameToolStripMenuItem.Checked = false;
|
||||
break;
|
||||
}
|
||||
|
@ -1407,6 +1414,8 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
Global.Config.RamSearchPreviewMode ^= true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -160,6 +160,9 @@
|
|||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>259, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>358, 17</value>
|
||||
</metadata>
|
||||
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
|
@ -191,9 +194,6 @@
|
|||
s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>358, 17</value>
|
||||
</metadata>
|
||||
<data name="DataSizetoolStripSplitButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
|
|
|
@ -24,8 +24,9 @@ namespace BizHawk.MultiClient
|
|||
//Ability to watch in different memory domains
|
||||
|
||||
//IDEAS:
|
||||
//show a change count column?
|
||||
//Take advantage of the prev member to show amount changes from prev in a column?
|
||||
//OPtion to show a change count column
|
||||
//Option to show previous value
|
||||
//Option to show change from previous value
|
||||
|
||||
int defaultWidth; //For saving the default size of the dialog, so the user can restore if desired
|
||||
int defaultHeight;
|
||||
|
|
Loading…
Reference in New Issue