// Invoked when we change the selection on the list box. // This will change the current active frame in the debugger and refresh. private void listBoxCallstack_DoubleClicked(object sender, EventArgs e) { object o = this.listBoxCallstack.SelectedItem; FramePair pair = (FramePair)o; MDbgFrame f = pair.m_frame; if (f == null) { return; } MainForm.ExecuteOnWorkerThreadIfStoppedAndBlock(delegate(MDbgProcess proc) { Debug.Assert(proc != null); Debug.Assert(!proc.IsRunning); // Update callstack MDbgThread t = proc.Threads.Active; try { t.CurrentFrame = f; } catch (InvalidOperationException) { // if it throws an invalid op, then that means our frames somehow got out of sync // and we weren't fully refreshed. return; } } // end delegate ); // Need to refresh UI to show update. this.MainForm.ShowCurrentLocation(); this.MainForm.Invalidate(); } // end listBoxCallstack_DoubleClicked
public FrightenedSpritesheet(FramePair blue, FramePair white) { Blue = blue; White = white; }
public Vector2 GetSourcePosition(Direction direction, bool useFirstFrame) { FramePair frame = _frames[direction]; return(useFirstFrame ? frame.First : frame.Second); }