Ram Search - refactor QueryItemText to use the new built in ToString methods of the Watch object

This commit is contained in:
andres.delikat 2011-09-12 23:29:04 +00:00
parent ffc28123b3
commit 33a8d1ee0c
1 changed files with 3 additions and 43 deletions

View File

@ -575,25 +575,7 @@ namespace BizHawk.MultiClient
}
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;
}
}
text = searchList[index].ValueToString();
}
if (column == 2)
{
@ -615,33 +597,11 @@ namespace BizHawk.MultiClient
{
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;
}
text = searchList[index].PrevToString();
}
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;
}
text = prevList[index].ValueToString();
}
}
}