148 lines
8.8 KiB
Plaintext
148 lines
8.8 KiB
Plaintext
|
|
<controls:MaterialWindow
|
||
|
|
x:Class="Szmedi.RvKits.FamilyTools.QueryExportWin"
|
||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
||
|
|
xmlns:controls="clr-namespace:Szmedi.RvKits.Controls"
|
||
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
|
|
xmlns:local="clr-namespace:Szmedi.RvKits.FamilyTools"
|
||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
|
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||
|
|
Title="查询导出"
|
||
|
|
Width="500"
|
||
|
|
Height="600"
|
||
|
|
d:DataContext="{d:DesignInstance Type=local:QueryExportViewModel}"
|
||
|
|
SizeToContent="Height"
|
||
|
|
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>
|
||
|
|
<TabControl Margin="5">
|
||
|
|
<TabItem Header="查询导出">
|
||
|
|
<Grid>
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
<RowDefinition Height="*" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<GroupBox Header="文本比较">
|
||
|
|
<UniformGrid Columns="2">
|
||
|
|
<RadioButton Content="等于" IsChecked="{Binding ComparisonType, ConverterParameter={x:Static local:Comparison.Equals}, Converter={StaticResource ComparisonConverter}}" />
|
||
|
|
<RadioButton Content="包含" IsChecked="{Binding ComparisonType, ConverterParameter={x:Static local:Comparison.Contains}, Converter={StaticResource ComparisonConverter}}" />
|
||
|
|
<RadioButton Content="不包含" IsChecked="{Binding ComparisonType, ConverterParameter={x:Static local:Comparison.NoContains}, Converter={StaticResource ComparisonConverter}}" />
|
||
|
|
<RadioButton Content="开始是" IsChecked="{Binding ComparisonType, ConverterParameter={x:Static local:Comparison.StartWith}, Converter={StaticResource ComparisonConverter}}" />
|
||
|
|
<RadioButton Content="结尾时" IsChecked="{Binding ComparisonType, ConverterParameter={x:Static local:Comparison.EndWith}, Converter={StaticResource ComparisonConverter}}" />
|
||
|
|
</UniformGrid>
|
||
|
|
</GroupBox>
|
||
|
|
<GroupBox
|
||
|
|
Grid.Row="0"
|
||
|
|
Grid.Column="1"
|
||
|
|
Header="特征匹配"
|
||
|
|
ToolTip="过滤出需要导出的元素的特征,留空则不过滤,导出全部">
|
||
|
|
<UniformGrid Rows="2">
|
||
|
|
<TextBox md:HintAssist.Hint="匹配的属性" Text="{Binding PropertyName, UpdateSourceTrigger=PropertyChanged}" ToolTip="比如:标记,注释,特殊属性如“族,类型”等等" />
|
||
|
|
<TextBox md:HintAssist.Hint="匹配的值特征" Text="{Binding PropertyValueToCompare, UpdateSourceTrigger=PropertyChanged}" ToolTip="若查询摄像头,填写摄像头" />
|
||
|
|
</UniformGrid>
|
||
|
|
</GroupBox>
|
||
|
|
<GroupBox
|
||
|
|
Grid.Row="1"
|
||
|
|
Grid.ColumnSpan="2"
|
||
|
|
Header="导出属性"
|
||
|
|
ToolTip="对过滤出的元素导出所需要的属性">
|
||
|
|
<Grid>
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="*" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<ListBox
|
||
|
|
x:Name="LBExport"
|
||
|
|
Grid.ColumnSpan="3"
|
||
|
|
d:ItemsSource="{d:SampleData ItemCount=5}"
|
||
|
|
ItemsSource="{Binding ExportProps, Mode=TwoWay}"
|
||
|
|
Style="{StaticResource MaterialDesignFilterChipListBox}">
|
||
|
|
<!--<ListBox.ItemContainerStyle>
|
||
|
|
<Style BasedOn="{StaticResource MaterialDesignFilterChipListBoxItem}" TargetType="ListBoxItem">
|
||
|
|
<Setter Property="IsEnabled" Value="False" />
|
||
|
|
</Style>
|
||
|
|
</ListBox.ItemContainerStyle>-->
|
||
|
|
</ListBox>
|
||
|
|
<TextBox x:Name="TBProp" Grid.Row="1" md:HintAssist.Hint="添加的属性">
|
||
|
|
<TextBox.InputBindings>
|
||
|
|
<KeyBinding Key="Return" Command="{Binding AddCommand}" CommandParameter="{Binding ElementName=TBProp, Path=Text}" />
|
||
|
|
</TextBox.InputBindings>
|
||
|
|
</TextBox>
|
||
|
|
<Button
|
||
|
|
Grid.Row="1"
|
||
|
|
Grid.Column="1"
|
||
|
|
Command="{Binding AddCommand}"
|
||
|
|
CommandParameter="{Binding ElementName=TBProp, Path=Text}"
|
||
|
|
Content="添加"
|
||
|
|
ToolTip="添加要导出的属性" />
|
||
|
|
<Button
|
||
|
|
Grid.Row="1"
|
||
|
|
Grid.Column="2"
|
||
|
|
Command="{Binding RemoveCommand}"
|
||
|
|
CommandParameter="{Binding ElementName=LBExport, Path=SelectedItem}"
|
||
|
|
Content="删除"
|
||
|
|
ToolTip="选择导出的属性,并删除" />
|
||
|
|
</Grid>
|
||
|
|
</GroupBox>
|
||
|
|
<TextBox
|
||
|
|
Grid.Row="2"
|
||
|
|
Grid.ColumnSpan="2"
|
||
|
|
md:HintAssist.Hint="导出的路径"
|
||
|
|
IsReadOnly="True"
|
||
|
|
Text="{Binding OutputFolder}">
|
||
|
|
<b:Interaction.Triggers>
|
||
|
|
<b:EventTrigger EventName="MouseDoubleClick">
|
||
|
|
<b:InvokeCommandAction Command="{Binding SelectOutputFolderCommand}" />
|
||
|
|
</b:EventTrigger>
|
||
|
|
</b:Interaction.Triggers>
|
||
|
|
</TextBox>
|
||
|
|
<UniformGrid Grid.Row="3" Grid.ColumnSpan="2" Rows="1">
|
||
|
|
<Button Command="{Binding QueryExportCommand}" Content="当前查询导出" ToolTip="查询导出当前打开的项目文件的数据" />
|
||
|
|
<Button Command="{Binding SelectElementsCommand}" Content="选中匹配构件" ToolTip="查询导出在当前打开项目中已选中的元素,匹配的构件" />
|
||
|
|
<Button Command="{Binding MultiQueryExportCommand}" Content="文件查询导出" ToolTip="多选其他项目文件,批量查询" />
|
||
|
|
</UniformGrid>
|
||
|
|
</Grid>
|
||
|
|
</TabItem>
|
||
|
|
<TabItem Header="明细表导出">
|
||
|
|
<Grid>
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="*" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<ListBox
|
||
|
|
x:Name="LBSchedules"
|
||
|
|
d:ItemsSource="{d:SampleData ItemCount=5}"
|
||
|
|
DisplayMemberPath="Name"
|
||
|
|
ItemsSource="{Binding ViewSchedules}"
|
||
|
|
SelectionMode="Multiple"
|
||
|
|
Style="{StaticResource MaterialDesignFilterChipListBox}" />
|
||
|
|
<Button
|
||
|
|
Grid.Row="1"
|
||
|
|
Command="{Binding ExportScheduleCommand}"
|
||
|
|
CommandParameter="{Binding ElementName=LBSchedules, Path=SelectedItems}"
|
||
|
|
Content="导出明细表" />
|
||
|
|
</Grid>
|
||
|
|
</TabItem>
|
||
|
|
</TabControl>
|
||
|
|
|
||
|
|
</Grid>
|
||
|
|
</controls:MaterialWindow>
|