-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResultsWindowControl.xaml
More file actions
224 lines (196 loc) · 7.22 KB
/
ResultsWindowControl.xaml
File metadata and controls
224 lines (196 loc) · 7.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<UserControl x:Class="ConsoleCompare.ResultsWindowControl"
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:vsshell="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.15.0"
xmlns:vsui="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.15.0"
xmlns:catalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog"
xmlns:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging"
Background="{DynamicResource {x:Static vsshell:VsBrushes.WindowKey}}"
Foreground="{DynamicResource {x:Static vsshell:VsBrushes.WindowTextKey}}"
mc:Ignorable="d"
d:DesignHeight="434.448" d:DesignWidth="539.8"
Name="MyToolWindow">
<!-- Create a template for "invisible" buttons that only show their content -->
<UserControl.Resources>
<ControlTemplate x:Key="ContentOnlyTemplate" TargetType="{x:Type Button}">
<ContentPresenter/>
</ControlTemplate>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30"/> <!-- Tool bar -->
<RowDefinition Height="32"/> <!-- Overall status -->
<RowDefinition Height="25"/> <!-- Text box labels -->
<RowDefinition Height="*"/> <!-- Text boxes -->
<RowDefinition Height="30"/> <!-- Comment status -->
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Top "tool" bar -->
<DockPanel
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="10,5,10,0"
Height="25"
VerticalAlignment="Top"
Background="{DynamicResource {x:Static vsshell:VsBrushes.WindowKey}}"
>
<Button
Name="ButtonCapture"
Click="ButtonCapture_Click"
Style="{DynamicResource {x:Static vsshell:VsResourceKeys.ButtonStyleKey}}"
MinWidth="5"
ToolTip="Run Application">
<!--
- NOTE: The above "Style" resource attrib works better than individually handling possible colors
- This seems to work mostly (only?) for interactive elements - can't find a style for labels
- Also keeps things visible in the damned designer
-->
<imaging:CrispImage Moniker="{x:Static catalog:KnownMonikers.Run}" />
</Button>
<Button
Name="ButtonStop"
Click="ButtonStop_Click"
Style="{DynamicResource {x:Static vsshell:VsResourceKeys.ButtonStyleKey}}"
MinWidth="5"
Margin="3,0,0,0"
ToolTip="Stop Application">
<imaging:CrispImage Moniker="{x:Static catalog:KnownMonikers.Stop}"/>
</Button>
<Button
Name="ButtonLoadSimile"
Click="ButtonLoadSimile_Click"
Style="{DynamicResource {x:Static vsshell:VsResourceKeys.ButtonStyleKey}}"
MinWidth="5"
Margin="20,0,0,0"
ToolTip="Open Simile File">
<imaging:CrispImage Moniker="{x:Static catalog:KnownMonikers.OpenTopic}"/>
</Button>
<!--
Link for image service / catalog:
https://learn.microsoft.com/en-us/visualstudio/extensibility/image-service-and-catalog?view=vs-2022
Download images: https://www.microsoft.com/en-us/download/details.aspx?id=35825
-->
<TextBlock
Text="Simile File: "
VerticalAlignment="Center"
Margin="5,0,0,0"
Width="Auto"/>
<TextBlock
Name="TextSimileFileName"
Text="No file loaded"
Width="Auto"
VerticalAlignment="Center"
Padding="3"
Background="{DynamicResource {x:Static vsshell:VsBrushes.AccentMediumKey}}"/>
</DockPanel>
<!-- Overall status bar -->
<StatusBar
Margin="5,8,5,0"
Grid.Row="1"
Grid.ColumnSpan="2"
Background="{DynamicResource {x:Static vsshell:VsBrushes.AccentMediumKey}}"
Foreground="{DynamicResource {x:Static vsshell:VsBrushes.StatusBarTextKey}}">
<StatusBarItem>
<imaging:CrispImage Margin="5,0,0,0" Name="StatusIcon" Moniker="{x:Static catalog:KnownMonikers.StatusOK}"/>
</StatusBarItem>
<StatusBarItem>
<TextBlock Name="LabelStatus" Text="Status:"/>
</StatusBarItem>
<StatusBarItem>
<TextBlock Name="TextStatus" Text="Loading..."/>
</StatusBarItem>
</StatusBar>
<!-- Output text box labels -->
<Label
Content="Program Output:"
Grid.Column="0"
Grid.Row="2"
HorizontalAlignment="Left"
Width="105"
Margin="10,0,0,0"
Foreground="{DynamicResource {x:Static vsshell:VsBrushes.WindowTextKey}}" Height="30" VerticalAlignment="Top"/>
<Label
Content="Expected Output:"
Grid.Column="1"
Grid.Row="2"
HorizontalAlignment="Left"
Width="105"
Margin="10,0,0,0"
Foreground="{DynamicResource {x:Static vsshell:VsBrushes.WindowTextKey}}" Height="30" VerticalAlignment="Top"/>
<!-- Output text boxes -->
<RichTextBox
Name="ProgramOutput"
Grid.Column="0"
Grid.Row="3"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Margin="5,5,5,5"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto"
FontFamily="Cascadia Code"
Foreground="White"
Background="Black"
IsReadOnly="True"
ScrollViewer.ScrollChanged="SyncScrollChanged"
FontSize="14"/>
<RichTextBox
Name="ExpectedOutput"
Grid.Column="1"
Grid.Row="3"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Margin="5,5,5,5"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto"
FontFamily="Cascadia Code"
Background="Black"
Foreground="White"
IsReadOnly="True"
ScrollViewer.ScrollChanged="SyncScrollChanged"
FontSize="14"/>
<!-- Comment status bar -->
<StatusBar
Name="CommentStatusBar"
Margin="5,0,5,0"
Grid.Row="4"
Grid.ColumnSpan="2"
Background="{DynamicResource {x:Static vsshell:VsBrushes.AccentMediumKey}}"
Foreground="{DynamicResource {x:Static vsshell:VsBrushes.StatusBarTextKey}}">
<StatusBarItem>
<Button
Name="ButtonComments"
Click="ButtonComments_Click"
Style="{DynamicResource {x:Static vsshell:VsResourceKeys.ButtonStyleKey}}"
MinWidth="5"
Margin="0,0,0,0"
ToolTip="Check for comments on classes, methods and properties">
<imaging:CrispImage Name="CommentIcon" Moniker="{x:Static catalog:KnownMonikers.DescriptionViewer}"/>
</Button>
</StatusBarItem>
<!--
- Removing extra icon now that the button is on the same line
- Also used existing name "CommentIcon" for the icon in the button
<StatusBarItem>
<imaging:CrispImage Margin="5,0,0,0" Name="CommentIcon" Moniker="{x:Static catalog:KnownMonikers.Comment}"/>
</StatusBarItem>
-->
<StatusBarItem>
<TextBlock Name="LabelComments" Text="Comments:"/>
</StatusBarItem>
<StatusBarItem>
<Button Name="Button_TextComments" Template="{StaticResource ContentOnlyTemplate}" Click="TextComments_Click">
<TextBlock
Name="TextComments"
Foreground="{DynamicResource {x:Static vsshell:VsBrushes.StatusBarTextKey}}"
Text="Run comparison or click comment button to analyze code comments"/>
</Button>
</StatusBarItem>
</StatusBar>
</Grid>
</UserControl>