-
Notifications
You must be signed in to change notification settings - Fork 0
/
FindFile.xaml
212 lines (199 loc) · 13.7 KB
/
FindFile.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
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
<Page x:Class="CamShar.View.FindFile"
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:CamShar.View"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Title="FindFile">
<Page.Resources>
<Style x:Key="FocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<SolidColorBrush x:Key="RadioButton.Static.Background" Color="#FFFFFFFF"/>
<SolidColorBrush x:Key="RadioButton.Static.Border" Color="#FF707070"/>
<Style x:Key="OptionMarkFocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="14,0,0,0" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<SolidColorBrush x:Key="RadioButton.MouseOver.Background" Color="#FFF3F9FF"/>
<SolidColorBrush x:Key="RadioButton.MouseOver.Border" Color="#FF5593FF"/>
<SolidColorBrush x:Key="RadioButton.MouseOver.Glyph" Color="#FF212121"/>
<SolidColorBrush x:Key="RadioButton.Disabled.Background" Color="#FFE6E6E6"/>
<SolidColorBrush x:Key="RadioButton.Disabled.Border" Color="#FFBCBCBC"/>
<SolidColorBrush x:Key="RadioButton.Disabled.Glyph" Color="#FF707070"/>
<SolidColorBrush x:Key="RadioButton.Pressed.Background" Color="#FFD9ECFF"/>
<SolidColorBrush x:Key="RadioButton.Pressed.Border" Color="#FF3C77DD"/>
<SolidColorBrush x:Key="RadioButton.Pressed.Glyph" Color="#FF212121"/>
<Style x:Key="RadioButtonStyle1" TargetType="{x:Type RadioButton}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Background" Value="{StaticResource RadioButton.Static.Background}"/>
<Setter Property="BorderBrush" Value="{StaticResource RadioButton.Static.Border}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RadioButton}">
<Border CornerRadius="5" x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
<ContentPresenter x:Name="contentPresenter" Grid.Column="1"
Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="10,0" RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" TargetName="templateRoot" Value="#df4356"/>
<Setter Property="Foreground" Value="#fdfaf9"/>
<Setter Property="FontWeight" Value="Black"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ResourceKey=RadioButton.MouseOver.Background}"/>
<Setter Property="Opacity" Value="0.8"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD"/>
<SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/>
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD"/>
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1"/>
<SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/>
<SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
<SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
<SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
<Style x:Key="ListButtonStyle" TargetType="{x:Type Button}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border CornerRadius="5" x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsDefaulted" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Page.Resources>
<Grid Margin="10" x:Name="grid">
<Grid.Resources>
<DataTemplate x:Key="fileTemplate">
<ListViewItem >
<Border Background="#f5e2de" CornerRadius="5" Width="720">
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="80"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<!--文件名称-->
<TextBlock Text="{Binding FileName}" FontSize="18" FontWeight="Black" TextWrapping="Wrap"/>
<StackPanel Orientation="Horizontal" Grid.Column="1">
<TextBlock Text="上传者:"/>
<TextBlock Text="{Binding UpLoadUser}"/>
</StackPanel>
<TextBlock Text="这里是文件描述" Grid.Row="1"/>
<StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="1" >
<TextBlock Text="文件大小:"/>
<TextBlock Text="{Binding FileSize}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Column="2" Grid.Row="1" >
<TextBlock Text="文件类型:"/>
<TextBlock Text="{Binding FileType}" Foreground="Blue"/>
</StackPanel>
<Button Content="下 载" HorizontalAlignment="Right" Margin="20,0,0,0" Grid.Column="3"
BorderThickness="0.5" Width="60" VerticalAlignment="Center" Click="DownLoadFile"
Style="{StaticResource ListButtonStyle}" Background="#09cedb" Foreground="#fbf9f8"/>
<Button Content="反 馈" HorizontalAlignment="Right" Margin="20,0,0,0" Grid.Column="3" Grid.Row="1"
BorderThickness="0.5" Width="60" VerticalAlignment="Center"
Style="{StaticResource ListButtonStyle}" Background="#09cedb" Foreground="#fbf9f8"/>
</Grid>
</Border>
</ListViewItem>
</DataTemplate>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="120"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border>
<StackPanel Margin="10">
<TextBlock Text="筛选" FontSize="24" FontWeight="Black"/>
<Border Background="#fcf9f9" CornerRadius="5" Margin="0,5,0,0" Height="60" >
<Grid Margin="0,8">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Margin="0,0,0,3">
<TextBlock Text="相关内容:" FontWeight="Black" Margin=" 5,0"/>
<RadioButton Content="全部" Style="{DynamicResource RadioButtonStyle1}" BorderThickness="0" IsChecked="True"/>
<RadioButton Content="测试" Style="{DynamicResource RadioButtonStyle1}" BorderThickness="0"/>
<RadioButton Content="测试" Style="{DynamicResource RadioButtonStyle1}" BorderThickness="0"/>
<RadioButton Content="测试" Style="{DynamicResource RadioButtonStyle1}" BorderThickness="0"/>
</StackPanel>
<!--<StackPanel Orientation="Horizontal" Grid.Row="1">
<TextBlock Text="时间:"/>
</StackPanel>-->
<StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0,3,0,0">
<TextBlock Text="文件大小:" FontWeight="Black" Margin=" 5,0"/>
<RadioButton Content="全部" Style="{DynamicResource RadioButtonStyle1}" BorderThickness="0" IsChecked="True"/>
<RadioButton Content="大于1MB" Style="{DynamicResource RadioButtonStyle1}" BorderThickness="0"/>
<RadioButton Content="小于1MB" Style="{DynamicResource RadioButtonStyle1}" BorderThickness="0"/>
</StackPanel>
</Grid>
</Border>
</StackPanel>
</Border>
<ListView Background="#fcf9f9" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden"
Grid.Row="1" BorderThickness="0" x:Name="datalistView"
ItemsSource="{Binding FileList}" ItemTemplate="{StaticResource ResourceKey=fileTemplate}">
</ListView>
<MediaElement x:Name="loadingAni" LoadedBehavior="Manual" Grid.Row="1" Source="D:\DATA\C#\CamShar\Assets\Video\LoadingAn.mp4" />
</Grid>
</Page>