This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[NamedPartMetadata("CommandHistoryWindow"), Export(typeof(IDbgToolWindow))] | |
public class CommandHistoryWindow : IDbgToolWindow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Control GetToolWindowView(object parameter) | |
{ | |
return new HistoryControl { DataContext = this }; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ui:ToolWindowView | |
x:Class="WinDbgExt.History.HistoryControl" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:ui="clr-namespace:DbgX.Interfaces.UI;assembly=DbgX.Interfaces" | |
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" | |
ui:ToolWindowView.TabTitle="History" | |
mc:Ignorable="d" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.ObjectModel; | |
using System.ComponentModel.Composition; | |
using System.Text; | |
using System.Windows.Controls; | |
using DbgX.Interfaces; | |
using DbgX.Interfaces.Listeners; | |
using DbgX.Interfaces.Services; | |
namespace WinDbgExt.History |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ui:ToolWindowView | |
x:Class="WinDbgExt.History.HistoryControl" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:ui="clr-namespace:DbgX.Interfaces.UI;assembly=DbgX.Interfaces" | |
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" | |
ui:ToolWindowView.TabTitle="History" | |
mc:Ignorable="d" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Import] | |
private IDbgToolWindowManager _toolWindowManager; | |
public CommandHistoryWindow() | |
{ | |
History = new ObservableCollection<Tuple<string, string>>(); | |
OpenCommand = new DelegateCommand<string>(Open); | |
} | |
public DelegateCommand<string> OpenCommand { get; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ListBox x:Name="HistoryList" ItemsSource="{Binding Path=History}"> | |
<i:Interaction.Triggers> | |
<i:EventTrigger EventName="MouseDoubleClick"> | |
<i:InvokeCommandAction Command="{Binding Path=OpenCommand}" CommandParameter="{Binding Path=SelectedItem.Item2, ElementName=HistoryList}" /> | |
</i:EventTrigger> | |
</i:Interaction.Triggers> | |
<ListBox.ItemTemplate> | |
<DataTemplate> | |
<TextBlock Text="{Binding Path=Item1}" /> | |
</DataTemplate> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ComponentModel.Composition; | |
using System.Windows.Controls; | |
using DbgX.Interfaces; | |
using DbgX.Interfaces.Services; | |
namespace WinDbgExt.History | |
{ | |
[NamedPartMetadata("CommandWindow"), Export(typeof(IDbgToolWindow))] | |
public class CommandWindow : IDbgToolWindow | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<UserControl x:Class="WinDbgExt.History.CommandControl" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
mc:Ignorable="d" | |
d:DesignHeight="300" d:DesignWidth="300"> | |
<Grid> | |
<Grid.RowDefinitions> | |
<RowDefinition /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void AppendDmlOutput(string content) | |
{ | |
var paragraph = new Paragraph(); | |
ContentTextBox.Document.Blocks.Add(paragraph); |