175 lines
7.7 KiB
Plaintext
175 lines
7.7 KiB
Plaintext
|
|
<controls:MaterialWindow
|
||
|
|
x:Class="Szmedi.RvKits.FamilyLibrary.LocalFamsLibWin"
|
||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:controls="clr-namespace:Szmedi.RvKits.Controls"
|
||
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
|
Title="本地族库"
|
||
|
|
Width="940"
|
||
|
|
Height="600"
|
||
|
|
|
||
|
|
mc:Ignorable="d">
|
||
|
|
<controls:MaterialWindow.Resources>
|
||
|
|
<ResourceDictionary>
|
||
|
|
<ResourceDictionary.MergedDictionaries>
|
||
|
|
<ResourceDictionary Source="pack://application:,,,/Szmedi.RvKits;component/WPFUI.xaml" />
|
||
|
|
</ResourceDictionary.MergedDictionaries>
|
||
|
|
</ResourceDictionary>
|
||
|
|
</controls:MaterialWindow.Resources>
|
||
|
|
<Grid>
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
<RowDefinition Height="*" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="200" />
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
<ColumnDefinition Width="200" />
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<ListView
|
||
|
|
Name="FileListView"
|
||
|
|
Grid.RowSpan="2"
|
||
|
|
Grid.Column="1"
|
||
|
|
Grid.ColumnSpan="2">
|
||
|
|
<ListView.ContextMenu>
|
||
|
|
<ContextMenu>
|
||
|
|
<MenuItem Click="OpenFile_Click" Header="打开文件位置" />
|
||
|
|
<MenuItem Click="LoadFamily_Click" Header="加载选中族" />
|
||
|
|
</ContextMenu>
|
||
|
|
</ListView.ContextMenu>
|
||
|
|
<ListView.Template>
|
||
|
|
<ControlTemplate TargetType="ListView">
|
||
|
|
<ScrollViewer x:Name="scr" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||
|
|
<WrapPanel IsItemsHost="True" ScrollViewer.CanContentScroll="True" />
|
||
|
|
</ScrollViewer>
|
||
|
|
</ControlTemplate>
|
||
|
|
</ListView.Template>
|
||
|
|
<ListView.ItemTemplate>
|
||
|
|
<DataTemplate>
|
||
|
|
<StackPanel Margin="5" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||
|
|
<Image
|
||
|
|
Width="128"
|
||
|
|
Height="128"
|
||
|
|
Source="{Binding ImageData}"
|
||
|
|
Stretch="Uniform" />
|
||
|
|
<TextBlock
|
||
|
|
Height="40"
|
||
|
|
MaxWidth="128"
|
||
|
|
Text="{Binding Title}"
|
||
|
|
TextAlignment="Center"
|
||
|
|
TextWrapping="WrapWithOverflow" />
|
||
|
|
<StackPanel Orientation="Horizontal">
|
||
|
|
<Button
|
||
|
|
Width="64"
|
||
|
|
Height="25"
|
||
|
|
Margin="2,0,2,0"
|
||
|
|
Click="BtnBrowser_Click"
|
||
|
|
Content="查看" />
|
||
|
|
<Button
|
||
|
|
Width="64"
|
||
|
|
Height="25"
|
||
|
|
Margin="2,0,2,0"
|
||
|
|
Click="BtnLoadFamily_Click"
|
||
|
|
Content="载入" />
|
||
|
|
</StackPanel>
|
||
|
|
</StackPanel>
|
||
|
|
</DataTemplate>
|
||
|
|
</ListView.ItemTemplate>
|
||
|
|
<!--<ListView.ItemContainerStyle>
|
||
|
|
<Style TargetType="{x:Type ListViewItem}">
|
||
|
|
-->
|
||
|
|
<!-- 设置触发器 -->
|
||
|
|
<!--
|
||
|
|
<Style.Triggers>
|
||
|
|
<Trigger Property="IsSelected" Value="true">
|
||
|
|
<Setter Property="Background" Value="Black" />
|
||
|
|
<Setter Property="Foreground" Value="White" />
|
||
|
|
</Trigger>
|
||
|
|
<Trigger Property="IsMouseOver" Value="true">
|
||
|
|
<Setter Property="Background" Value="LightGreen" />
|
||
|
|
<Setter Property="Foreground" Value="Red" />
|
||
|
|
</Trigger>
|
||
|
|
</Style.Triggers>
|
||
|
|
</Style>
|
||
|
|
</ListView.ItemContainerStyle>-->
|
||
|
|
<!--<ListView.ItemTemplate>
|
||
|
|
<DataTemplate>
|
||
|
|
<StackPanel>
|
||
|
|
<Image Width="90" Height="90" />
|
||
|
|
<TextBlock Width="90" />
|
||
|
|
</StackPanel>
|
||
|
|
</DataTemplate>
|
||
|
|
</ListView.ItemTemplate>-->
|
||
|
|
<!--<ListView.View>
|
||
|
|
<GridView>
|
||
|
|
<GridViewColumn Width="300" Header="名称" />
|
||
|
|
<GridViewColumn Width="50" Header="状态">
|
||
|
|
<GridViewColumn.CellTemplate>
|
||
|
|
<DataTemplate>
|
||
|
|
<StackPanel Orientation="Horizontal">
|
||
|
|
<CheckBox IsChecked="{Binding Path=IsSelected, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListViewItem}}}" />
|
||
|
|
</StackPanel>
|
||
|
|
</DataTemplate>
|
||
|
|
</GridViewColumn.CellTemplate>
|
||
|
|
</GridViewColumn>
|
||
|
|
</GridView>
|
||
|
|
</ListView.View>-->
|
||
|
|
</ListView>
|
||
|
|
<TreeView
|
||
|
|
Name="dirTree"
|
||
|
|
Grid.Row="1"
|
||
|
|
Grid.RowSpan="2"
|
||
|
|
Grid.Column="0"
|
||
|
|
TreeViewItem.Selected="DirTreeItem_Selected">
|
||
|
|
<!--<TreeView.ItemTemplate>
|
||
|
|
<HierarchicalDataTemplate DataType="{x:Type TreeViewItem}">
|
||
|
|
<StackPanel Orientation="Horizontal">
|
||
|
|
<Image VerticalAlignment="Center" Source="Images/16_16/File_16px.png" />
|
||
|
|
<TextBlock Text="{Binding}" />
|
||
|
|
</StackPanel>
|
||
|
|
</HierarchicalDataTemplate>
|
||
|
|
</TreeView.ItemTemplate>-->
|
||
|
|
</TreeView>
|
||
|
|
<DockPanel
|
||
|
|
Grid.Row="2"
|
||
|
|
Grid.Column="1"
|
||
|
|
Margin="5"
|
||
|
|
VerticalAlignment="Center">
|
||
|
|
<Button x:Name="btnHome" Click="BtnHome_Click" Content="首页" />
|
||
|
|
<Button x:Name="btnPrevious" Click="BtnPrevious_Click" Content="上一页" />
|
||
|
|
<ComboBox x:Name="cbbPage" VerticalAlignment="Center" DropDownClosed="CbbPage_DropDownClosed" />
|
||
|
|
<TextBlock VerticalAlignment="Center" Text="/" />
|
||
|
|
<TextBlock x:Name="tbPage" Width="30" VerticalAlignment="Center" />
|
||
|
|
<Button x:Name="btnNext" Click="BtnNext_Click" Content="下一页" />
|
||
|
|
<Button x:Name="btnEnd" Click="BtnEnd_Click" Content="末页" />
|
||
|
|
<TextBlock x:Name="tbPageAll" VerticalAlignment="Center" />
|
||
|
|
</DockPanel>
|
||
|
|
<Button
|
||
|
|
x:Name="BtnPathChoose"
|
||
|
|
Grid.Row="0"
|
||
|
|
Grid.Column="0"
|
||
|
|
Click="BtnPathChoose_Click"
|
||
|
|
Content="选择族库文件夹" />
|
||
|
|
<Grid
|
||
|
|
Grid.Row="2"
|
||
|
|
Grid.Column="2"
|
||
|
|
Width="200"
|
||
|
|
HorizontalAlignment="Center">
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<TextBox x:Name="TbFamilyName" materialDesign:HintAssist.Hint="请输入搜索内容" TextChanged="TbFamilyName_TextChanged" />
|
||
|
|
<Button
|
||
|
|
x:Name="BtnSearch"
|
||
|
|
Grid.Column="1"
|
||
|
|
Click="BtnSearch_Click"
|
||
|
|
Content="搜索"
|
||
|
|
IsDefault="True" />
|
||
|
|
</Grid>
|
||
|
|
|
||
|
|
</Grid>
|
||
|
|
</controls:MaterialWindow>
|