-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
137 lines (135 loc) · 6.49 KB
/
MainWindow.xaml
File metadata and controls
137 lines (135 loc) · 6.49 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
<Window x:Class="SQLTriage.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:SQLTriage"
Title="SQLTriage"
Height="900" Width="1400"
WindowState="Maximized"
Background="#1a1a2e" WindowStartupLocation="CenterScreen" Icon="/SQLTriage.png"
Closing="Window_Closing">
<Grid>
<!-- Blazor WebView — added dynamically in code-behind only when WebView2 is available -->
<ContentControl x:Name="WebViewHost" />
<!-- WebView2 Error Overlay -->
<Grid x:Name="WebView2ErrorOverlay" Visibility="Collapsed" Background="#E0000000">
<Border Background="#1a1a2e"
BorderBrush="#ff4444"
BorderThickness="2"
CornerRadius="10"
Padding="40"
HorizontalAlignment="Center"
VerticalAlignment="Center"
MaxWidth="600">
<Border.Effect>
<DropShadowEffect BlurRadius="20" ShadowDepth="0" Opacity="0.5"/>
</Border.Effect>
<StackPanel>
<TextBlock x:Name="WebView2ErrorTitle"
Text="WebView2 Runtime Required"
FontFamily="Consolas"
FontSize="28"
Foreground="#ff4444"
FontWeight="Bold"
Margin="0,0,0,20"/>
<TextBlock x:Name="WebView2ErrorMessage"
FontFamily="Consolas"
FontSize="14"
Foreground="#ffffff"
TextWrapping="Wrap"
Margin="0,0,0,20"/>
<TextBlock Text="Installation Options:"
FontFamily="Consolas"
FontSize="16"
Foreground="#00ff88"
FontWeight="Bold"
Margin="0,0,0,10"/>
<TextBlock FontFamily="Consolas"
FontSize="12"
Foreground="#aaaaaa"
TextWrapping="Wrap"
Margin="0,0,0,10">
1. Download and install WebView2 Runtime from:
https://developer.microsoft.com/en-us/microsoft-edge/webview2/
</TextBlock>
<TextBlock FontFamily="Consolas"
FontSize="12"
Foreground="#aaaaaa"
TextWrapping="Wrap"
Margin="0,0,0,20">
2. Or run this command as Administrator:
winget install Microsoft.WebView2
</TextBlock>
<Button x:Name="InstallWebView2Button"
Content="Auto-Install WebView2"
Click="OnInstallWebView2Click"
Padding="20,10"
FontFamily="Consolas"
FontSize="14"
Background="#00ff88"
Foreground="#1a1a2e"
BorderThickness="0"
Cursor="Hand"
HorizontalAlignment="Center"/>
<Button x:Name="RetryButton"
Content="Retry Connection"
Click="OnRetryClick"
Padding="20,10"
FontFamily="Consolas"
FontSize="14"
Background="#3a3a5e"
Foreground="#ffffff"
BorderThickness="0"
Cursor="Hand"
HorizontalAlignment="Center"
Margin="0,10,0,0"/>
<TextBlock Text="— or —"
FontFamily="Consolas"
FontSize="12"
Foreground="#666666"
HorizontalAlignment="Center"
Margin="0,15,0,5"/>
<Button x:Name="ServerModeButton"
Content=" Start Server Mode (no WebView2 needed)"
Click="OnServerModeClick"
Padding="20,10"
FontFamily="Consolas"
FontSize="14"
Background="#4488ff"
Foreground="#ffffff"
BorderThickness="0"
Cursor="Hand"
HorizontalAlignment="Center"/>
<TextBlock FontFamily="Consolas"
FontSize="11"
Foreground="#888888"
TextWrapping="Wrap"
TextAlignment="Center"
Margin="0,8,0,0">
Starts a web server — access via any browser, no WebView2 required
</TextBlock>
</StackPanel>
</Border>
</Grid>
<!-- Closing Dialog Overlay -->
<Grid x:Name="ClosingOverlay" Visibility="Collapsed" Background="#E0000000">
<Border Background="#1a1a2e"
BorderBrush="#3a3a5e"
BorderThickness="2"
CornerRadius="10"
Padding="40"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Border.Effect>
<DropShadowEffect BlurRadius="20" ShadowDepth="0" Opacity="0.5"/>
</Border.Effect>
<TextBlock x:Name="ClosingMessage"
Text="You awesome DBA you! Now go herd some more cats."
FontFamily="Consolas"
FontSize="24"
Foreground="#00ff88"
TextWrapping="Wrap"
TextAlignment="Center"/>
</Border>
</Grid>
</Grid>
</Window>