mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-26 21:42:11 +00:00
Added delayed updating of custom tool windows i fthey werent open when the breakpoint was hit.
This commit is contained in:
parent
33a2cfb8bb
commit
beb587aea0
4 changed files with 46 additions and 10 deletions
|
|
@ -18,12 +18,15 @@ using System.Threading;
|
||||||
|
|
||||||
namespace Cosmos.Cosmos_VS_Windows {
|
namespace Cosmos.Cosmos_VS_Windows {
|
||||||
public partial class AssemblyUC : UserControl {
|
public partial class AssemblyUC : UserControl {
|
||||||
|
|
||||||
|
public static byte[] mData;
|
||||||
protected string mCode;
|
protected string mCode;
|
||||||
|
|
||||||
public AssemblyUC() {
|
public AssemblyUC() {
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
mitmCopy.Click += new RoutedEventHandler(mitmCopy_Click);
|
mitmCopy.Click += new RoutedEventHandler(mitmCopy_Click);
|
||||||
|
Update(mData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void mitmCopy_Click(object sender, RoutedEventArgs e) {
|
void mitmCopy_Click(object sender, RoutedEventArgs e) {
|
||||||
|
|
|
||||||
|
|
@ -156,26 +156,44 @@ namespace Cosmos.Cosmos_VS_Windows
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DwMsgType.Stack:
|
case DwMsgType.Stack:
|
||||||
if (StackTW.mUC != null) {
|
if (StackTW.mUC != null)
|
||||||
StackTW.mUC.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate() {
|
{
|
||||||
|
StackTW.mUC.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate()
|
||||||
|
{
|
||||||
StackTW.mUC.UpdateStack(xMsg);
|
StackTW.mUC.UpdateStack(xMsg);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
StackUC.mStackData = xMsg;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DwMsgType.Frame:
|
case DwMsgType.Frame:
|
||||||
if (StackTW.mUC != null) {
|
if (StackTW.mUC != null)
|
||||||
StackTW.mUC.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate() {
|
{
|
||||||
|
StackTW.mUC.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate()
|
||||||
|
{
|
||||||
StackTW.mUC.UpdateFrame(xMsg);
|
StackTW.mUC.UpdateFrame(xMsg);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
StackUC.mFrameData = xMsg;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DwMsgType.Registers:
|
case DwMsgType.Registers:
|
||||||
if (RegistersTW.mUC != null) {
|
if (RegistersTW.mUC != null)
|
||||||
RegistersTW.mUC.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate() {
|
{
|
||||||
RegistersTW.mUC.Update(xMsg);
|
RegistersTW.mUC.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate()
|
||||||
});
|
{
|
||||||
|
RegistersTW.mUC.Update(xMsg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RegistersUC.mData = xMsg;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -184,11 +202,17 @@ namespace Cosmos.Cosmos_VS_Windows
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DwMsgType.AssemblySource:
|
case DwMsgType.AssemblySource:
|
||||||
if (AssemblyTW.mUC != null) {
|
if (AssemblyTW.mUC != null)
|
||||||
AssemblyTW.mUC.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate() {
|
{
|
||||||
|
AssemblyTW.mUC.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate()
|
||||||
|
{
|
||||||
AssemblyTW.mUC.Update(xMsg);
|
AssemblyTW.mUC.Update(xMsg);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AssemblyUC.mData = xMsg;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,11 @@ namespace Cosmos.Cosmos_VS_Windows
|
||||||
{
|
{
|
||||||
public partial class RegistersUC : UserControl
|
public partial class RegistersUC : UserControl
|
||||||
{
|
{
|
||||||
|
public static byte[] mData;
|
||||||
|
|
||||||
public RegistersUC() {
|
public RegistersUC() {
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
Update(mData);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void UpdateRegisters(byte[] aData, int aOffset, DataBytesUC a32, DataBytesUC a16, DataBytesUC a8Hi, DataBytesUC a8Lo)
|
protected void UpdateRegisters(byte[] aData, int aOffset, DataBytesUC a32, DataBytesUC a16, DataBytesUC a8Hi, DataBytesUC a8Lo)
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,14 @@ using System.Windows.Shapes;
|
||||||
|
|
||||||
namespace Cosmos.Cosmos_VS_Windows {
|
namespace Cosmos.Cosmos_VS_Windows {
|
||||||
public partial class StackUC : UserControl {
|
public partial class StackUC : UserControl {
|
||||||
|
|
||||||
|
public static byte[] mFrameData;
|
||||||
|
public static byte[] mStackData;
|
||||||
|
|
||||||
public StackUC() {
|
public StackUC() {
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
UpdateFrame(mFrameData);
|
||||||
|
UpdateStack(mStackData);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateFrame(byte[] aData) {
|
public void UpdateFrame(byte[] aData) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue