添加项目文件。
							parent
							
								
									db368c3bd4
								
							
						
					
					
						commit
						cea0140ba3
					
				@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					<prism:PrismApplication x:Class="Txgy.FilesWatcher.App"
 | 
				
			||||||
 | 
					             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 | 
				
			||||||
 | 
					             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 | 
				
			||||||
 | 
					             xmlns:local="clr-namespace:Txgy.FilesWatcher"
 | 
				
			||||||
 | 
					             xmlns:prism="http://prismlibrary.com/" >
 | 
				
			||||||
 | 
					    <Application.Resources>
 | 
				
			||||||
 | 
					        <ResourceDictionary>
 | 
				
			||||||
 | 
					            <ResourceDictionary.MergedDictionaries>
 | 
				
			||||||
 | 
					                <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
 | 
				
			||||||
 | 
					                <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
 | 
				
			||||||
 | 
					            </ResourceDictionary.MergedDictionaries>
 | 
				
			||||||
 | 
					        </ResourceDictionary>
 | 
				
			||||||
 | 
					    </Application.Resources>
 | 
				
			||||||
 | 
					</prism:PrismApplication>
 | 
				
			||||||
@ -0,0 +1,100 @@
 | 
				
			|||||||
 | 
					<UserControl x:Class="Txgy.FilesWatcher.Views.MainView"
 | 
				
			||||||
 | 
					             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 | 
				
			||||||
 | 
					             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 | 
				
			||||||
 | 
					             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
 | 
				
			||||||
 | 
					             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
 | 
				
			||||||
 | 
					             xmlns:local="clr-namespace:Txgy.FilesWatcher.Views"
 | 
				
			||||||
 | 
					             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
 | 
				
			||||||
 | 
					             mc:Ignorable="d" 
 | 
				
			||||||
 | 
					             xmlns:prism="http://prismlibrary.com/"
 | 
				
			||||||
 | 
					             prism:ViewModelLocator.AutoWireViewModel="True"
 | 
				
			||||||
 | 
					             d:DesignHeight="450" d:DesignWidth="800">
 | 
				
			||||||
 | 
					    <Grid>
 | 
				
			||||||
 | 
					        <Grid.ColumnDefinitions>
 | 
				
			||||||
 | 
					            <ColumnDefinition Width="300"/>
 | 
				
			||||||
 | 
					            <ColumnDefinition Width="107*"/>
 | 
				
			||||||
 | 
					        </Grid.ColumnDefinitions>
 | 
				
			||||||
 | 
					        <StackPanel Grid.Row="0">
 | 
				
			||||||
 | 
					        </StackPanel>
 | 
				
			||||||
 | 
					        <GroupBox Header="文件监控管理" IsEnabled="{Binding ElementName=rtnConnect, Path=IsChecked}" Style="{StaticResource GroupBoxOriginal}"  BorderThickness="3" Margin="1">
 | 
				
			||||||
 | 
					            <Grid Margin="10">
 | 
				
			||||||
 | 
					                <Grid.ColumnDefinitions>
 | 
				
			||||||
 | 
					                    <ColumnDefinition Width="1*"/>
 | 
				
			||||||
 | 
					                    <ColumnDefinition Width="1*"/>
 | 
				
			||||||
 | 
					                </Grid.ColumnDefinitions>
 | 
				
			||||||
 | 
					                <Grid.RowDefinitions>
 | 
				
			||||||
 | 
					                    <RowDefinition Height="30"/>
 | 
				
			||||||
 | 
					                    <RowDefinition Height="50"/>
 | 
				
			||||||
 | 
					                    <RowDefinition Height="30"/>
 | 
				
			||||||
 | 
					                    <RowDefinition Height="30"/>
 | 
				
			||||||
 | 
					                    <RowDefinition Height="30"/>
 | 
				
			||||||
 | 
					                    <RowDefinition Height="30*"/>
 | 
				
			||||||
 | 
					                    <RowDefinition Height="30"/>
 | 
				
			||||||
 | 
					                </Grid.RowDefinitions>
 | 
				
			||||||
 | 
					                <RadioButton GroupName="start" Content="启动" Grid.Column="0" VerticalAlignment="Center">
 | 
				
			||||||
 | 
					                    <i:Interaction.Triggers>
 | 
				
			||||||
 | 
					                        <i:EventTrigger EventName="Checked">
 | 
				
			||||||
 | 
					                            <i:InvokeCommandAction Command="{Binding StartCommand}"/>
 | 
				
			||||||
 | 
					                        </i:EventTrigger>
 | 
				
			||||||
 | 
					                    </i:Interaction.Triggers>
 | 
				
			||||||
 | 
					                </RadioButton>
 | 
				
			||||||
 | 
					                <RadioButton GroupName="start" Content="关闭" IsChecked="True" Grid.Column="1" VerticalAlignment="Center">
 | 
				
			||||||
 | 
					                    <i:Interaction.Triggers>
 | 
				
			||||||
 | 
					                        <i:EventTrigger EventName="Checked">
 | 
				
			||||||
 | 
					                            <i:InvokeCommandAction Command="{Binding StopCommand}"/>
 | 
				
			||||||
 | 
					                        </i:EventTrigger>
 | 
				
			||||||
 | 
					                    </i:Interaction.Triggers>
 | 
				
			||||||
 | 
					                </RadioButton>
 | 
				
			||||||
 | 
					                <Grid Grid.Row="1" Grid.ColumnSpan="2">
 | 
				
			||||||
 | 
					                    <Grid.RowDefinitions>
 | 
				
			||||||
 | 
					                        <RowDefinition Height="1*"/>
 | 
				
			||||||
 | 
					                        <RowDefinition Height="1.5*"/>
 | 
				
			||||||
 | 
					                    </Grid.RowDefinitions>
 | 
				
			||||||
 | 
					                    <TextBlock Text="存储路径:" Grid.Row="0" Grid.Column="0" />
 | 
				
			||||||
 | 
					                    <DockPanel Grid.Row="1">
 | 
				
			||||||
 | 
					                        <Button Content="..." Command="{Binding FilePathSaveCommand}" DockPanel.Dock="Right"  HorizontalAlignment="Right" Height="28" Width="30"/>
 | 
				
			||||||
 | 
					                        <TextBox Text="{Binding WatcherPath}" IsReadOnly="True" DockPanel.Dock="Right" FontSize="10"/>
 | 
				
			||||||
 | 
					                    </DockPanel>
 | 
				
			||||||
 | 
					                </Grid>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <TextBlock Grid.Row="2" VerticalAlignment="Center" Grid.ColumnSpan="3">
 | 
				
			||||||
 | 
					                    <Run Text="启动时间:"/>
 | 
				
			||||||
 | 
					                    <Run Text="{Binding StartTime,StringFormat=yyyy-MM-dd HH:mm:ss}"/>
 | 
				
			||||||
 | 
					                </TextBlock>
 | 
				
			||||||
 | 
					                <TextBlock Grid.Row="3" Grid.ColumnSpan="2"  VerticalAlignment="Center">
 | 
				
			||||||
 | 
					                        <Run Text="运行时间:"/>
 | 
				
			||||||
 | 
					                        <Run  Text="{Binding RunTime, StringFormat=yyyy-MM-dd HH:mm:ss}"/>
 | 
				
			||||||
 | 
					                </TextBlock>
 | 
				
			||||||
 | 
					                <DockPanel Grid.Row="4" Grid.ColumnSpan="2" >
 | 
				
			||||||
 | 
					                    <ComboBox DockPanel.Dock="Right" ItemsSource="{Binding IntervalTimesSource}" SelectedIndex="{Binding selectedIndex}" Text="{Binding ProMonInterval}" VerticalAlignment="Center"/>
 | 
				
			||||||
 | 
					                    <TextBlock Text="监隔间隔(s):" DockPanel.Dock="Right" VerticalAlignment="Center"/>
 | 
				
			||||||
 | 
					                </DockPanel>
 | 
				
			||||||
 | 
					                <ProgressBar Grid.Row="6" Grid.ColumnSpan="3" VerticalAlignment="Bottom" IsIndeterminate="{Binding IsIndeterminate}"  Foreground="Green"  Value="0"/>
 | 
				
			||||||
 | 
					            </Grid>
 | 
				
			||||||
 | 
					        </GroupBox>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <ListBox x:Name="listView" ItemsSource="{Binding DataList}" Margin="5" Grid.Column="1">
 | 
				
			||||||
 | 
					            <ListBox.ItemTemplate>
 | 
				
			||||||
 | 
					                <DataTemplate>
 | 
				
			||||||
 | 
					                    <Border BorderBrush="#F7F9FA" BorderThickness="0,0,0,1" Background="Transparent">
 | 
				
			||||||
 | 
					                        <Grid Height="30" Background="Transparent" Name="root">
 | 
				
			||||||
 | 
					                            <Grid.ColumnDefinitions>
 | 
				
			||||||
 | 
					                                <ColumnDefinition Width="200"/>
 | 
				
			||||||
 | 
					                                <ColumnDefinition  Width="60"/>
 | 
				
			||||||
 | 
					                                <ColumnDefinition />
 | 
				
			||||||
 | 
					                            </Grid.ColumnDefinitions>
 | 
				
			||||||
 | 
					                            <TextBlock Text="{Binding CreateTime}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
 | 
				
			||||||
 | 
					                            <TextBlock Text="{Binding UserName}" VerticalAlignment="Center" Grid.Column="1"/>
 | 
				
			||||||
 | 
					                            <TextBlock Text="{Binding Message}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="2"/>
 | 
				
			||||||
 | 
					                        </Grid>
 | 
				
			||||||
 | 
					                    </Border>
 | 
				
			||||||
 | 
					                    <DataTemplate.Triggers>
 | 
				
			||||||
 | 
					                        <Trigger Property="IsMouseOver" Value="True">
 | 
				
			||||||
 | 
					                            <Setter TargetName="root" Property="Background" Value="#F7F9FA"/>
 | 
				
			||||||
 | 
					                        </Trigger>
 | 
				
			||||||
 | 
					                    </DataTemplate.Triggers>
 | 
				
			||||||
 | 
					                </DataTemplate>
 | 
				
			||||||
 | 
					            </ListBox.ItemTemplate>
 | 
				
			||||||
 | 
					        </ListBox>
 | 
				
			||||||
 | 
					    </Grid>
 | 
				
			||||||
 | 
					</UserControl>
 | 
				
			||||||
@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					<Window x:Class="Txgy.FilesWatcher.Views.MainWindow"
 | 
				
			||||||
 | 
					        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 | 
				
			||||||
 | 
					        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 | 
				
			||||||
 | 
					        xmlns:prism="http://prismlibrary.com/"
 | 
				
			||||||
 | 
					        prism:ViewModelLocator.AutoWireViewModel="True"
 | 
				
			||||||
 | 
					        Title="{Binding Title}" Height="500" Width="800" >
 | 
				
			||||||
 | 
					    <Grid>
 | 
				
			||||||
 | 
					        <ContentControl prism:RegionManager.RegionName="MainContentRegion" />
 | 
				
			||||||
 | 
					    </Grid>
 | 
				
			||||||
 | 
					</Window>
 | 
				
			||||||
					Loading…
					
					
				
		Reference in New Issue