From ff57733731801d968704a86de679331ebf5807b3 Mon Sep 17 00:00:00 2001 From: geramy_cp <9e7fa7e69b77621edd7e7a6d0b0a26a273ab818fdM2WcnSD> Date: Sun, 3 Feb 2013 11:54:51 +0000 Subject: [PATCH] Fixed the last two errors in Cosmos.VS.WindowsPackage no more debug crashing yay :) --- .../Cosmos.VS.WindowsPackage.cs | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/source2/VSIP/Cosmos.VS.Windows/Cosmos.VS.WindowsPackage.cs b/source2/VSIP/Cosmos.VS.Windows/Cosmos.VS.WindowsPackage.cs index dfd684012..ff0a38ee8 100644 --- a/source2/VSIP/Cosmos.VS.Windows/Cosmos.VS.WindowsPackage.cs +++ b/source2/VSIP/Cosmos.VS.Windows/Cosmos.VS.WindowsPackage.cs @@ -88,13 +88,8 @@ namespace Cosmos.VS.Windows { } protected void UpdateWindow(Type aWindowType, string aTag, byte[] aData) { - System.Windows.Threading.Dispatcher.CurrentDispatcher.Invoke(DispatcherPriority.Normal, - (Action)delegate() - { - var xWindow = FindWindow(aWindowType); - xWindow.UserControl.Update(aTag, aData); - } - ); + var xWindow = FindWindow(aWindowType); + xWindow.UserControl.Update(aTag, aData); } private void ShowWindowAssembly(object aCommand, EventArgs e) { @@ -226,11 +221,21 @@ namespace Cosmos.VS.Windows { break; case Debugger2Windows.PongVSIP: - UpdateWindow(typeof(InternalTW), null, Encoding.UTF8.GetBytes("Pong from VSIP")); + System.Windows.Threading.Dispatcher.CurrentDispatcher.Invoke(DispatcherPriority.Normal, + (Action)delegate() + { + UpdateWindow(typeof(InternalTW), null, Encoding.UTF8.GetBytes("Pong from VSIP")); + } + ); break; case Debugger2Windows.PongDebugStub: - UpdateWindow(typeof(InternalTW), null, Encoding.UTF8.GetBytes("Pong from DebugStub")); + System.Windows.Threading.Dispatcher.CurrentDispatcher.Invoke(DispatcherPriority.Normal, + (Action)delegate() + { + UpdateWindow(typeof(InternalTW), null, Encoding.UTF8.GetBytes("Pong from DebugStub")); + } + ); break; case Debugger2Windows.OutputPane: