private void UpdateUI() { Mira.CallEnvironmentStack callEnvironments = runtime.CallEnvironments; RebuildCallStackListBox(callEnvironments); Mira.CallEnvironment topmostCallEnvironment = callEnvironments.Count == 0 ? null : callEnvironments.Peek(); Mira.Items topMostItems = topmostCallEnvironment == null ? runtime.CurrentRootItems : topmostCallEnvironment.Items; object topMostCurrentItem = topmostCallEnvironment?.CurrentItem; RebuildCodeTreeView(topMostItems, topMostCurrentItem); RebuildStackListBox(); }
private void OnCallStackListBoxSelectedIndexChanged(object sender, EventArgs e) { int index = frameStack.SelectedIndex; if (0 <= index && index < frameStack.Items.Count) { ListItem selectedItem = (ListItem)frameStack.Items[index]; Mira.CallEnvironment callEnvironment = (Mira.CallEnvironment)selectedItem.Tag; RebuildCodeTreeView(callEnvironment.Items, callEnvironment.CurrentItem); } }