Added delayed updating of custom tool windows i fthey werent open when the breakpoint was hit.

This commit is contained in:
Sentinel209_cp 2011-07-13 00:54:44 +00:00
parent 33a2cfb8bb
commit beb587aea0
4 changed files with 46 additions and 10 deletions

View file

@ -18,12 +18,15 @@ using System.Threading;
namespace Cosmos.Cosmos_VS_Windows {
public partial class AssemblyUC : UserControl {
public static byte[] mData;
protected string mCode;
public AssemblyUC() {
InitializeComponent();
mitmCopy.Click += new RoutedEventHandler(mitmCopy_Click);
Update(mData);
}
void mitmCopy_Click(object sender, RoutedEventArgs e) {

View file

@ -156,26 +156,44 @@ namespace Cosmos.Cosmos_VS_Windows
break;
case DwMsgType.Stack:
if (StackTW.mUC != null) {
StackTW.mUC.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate() {
if (StackTW.mUC != null)
{
StackTW.mUC.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate()
{
StackTW.mUC.UpdateStack(xMsg);
});
}
else
{
StackUC.mStackData = xMsg;
}
break;
case DwMsgType.Frame:
if (StackTW.mUC != null) {
StackTW.mUC.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate() {
if (StackTW.mUC != null)
{
StackTW.mUC.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate()
{
StackTW.mUC.UpdateFrame(xMsg);
});
}
else
{
StackUC.mFrameData = xMsg;
}
break;
case DwMsgType.Registers:
if (RegistersTW.mUC != null) {
RegistersTW.mUC.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate() {
RegistersTW.mUC.Update(xMsg);
});
if (RegistersTW.mUC != null)
{
RegistersTW.mUC.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate()
{
RegistersTW.mUC.Update(xMsg);
});
}
else
{
RegistersUC.mData = xMsg;
}
break;
@ -184,11 +202,17 @@ namespace Cosmos.Cosmos_VS_Windows
break;
case DwMsgType.AssemblySource:
if (AssemblyTW.mUC != null) {
AssemblyTW.mUC.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate() {
if (AssemblyTW.mUC != null)
{
AssemblyTW.mUC.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate()
{
AssemblyTW.mUC.Update(xMsg);
});
}
else
{
AssemblyUC.mData = xMsg;
}
break;
}
}

View file

@ -20,8 +20,11 @@ namespace Cosmos.Cosmos_VS_Windows
{
public partial class RegistersUC : UserControl
{
public static byte[] mData;
public RegistersUC() {
InitializeComponent();
Update(mData);
}
protected void UpdateRegisters(byte[] aData, int aOffset, DataBytesUC a32, DataBytesUC a16, DataBytesUC a8Hi, DataBytesUC a8Lo)

View file

@ -14,8 +14,14 @@ using System.Windows.Shapes;
namespace Cosmos.Cosmos_VS_Windows {
public partial class StackUC : UserControl {
public static byte[] mFrameData;
public static byte[] mStackData;
public StackUC() {
InitializeComponent();
UpdateFrame(mFrameData);
UpdateStack(mStackData);
}
public void UpdateFrame(byte[] aData) {