Browse Source

Add ViewState handling and key navigation for DebugSteps

pull/728/merge
Siegfried Pammer 9 years ago
parent
commit
0366ba18e4
  1. 2
      ILSpy/DebugSteps.xaml
  2. 16
      ILSpy/DebugSteps.xaml.cs

2
ILSpy/DebugSteps.xaml

@ -7,7 +7,7 @@
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300"> d:DesignHeight="300" d:DesignWidth="300">
<Grid> <Grid>
<TreeView Name="tree" MouseDoubleClick="ShowStateAfter_Click"> <TreeView Name="tree" MouseDoubleClick="ShowStateAfter_Click" KeyDown="tree_KeyDown">
<TreeView.ItemTemplate> <TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Children}"> <HierarchicalDataTemplate ItemsSource="{Binding Children}">
<TextBlock Text="{Binding Description}" /> <TextBlock Text="{Binding Description}" />

16
ILSpy/DebugSteps.xaml.cs

@ -100,7 +100,21 @@ namespace ICSharpCode.ILSpy
void DecompileAsync(int step, bool isDebug = false) void DecompileAsync(int step, bool isDebug = false)
{ {
var window = MainWindow.Instance; var window = MainWindow.Instance;
window.TextView.DecompileAsync(window.CurrentLanguage, window.SelectedNodes, new DecompilationOptions() { StepLimit = step, IsDebug = isDebug }); var state = window.TextView.GetState();
window.TextView.DecompileAsync(window.CurrentLanguage, window.SelectedNodes,
new DecompilationOptions() {
StepLimit = step,
IsDebug = isDebug,
TextViewState = state
});
}
private void tree_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter || e.Key == Key.Return) {
ShowStateAfter_Click(sender, e);
e.Handled = true;
}
} }
} }
} }

Loading…
Cancel
Save