Ram Search - implement data type, endian, and data size selections and ground work for integrating them into the start new search, and search functions

This commit is contained in:
andres.delikat 2011-02-20 23:15:28 +00:00
parent da31963df5
commit dc61f89e20
3 changed files with 115 additions and 46 deletions

View File

@ -65,7 +65,7 @@
this.DataSizetoolStripSplitButton1 = new System.Windows.Forms.ToolStripSplitButton(); this.DataSizetoolStripSplitButton1 = new System.Windows.Forms.ToolStripSplitButton();
this.byteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.byteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.bytesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.bytesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.bytesToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.dWordToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.DataTypetoolStripSplitButton1 = new System.Windows.Forms.ToolStripSplitButton(); this.DataTypetoolStripSplitButton1 = new System.Windows.Forms.ToolStripSplitButton();
this.unsignedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.unsignedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.signedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.signedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -426,7 +426,7 @@
this.EndiantoolSplitButton}); this.EndiantoolSplitButton});
this.toolStrip2.Location = new System.Drawing.Point(3, 50); this.toolStrip2.Location = new System.Drawing.Point(3, 50);
this.toolStrip2.Name = "toolStrip2"; this.toolStrip2.Name = "toolStrip2";
this.toolStrip2.Size = new System.Drawing.Size(206, 25); this.toolStrip2.Size = new System.Drawing.Size(208, 25);
this.toolStrip2.TabIndex = 2; this.toolStrip2.TabIndex = 2;
// //
// DataSizetoolStripSplitButton1 // DataSizetoolStripSplitButton1
@ -435,8 +435,7 @@
this.DataSizetoolStripSplitButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.DataSizetoolStripSplitButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.byteToolStripMenuItem, this.byteToolStripMenuItem,
this.bytesToolStripMenuItem, this.bytesToolStripMenuItem,
this.bytesToolStripMenuItem1}); this.dWordToolStripMenuItem1});
this.DataSizetoolStripSplitButton1.Enabled = false;
this.DataSizetoolStripSplitButton1.Image = ((System.Drawing.Image)(resources.GetObject("DataSizetoolStripSplitButton1.Image"))); this.DataSizetoolStripSplitButton1.Image = ((System.Drawing.Image)(resources.GetObject("DataSizetoolStripSplitButton1.Image")));
this.DataSizetoolStripSplitButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.DataSizetoolStripSplitButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.DataSizetoolStripSplitButton1.Name = "DataSizetoolStripSplitButton1"; this.DataSizetoolStripSplitButton1.Name = "DataSizetoolStripSplitButton1";
@ -450,18 +449,21 @@
this.byteToolStripMenuItem.Name = "byteToolStripMenuItem"; this.byteToolStripMenuItem.Name = "byteToolStripMenuItem";
this.byteToolStripMenuItem.Size = new System.Drawing.Size(121, 22); this.byteToolStripMenuItem.Size = new System.Drawing.Size(121, 22);
this.byteToolStripMenuItem.Text = "1 Byte"; this.byteToolStripMenuItem.Text = "1 Byte";
this.byteToolStripMenuItem.Click += new System.EventHandler(this.byteToolStripMenuItem_Click);
// //
// bytesToolStripMenuItem // bytesToolStripMenuItem
// //
this.bytesToolStripMenuItem.Name = "bytesToolStripMenuItem"; this.bytesToolStripMenuItem.Name = "bytesToolStripMenuItem";
this.bytesToolStripMenuItem.Size = new System.Drawing.Size(121, 22); this.bytesToolStripMenuItem.Size = new System.Drawing.Size(121, 22);
this.bytesToolStripMenuItem.Text = "2 Bytes"; this.bytesToolStripMenuItem.Text = "2 Bytes";
this.bytesToolStripMenuItem.Click += new System.EventHandler(this.bytesToolStripMenuItem_Click);
// //
// bytesToolStripMenuItem1 // dWordToolStripMenuItem1
// //
this.bytesToolStripMenuItem1.Name = "bytesToolStripMenuItem1"; this.dWordToolStripMenuItem1.Name = "dWordToolStripMenuItem1";
this.bytesToolStripMenuItem1.Size = new System.Drawing.Size(121, 22); this.dWordToolStripMenuItem1.Size = new System.Drawing.Size(121, 22);
this.bytesToolStripMenuItem1.Text = "4 Bytes"; this.dWordToolStripMenuItem1.Text = "4 Bytes";
this.dWordToolStripMenuItem1.Click += new System.EventHandler(this.dWordToolStripMenuItem1_Click);
// //
// DataTypetoolStripSplitButton1 // DataTypetoolStripSplitButton1
// //
@ -508,7 +510,7 @@
this.EndiantoolSplitButton.Image = ((System.Drawing.Image)(resources.GetObject("EndiantoolSplitButton.Image"))); this.EndiantoolSplitButton.Image = ((System.Drawing.Image)(resources.GetObject("EndiantoolSplitButton.Image")));
this.EndiantoolSplitButton.ImageTransparentColor = System.Drawing.Color.Magenta; this.EndiantoolSplitButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.EndiantoolSplitButton.Name = "EndiantoolSplitButton"; this.EndiantoolSplitButton.Name = "EndiantoolSplitButton";
this.EndiantoolSplitButton.Size = new System.Drawing.Size(55, 22); this.EndiantoolSplitButton.Size = new System.Drawing.Size(55, 17);
this.EndiantoolSplitButton.Text = "Endian"; this.EndiantoolSplitButton.Text = "Endian";
// //
// bigEndianToolStripMenuItem // bigEndianToolStripMenuItem
@ -516,14 +518,16 @@
this.bigEndianToolStripMenuItem.Checked = true; this.bigEndianToolStripMenuItem.Checked = true;
this.bigEndianToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; this.bigEndianToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
this.bigEndianToolStripMenuItem.Name = "bigEndianToolStripMenuItem"; this.bigEndianToolStripMenuItem.Name = "bigEndianToolStripMenuItem";
this.bigEndianToolStripMenuItem.Size = new System.Drawing.Size(143, 22); this.bigEndianToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.bigEndianToolStripMenuItem.Text = "Big Endian"; this.bigEndianToolStripMenuItem.Text = "Big Endian";
this.bigEndianToolStripMenuItem.Click += new System.EventHandler(this.bigEndianToolStripMenuItem_Click);
// //
// littleEndianToolStripMenuItem // littleEndianToolStripMenuItem
// //
this.littleEndianToolStripMenuItem.Name = "littleEndianToolStripMenuItem"; this.littleEndianToolStripMenuItem.Name = "littleEndianToolStripMenuItem";
this.littleEndianToolStripMenuItem.Size = new System.Drawing.Size(143, 22); this.littleEndianToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.littleEndianToolStripMenuItem.Text = "Little Endian"; this.littleEndianToolStripMenuItem.Text = "Little Endian";
this.littleEndianToolStripMenuItem.Click += new System.EventHandler(this.littleEndianToolStripMenuItem_Click);
// //
// CompareToBox // CompareToBox
// //
@ -843,7 +847,7 @@
private System.Windows.Forms.ToolStripSplitButton DataSizetoolStripSplitButton1; private System.Windows.Forms.ToolStripSplitButton DataSizetoolStripSplitButton1;
private System.Windows.Forms.ToolStripMenuItem byteToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem byteToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem bytesToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem bytesToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem bytesToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem dWordToolStripMenuItem1;
private System.Windows.Forms.ToolStripSplitButton DataTypetoolStripSplitButton1; private System.Windows.Forms.ToolStripSplitButton DataTypetoolStripSplitButton1;
private System.Windows.Forms.ToolStripMenuItem signedToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem signedToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem unsignedToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem unsignedToolStripMenuItem;

