-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
282 lines (265 loc) · 16 KB
/
Copy pathMainWindow.xaml
File metadata and controls
282 lines (265 loc) · 16 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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<Window x:Class="ToastDesk.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="ToastDesk"
Height="620"
Width="980"
MinHeight="560"
MinWidth="860"
FontFamily="Segoe UI Variable, Segoe UI"
Background="{StaticResource AppBackgroundBrush}">
<Grid Margin="28">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<DockPanel Grid.Row="0" LastChildFill="True">
<StackPanel DockPanel.Dock="Right"
Orientation="Horizontal"
HorizontalAlignment="Right">
<Button x:Name="TestNotificationButton"
Style="{StaticResource PrimaryButtonStyle}"
MinWidth="164"
Margin="0,0,8,0"
Click="TestNotificationButton_Click">
Send Windows Toast
</Button>
<Button x:Name="EnableWindowsListenerButton"
Style="{StaticResource SecondaryButtonStyle}"
MinWidth="188"
Click="EnableWindowsListenerButton_Click">
Retry Windows Capture
</Button>
</StackPanel>
<StackPanel>
<TextBlock Text="ToastDesk"
FontSize="30"
FontWeight="SemiBold"
Foreground="{StaticResource TextBrush}" />
<TextBlock Text="Persistent desktop toast layer with Windows Notification Center capture."
Margin="0,6,0,0"
FontSize="14"
Foreground="{StaticResource TextMutedBrush}" />
</StackPanel>
</DockPanel>
<Border Grid.Row="1"
Margin="0,22,0,16"
Padding="18"
Background="{StaticResource PanelBrush}"
BorderBrush="{StaticResource BorderBrushSoft}"
BorderThickness="1"
CornerRadius="10">
<Border.Effect>
<StaticResource ResourceKey="CardShadow" />
</Border.Effect>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel>
<TextBlock Text="Windows Capture"
FontSize="13"
FontWeight="SemiBold"
Foreground="{StaticResource TextBrush}" />
<TextBlock x:Name="ListenerStatusText"
Margin="0,6,0,0"
Text="Starting Windows notification capture..."
Foreground="{StaticResource TextMutedBrush}"
TextWrapping="Wrap" />
</StackPanel>
<Button Grid.Column="1"
Style="{StaticResource SecondaryButtonStyle}"
MinWidth="128"
Margin="20,0,0,0"
Click="ClearNotificationsButton_Click">
Clear List
</Button>
</Grid>
</Border>
<TabControl Grid.Row="2">
<TabItem Header="Activity">
<Border Background="{StaticResource PanelBrush}"
BorderBrush="{StaticResource BorderBrushSoft}"
BorderThickness="1"
CornerRadius="10">
<Border.Effect>
<StaticResource ResourceKey="CardShadow" />
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Margin="18,16,18,12">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="3*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Text="Title" FontSize="12" FontWeight="SemiBold" Foreground="{StaticResource TextMutedBrush}" />
<TextBlock Grid.Column="1" Text="Message" FontSize="12" FontWeight="SemiBold" Foreground="{StaticResource TextMutedBrush}" />
<TextBlock Grid.Column="2" Text="Source" FontSize="12" FontWeight="SemiBold" Foreground="{StaticResource TextMutedBrush}" Margin="16,0" />
<TextBlock Grid.Column="3" Text="Time" FontSize="12" FontWeight="SemiBold" Foreground="{StaticResource TextMutedBrush}" />
</Grid>
<ListBox Grid.Row="1"
ItemsSource="{Binding NotificationStore.Notifications}"
BorderThickness="0"
Background="Transparent"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListBox.ItemTemplate>
<DataTemplate>
<Border Padding="16,12"
Background="{StaticResource PanelSubtleBrush}"
BorderBrush="{StaticResource BorderBrushSoft}"
BorderThickness="0,1,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="3*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Title}"
FontWeight="SemiBold"
Foreground="{StaticResource TextBrush}"
TextWrapping="Wrap" />
<TextBlock Grid.Column="1"
Text="{Binding Message}"
Foreground="{StaticResource TextMutedBrush}"
TextWrapping="Wrap"
Margin="16,0" />
<TextBlock Grid.Column="2"
Text="{Binding SourceDisplayName}"
Foreground="{StaticResource TextMutedBrush}"
Margin="16,0" />
<TextBlock Grid.Column="3"
Text="{Binding CreatedAtLocalText}"
Foreground="{StaticResource TextMutedBrush}" />
</Grid>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Border>
</TabItem>
<TabItem Header="Settings">
<Border Background="{StaticResource PanelBrush}"
BorderBrush="{StaticResource BorderBrushSoft}"
BorderThickness="1"
CornerRadius="10"
Padding="22">
<Border.Effect>
<StaticResource ResourceKey="CardShadow" />
</Border.Effect>
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel MaxWidth="680" HorizontalAlignment="Left">
<TextBlock Text="Startup"
FontSize="18"
FontWeight="SemiBold"
Foreground="{StaticResource TextBrush}" />
<TextBlock Text="Control how ToastDesk behaves when Windows or the app starts."
Margin="0,6,0,16"
Foreground="{StaticResource TextMutedBrush}"
TextWrapping="Wrap" />
<CheckBox Content="Start ToastDesk when I sign in to Windows"
IsChecked="{Binding Settings.StartWithWindows, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Content="Start minimized to the tray"
IsChecked="{Binding Settings.StartMinimized, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<Separator Margin="0,10,0,20" />
<TextBlock Text="Notifications"
FontSize="18"
FontWeight="SemiBold"
Foreground="{StaticResource TextBrush}" />
<TextBlock Text="Capture Windows notifications into the activity list and control whether ToastDesk shows its own overlay cards."
Margin="0,6,0,16"
Foreground="{StaticResource TextMutedBrush}"
TextWrapping="Wrap" />
<CheckBox Content="Enable Windows notification capture"
IsChecked="{Binding Settings.EnableWindowsCapture, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Content="Show ToastDesk overlay cards"
IsChecked="{Binding Settings.EnableToastOverlay, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Content="Do not disturb: keep capturing but hide overlay cards"
IsChecked="{Binding Settings.DoNotDisturb, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<Separator Margin="0,10,0,20" />
<TextBlock Text="Sound"
FontSize="18"
FontWeight="SemiBold"
Foreground="{StaticResource TextBrush}" />
<TextBlock Text="Play a short sound when ToastDesk receives a notification. Presets are bundled notification tones, and custom WAV/MP3/WMA files are supported."
Margin="0,6,0,16"
Foreground="{StaticResource TextMutedBrush}"
TextWrapping="Wrap" />
<CheckBox Content="Enable notification sound"
IsChecked="{Binding Settings.EnableNotificationSound, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<Grid Margin="0,0,0,12">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="180" />
<ColumnDefinition Width="220" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Text="Sound preset"
VerticalAlignment="Center"
Foreground="{StaticResource TextBrush}" />
<ComboBox x:Name="SoundPresetComboBox"
Grid.Column="1"
Width="200"
ItemsSource="{Binding SoundPresets}"
DisplayMemberPath="Name"
SelectedValuePath="Id"
SelectedValue="{Binding Settings.SoundPresetId, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
SelectionChanged="SoundPresetComboBox_SelectionChanged" />
<Button Grid.Column="2"
Style="{StaticResource SecondaryButtonStyle}"
MinWidth="120"
Margin="8,0,0,0"
Click="ChooseCustomSoundButton_Click">
Choose File
</Button>
<Button Grid.Column="3"
Style="{StaticResource PrimaryButtonStyle}"
MinWidth="100"
Margin="8,0,0,0"
Click="PreviewSoundButton_Click">
Preview
</Button>
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="180" />
<ColumnDefinition Width="260" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Text="Volume"
VerticalAlignment="Center"
Foreground="{StaticResource TextBrush}" />
<Slider Grid.Column="1"
Minimum="0"
Maximum="100"
TickFrequency="10"
IsSnapToTickEnabled="False"
Value="{Binding Settings.NotificationSoundVolume, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock Grid.Column="2"
Margin="10,0,0,0"
VerticalAlignment="Center"
Foreground="{StaticResource TextMutedBrush}"
Text="{Binding Settings.NotificationSoundVolume, StringFormat={}{0}%}" />
</Grid>
<TextBlock Text="{Binding Settings.CustomSoundPath, TargetNullValue=No custom sound selected.}"
Margin="180,8,0,0"
Foreground="{StaticResource TextMutedBrush}"
TextWrapping="Wrap" />
</StackPanel>
</ScrollViewer>
</Border>
</TabItem>
</TabControl>
</Grid>
</Window>