This repository was archived by the owner on Feb 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShellChangeNotifierExample.xaml
61 lines (50 loc) · 3.16 KB
/
ShellChangeNotifierExample.xaml
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
<Window
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"
xmlns:local="clr-namespace:ShellChangeNotifierExample"
xmlns:shlbr="http://schemas.jam-software.com/shellbrowser/wpf/"
x:Class="ShellChangeNotifierExample.MainWindow"
mc:Ignorable="d"
Title="ShellChangeNotifierExample" Height="350" Width="640">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Height="40" Background="{DynamicResource {x:Static SystemColors.MenuBrushKey}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<CheckBox Content="Enabled" VerticalAlignment="Center" IsChecked="{Binding ChangeNotifier.Enabled}" ToolTip="Enable/disable the ShellChangeNotifier"/>
<CheckBox Grid.Column="1" Margin="5,0" VerticalAlignment="Center" Content="Recursive" IsChecked="{Binding ChangeNotifier.Recursive}" ToolTip="Determines if the observed folder should be watched recursively."/>
<Grid Grid.Column="2" Width="300" Margin="5,0" VerticalAlignment="Center">
<ComboBox Name="comboBox_Events" VerticalAlignment="Center" Text="{Binding CaptionEvents, Mode=OneWay}" ItemsSource="{Binding EventSelection}" IsEditable="True" IsReadOnly="True" ToolTip="Check the notification events you want to listen to">
<ItemsControl.ItemTemplate>
<DataTemplate>
<CheckBox Content="{Binding Item}" IsChecked="{Binding IsChecked}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ComboBox>
</Grid>
<TextBlock Grid.Column="3" VerticalAlignment="Center" Margin="5,0">Watch:</TextBlock>
<shlbr:ShellComboBox Grid.Column="4" Margin="5,0" VerticalAlignment="Center" Location="{Binding WatchedDirectory, Mode=TwoWay}" ToolTip="The folder to track."/>
</Grid>
<ScrollViewer Name="logScroller" Grid.Row="1">
<TextBox Name="textBoxNotifications" Text="{Binding NotificationText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextChanged="textBoxNotifications_TextChanged"/>
</ScrollViewer>
<Grid Grid.Row="2" Background="{DynamicResource {x:Static SystemColors.MenuBrushKey}}">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="1" Margin="10,5" Padding="10,3" DockPanel.Dock="Right" Content="Clear" Click="Button_Click"/>
</Grid>
</Grid>
</Window>