View File

@ -224,6 +224,38 @@ namespace BizHawk.MultiClient
StartNewSearch(); StartNewSearch();
} }
private asigned GetDataType()
{
if (unsignedToolStripMenuItem.Checked)
return asigned.UNSIGNED;
if (signedToolStripMenuItem.Checked)
return asigned.SIGNED;
if (hexadecimalToolStripMenuItem.Checked)
return asigned.HEX;
return asigned.UNSIGNED; //Just in case
}
private atype GetDataSize()
{
if (byteToolStripMenuItem.Checked)
return atype.BYTE;
if (bytesToolStripMenuItem.Checked)
return atype.WORD;
if (dWordToolStripMenuItem1.Checked)
return atype.DWORD;
return atype.BYTE;
}
private bool GetBigEndian()
{
if (bigEndianToolStripMenuItem.Checked)
return true;
else
return false;
}
private void StartNewSearch() private void StartNewSearch()
{ {
searchList.Clear(); searchList.Clear();
@ -342,11 +374,11 @@ namespace BizHawk.MultiClient
} }
if (column == 1) if (column == 1)
{ {
if (unsignedToolStripMenuItem.Checked) if (searchList[index].signed == asigned.UNSIGNED)
text = searchList[index].value.ToString(); text = searchList[index].value.ToString();
else if (signedToolStripMenuItem.Checked) else if (searchList[index].signed == asigned.SIGNED)
text = ((sbyte)searchList[index].value).ToString(); text = ((sbyte)searchList[index].value).ToString();
else if (hexadecimalToolStripMenuItem.Checked) else if (searchList[index].signed == asigned.HEX)
text = searchList[index].value.ToString("X"); text = searchList[index].value.ToString("X");
} }
@ -727,5 +759,38 @@ namespace BizHawk.MultiClient
AddToRamWatch(); AddToRamWatch();
} }
} }
private void byteToolStripMenuItem_Click(object sender, EventArgs e)
{
byteToolStripMenuItem.Checked = true;
bytesToolStripMenuItem.Checked = false;
dWordToolStripMenuItem1.Checked = false;
}
private void bytesToolStripMenuItem_Click(object sender, EventArgs e)
{
byteToolStripMenuItem.Checked = false;
bytesToolStripMenuItem.Checked = true;
dWordToolStripMenuItem1.Checked = false;
}
private void dWordToolStripMenuItem1_Click(object sender, EventArgs e)
{
byteToolStripMenuItem.Checked = false;
bytesToolStripMenuItem.Checked = false;
dWordToolStripMenuItem1.Checked = true;
}
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;
}
} }
} }

