private static void UpdateDebugViews(object state) { PluginManager.Core.Invoke(new Action(async() => { SsjDebugger me = (SsjDebugger)state; var callStack = await me.Inferior.GetCallStack(); if (!me.Running) { await Panes.Inspector.SetCallStack(callStack); Panes.Inspector.Enabled = true; PluginManager.Core.Docking.Activate(Panes.Inspector); } }), null); }
private static void HandleFocusSwitch(object state) { PluginManager.Core.Invoke(new Action(() => { SsjDebugger me = (SsjDebugger)state; try { NativeMethods.SetForegroundWindow(me.m_engineProcess.MainWindowHandle); Panes.Inspector.Enabled = false; Panes.Inspector.Clear(); } catch (InvalidOperationException) { // this will be thrown by Process.MainWindowHandle if the process // is no longer running; we can safely ignore it. } }), null); }