Created monitoring object and refactored code accordingly.
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user