Created monitoring object and refactored code accordingly.

This commit is contained in:
Patrick Fic
2020-01-17 14:19:49 -08:00
parent 3357a8a564
commit b7218b6771
16 changed files with 217 additions and 76 deletions

View File

@@ -68,12 +68,38 @@
</Button>
<StackPanel DockPanel.Dock="Right">
<Button Command="{Binding StartFolderMonitorsCommand}"
Content="{x:Static p:Resources.Label_StartAllMonitors}"/>
Content="{x:Static p:Resources.Label_StartAllMonitors}" />
<Button Command="{Binding StopFolderMonitorsCommand}"
Content="{x:Static p:Resources.Label_StopAllMonitors}" />
</StackPanel>
<ItemsControl ItemsSource="{Binding MonitoringPaths}">
<DataGrid ItemsSource="{Binding MonitoringPaths}"
AutoGenerateColumns="False"
CanUserAddRows="False">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding FilePath}"
Header="{x:Static p:Resources.Label_FilePath}" />
<DataGridTextColumn Binding="{Binding Source}"
Header="{x:Static p:Resources.Label_SourceSystem}" />
<DataGridTemplateColumn Header="1">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button Style="{StaticResource MaterialDesignFloatingActionMiniAccentButton}"
Command="{Binding DataContext.RemoveMonitoringPathCommand,
RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"
CommandParameter="{Binding .}">
<materialDesign:PackIcon Kind="RemoveCircle"
Height="24"
Width="24" />
</Button>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
<!--<ItemsControl ItemsSource="{Binding MonitoringPaths}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
@@ -100,6 +126,6 @@
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ItemsControl>-->
</DockPanel>
</Window>