View File

@ -171,37 +171,6 @@
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>259, 17</value> <value>259, 17</value>
</metadata> </metadata>
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAjpJREFUOE+Nkl9I
U2EYxl0RQuFQI7oIuqno30U3XXoRVCAJXbibWkTgRRd2MZoZjcks12iptLQIIsi2Ylu2dJrQFslkljZo
rXWxtalMsZVIus2xTFc9PefslFnH6oMf34Hv/J73fb9zFEV/WXq9S1u2a5Nm1erizaWl5UW52ZnsZDR+
p9l41EgtTfIr6lfafNaxZAZTeSD4GXg6CwxlgXuhHE7rOiMUt5Ni2QCLZaDGH09BWNPzgO8j4EoA7kmg
Pw0432RRVaV5LIX8mXHLER4MfgKic4CXki8D+HPA8ALwjIFDPDvT3JeleUyuA4Xdl0SAgvc9W2cjQXYS
JSPkLQl/Aa65XoJyk2zA3f5CQOdYoXKEUpJwEnwgMXKzVwxolw24evtFwM+2e96xXbYtVBZk3ic4AeLE
ZOmeXzGgocF2wR5IYYB3IMwstD1F+DHEFZ/JoqLi+IjsCPmuQ02Puh1PzC0PcD+UwXOOEP5a6GKUjKdy
0NS1TFO2EvWyERYfVtq+eVQItR6BTqudUKvrY+dbvbkb7lfoGh5HR8frfLVKM0rJRmrJtp8Bi86Dohwx
HoBDp8OpWnOCh23kHLkozXudu0n6fIJc+JGEtuFVIWbaL8qNjfa5kpL1Lh6dJLvJFrKD7CRbyQayRpQX
3Idr4KleJiuV5b080pE9UhUF919ZGr2v/cRgwrwPzrN1YmVJ1vONvWStJC4Jvz8ZDAbP5XpBtqaVyrIe
nv+Q1/1TlsI2SpdyibtWqvzf8nekLoIPBKj+ywAAAABJRU5ErkJggg==
</value>
</data>
<data name="ClearChangeCountstoolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAgxJREFUOE+lkvtL
U2EYx+0PEbtpFwnBKPGKiJImGP0gYhIYs1E5GF5gIxkpA00JRSmMEF0ohMh+GaRWYlqabMVcNdS2QpaI
VqiDIYhk397vA6fXhCjyhYdzeM/5fp7vczkAdeL2cwho7v/wWzT1zcN+Pwhr51uY2/y41PQaF+wzKKiZ
QvaN58g0jyLd5KEUcQbg+84P/Cm2tncQjW3j68YWIqubCC3FcOJc478BAuGoZM6zvoRnakXEruEIjhc4
/g5gZop9c+voGAyLbQIfeBZxLL9BA1jzXvuGbWamuKh+GmmVbswE19A59FEBbmoAG7YbsLtm2mZmiml9
cvabNDwpz6YB7LYBoMXCumkJr7LOmnnHzBQ/9X2Bo2cOibm1GsBREbAQiYmw/8lnuCeWkVzcgnZlnw1j
3HV/wuNXK6i/9x5Hc6wawDlTXHbLJ+LZUBQPRyKwdQdxutwl1h+NLXHh5Ht1ewBHsiwawCW57HyDAfWR
dvl0uhZQ1eqX8aVc7EKLqrum651ATLf9OJx5XQM4KmY0xPzZ0hFAiQJnXB0WwME0E3IsL5B17ZlADqWb
NYDrOepdlcysmTWWOrxqbceRWtaLk0VO1XW72D5Vckd2gMBfq8zdpmUG62NJvKM4+XyziDk24xmfWoGE
s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC
</value>
</data>
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>358, 17</value> <value>358, 17</value>
</metadata> </metadata>
@ -248,6 +217,37 @@
dvl0uhZQ1eqX8aVc7EKLqrum651ATLf9OJx5XQM4KmY0xPzZ0hFAiQJnXB0WwME0E3IsL5B17ZlADqWb dvl0uhZQ1eqX8aVc7EKLqrum651ATLf9OJx5XQM4KmY0xPzZ0hFAiQJnXB0WwME0E3IsL5B17ZlADqWb
NYDrOepdlcysmTWWOrxqbceRWtaLk0VO1XW72D5Vckd2gMBfq8zdpmUG62NJvKM4+XyziDk24xmfWoGE NYDrOepdlcysmTWWOrxqbceRWtaLk0VO1XW72D5Vckd2gMBfq8zdpmUG62NJvKM4+XyziDk24xmfWoGE
s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC
</value>
</data>
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAjpJREFUOE+Nkl9I
U2EYxl0RQuFQI7oIuqno30U3XXoRVCAJXbibWkTgRRd2MZoZjcks12iptLQIIsi2Ylu2dJrQFslkljZo
rXWxtalMsZVIus2xTFc9PefslFnH6oMf34Hv/J73fb9zFEV/WXq9S1u2a5Nm1erizaWl5UW52ZnsZDR+
p9l41EgtTfIr6lfafNaxZAZTeSD4GXg6CwxlgXuhHE7rOiMUt5Ni2QCLZaDGH09BWNPzgO8j4EoA7kmg
Pw0432RRVaV5LIX8mXHLER4MfgKic4CXki8D+HPA8ALwjIFDPDvT3JeleUyuA4Xdl0SAgvc9W2cjQXYS
JSPkLQl/Aa65XoJyk2zA3f5CQOdYoXKEUpJwEnwgMXKzVwxolw24evtFwM+2e96xXbYtVBZk3ic4AeLE
ZOmeXzGgocF2wR5IYYB3IMwstD1F+DHEFZ/JoqLi+IjsCPmuQ02Puh1PzC0PcD+UwXOOEP5a6GKUjKdy
0NS1TFO2EvWyERYfVtq+eVQItR6BTqudUKvrY+dbvbkb7lfoGh5HR8frfLVKM0rJRmrJtp8Bi86Dohwx
HoBDp8OpWnOCh23kHLkozXudu0n6fIJc+JGEtuFVIWbaL8qNjfa5kpL1Lh6dJLvJFrKD7CRbyQayRpQX
3Idr4KleJiuV5b080pE9UhUF919ZGr2v/cRgwrwPzrN1YmVJ1vONvWStJC4Jvz8ZDAbP5XpBtqaVyrIe
nv+Q1/1TlsI2SpdyibtWqvzf8nekLoIPBKj+ywAAAABJRU5ErkJggg==
</value>
</data>
<data name="ClearChangeCountstoolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAgxJREFUOE+lkvtL
U2EYx+0PEbtpFwnBKPGKiJImGP0gYhIYs1E5GF5gIxkpA00JRSmMEF0ohMh+GaRWYlqabMVcNdS2QpaI
VqiDIYhk397vA6fXhCjyhYdzeM/5fp7vczkAdeL2cwho7v/wWzT1zcN+Pwhr51uY2/y41PQaF+wzKKiZ
QvaN58g0jyLd5KEUcQbg+84P/Cm2tncQjW3j68YWIqubCC3FcOJc478BAuGoZM6zvoRnakXEruEIjhc4
/g5gZop9c+voGAyLbQIfeBZxLL9BA1jzXvuGbWamuKh+GmmVbswE19A59FEBbmoAG7YbsLtm2mZmiml9
cvabNDwpz6YB7LYBoMXCumkJr7LOmnnHzBQ/9X2Bo2cOibm1GsBREbAQiYmw/8lnuCeWkVzcgnZlnw1j
3HV/wuNXK6i/9x5Hc6wawDlTXHbLJ+LZUBQPRyKwdQdxutwl1h+NLXHh5Ht1ewBHsiwawCW57HyDAfWR
dvl0uhZQ1eqX8aVc7EKLqrum651ATLf9OJx5XQM4KmY0xPzZ0hFAiQJnXB0WwME0E3IsL5B17ZlADqWb
NYDrOepdlcysmTWWOrxqbceRWtaLk0VO1XW72D5Vckd2gMBfq8zdpmUG62NJvKM4+XyziDk24xmfWoGE
s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC
</value> </value>
</data> </data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">