-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDiagnosticsView.xaml
More file actions
211 lines (192 loc) · 9.72 KB
/
Copy pathDiagnosticsView.xaml
File metadata and controls
211 lines (192 loc) · 9.72 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
<Window x:Class="GameTaskPlugin.DiagnosticsView"
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"
Title="GameTask — Diagnostics"
Width="1100" Height="640"
MinWidth="900" MinHeight="420"
WindowStartupLocation="CenterScreen"
ResizeMode="CanResize"
FontSize="13">
<Grid Margin="16">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Header -->
<TextBlock Grid.Row="0"
Text="GameTask Diagnostics"
FontSize="20" FontWeight="Bold"
Margin="0,0,0,6"/>
<!-- Summary -->
<TextBlock Grid.Row="1"
Text="{Binding Summary}"
FontSize="13" Foreground="Gray"
Margin="0,0,0,12"/>
<!-- Game list -->
<DataGrid Grid.Row="2"
ItemsSource="{Binding Games}"
AutoGenerateColumns="False"
IsReadOnly="False"
CanUserReorderColumns="False"
CanUserSortColumns="True"
GridLinesVisibility="Horizontal"
HeadersVisibility="Column"
SelectionMode="Single"
RowHeaderWidth="0"
RowHeight="38"
BorderThickness="1"
BorderBrush="#44888888">
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="FontSize" Value="13"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Padding" Value="8,6"/>
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
</Style>
</DataGrid.CellStyle>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Setter Property="FontSize" Value="13"/>
<Setter Property="Height" Value="38"/>
<Style.Triggers>
<DataTrigger Binding="{Binding HasIssue}" Value="True">
<Setter Property="Background" Value="#22FF3333"/>
<Setter Property="Foreground" Value="#FFCC3333"/>
<Setter Property="FontWeight" Value="SemiBold"/>
</DataTrigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
<DataGrid.Columns>
<!-- Game name -->
<DataGridTextColumn Header="Game"
Binding="{Binding Name}"
Width="*" MinWidth="160"
IsReadOnly="True">
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Padding" Value="8,0"/>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
<!-- Task status -->
<DataGridTextColumn Header="Task"
Binding="{Binding TaskStatus}"
Width="100" IsReadOnly="True">
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="FontSize" Value="14"/>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
<!-- Executable -->
<DataGridTextColumn Header="Executable"
Binding="{Binding ExeName}"
Width="160" IsReadOnly="True">
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Padding" Value="8,0"/>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
<!-- FocusGuard -->
<DataGridTextColumn Header="FocusGuard"
Binding="{Binding FocusStatus}"
Width="100" IsReadOnly="True">
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="FontSize" Value="14"/>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
<!-- Issue hint -->
<DataGridTextColumn Header="Issue / Note"
Binding="{Binding IssueHint}"
Width="200" IsReadOnly="True">
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Padding" Value="8,0"/>
<Setter Property="FontSize" Value="11"/>
<Setter Property="Foreground" Value="#FFAA4444"/>
<Setter Property="TextWrapping" Value="Wrap"/>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
<!-- Per-row action buttons -->
<DataGridTemplateColumn Header="Actions" Width="190" IsReadOnly="True">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal"
VerticalAlignment="Center"
Margin="4,0">
<Button Content="Repair"
Command="{Binding RepairCommand}"
Padding="7,3" Margin="0,0,4,0"
FontSize="11"
ToolTip="Re-apply launcher and action; queue task if missing"/>
<Button Content="Fix Exe"
Command="{Binding FixExeCommand}"
Padding="7,3" Margin="0,0,4,0"
FontSize="11"
ToolTip="Select the game executable manually"/>
<Button Content="Disable"
Command="{Binding DisableCommand}"
Padding="7,3"
FontSize="11"
ToolTip="Remove GameTask from this game"/>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
<!-- Footer -->
<Grid Grid.Row="3" Margin="0,14,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!-- Legend -->
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
<Border Width="14" Height="14" Background="#22FF3333"
BorderBrush="#FFCC3333" BorderThickness="1"
Margin="0,0,6,0"/>
<TextBlock Text="Game has issues (missing task or unknown executable)"
Foreground="Gray" FontSize="12" VerticalAlignment="Center"/>
</StackPanel>
<!-- Global buttons -->
<StackPanel Grid.Column="1" Orientation="Horizontal">
<Button Content="Fix All Unknown Executables"
Padding="12,7" Margin="0,0,8,0" FontSize="13"
Command="{Binding FixAllCommand}"/>
<Button Content="Repair All"
Padding="12,7" Margin="0,0,8,0" FontSize="13"
Command="{Binding RepairAllCommand}"/>
<Button Content="Refresh"
Padding="12,7" Margin="0,0,8,0" FontSize="13"
Command="{Binding RefreshCommand}"/>
<Button Content="Close"
Padding="12,7" FontSize="13"
IsCancel="True"
Click="CloseButton_Click"/>
</StackPanel>
</Grid>
</Grid>
</Window>