年度变更建库软件5.0版本
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

166 lines
11 KiB

<windows:BaseWindow
xmlns:windows="clr-namespace:KGIS.Framework.Utils;assembly=KGIS.Framework.Utils"
x:Class="Kingo.Plugin.General.ViewDTBJK.UCSetBatchAttribute"
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:Kingo.Plugin.General.ViewDTBJK"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
xmlns:comboBox="clr-namespace:KUI.ComboBox;assembly=KUI"
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="500" Title="批量赋属性值">
<Grid Margin="5">
<Grid.Resources>
<Style TargetType="TextBlock" x:Key="txt_Triggers">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="Red" />
<Setter Property="FontSize" Value="15"/>
</Trigger>
</Style.Triggers>
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="35"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<dxlc:LayoutGroup Grid.Row="0" Orientation="Horizontal" >
<Label VerticalAlignment="Center" Foreground="#FFFD0B0B" >
<TextBlock TextWrapping="Wrap" FontSize="13" Text="注意:每次批量保存之前,请务必设置需要赋值的字段列表以及需要赋值的图斑列表"/>
</Label>
</dxlc:LayoutGroup>
<dxlc:LayoutGroup Grid.Row="1" Orientation="Horizontal" >
<dx:SimpleButton Content="设置显示字段列表" Width="120" Height="22" x:Name="btnSetFieldsTable" Click="BtnSetFieldsTable_Click"/>
<dx:SimpleButton Content="设置图斑列表" Width="100" Height="22" x:Name="btnSetTB" Click="BtnSetTB_Click"/>
<dx:SimpleButton Content="批 量 保 存" Width="100" Height="22" x:Name="btnSaveBatchAttribute" Click="BtnSaveBatchAttribute_Click"/>
</dxlc:LayoutGroup>
<DataGrid Name="gridPackage" Grid.Row="2" CanUserAddRows="False" HorizontalAlignment="Stretch" ColumnWidth="*" AlternationCount="2" VerticalAlignment="Stretch" AutoGenerateColumns="False" CanUserResizeRows="True" SelectionMode="Single" EnableRowVirtualization="False">
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Setter Property="Height" Value="30" />
</Style>
</DataGrid.RowStyle>
<DataGrid.Columns>
<DataGridTemplateColumn Header="属性名称" IsReadOnly="True" Width="130">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Label Content="{Binding AttributeAliasName}" ></Label>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="属性值">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid>
<comboBox:AutoCompleteBox Name="ComboBox" Background="White" KeyFieldName="ID" IsReadOnly="True" IsEditable="True" IsGroup="True" ParentFieldName="PID" DisplayMemberPath="NAME" ValueMemberPath="CODE" Visibility="Collapsed" BorderBrush="AliceBlue"/>
<dxe:TextEdit x:Name="TextBox" Background="White" Visibility="Collapsed" ShowBorder="False"/>
</Grid>
<DataTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding PropertyType}" Value="ComboBox" />
</MultiDataTrigger.Conditions>
<Setter TargetName="ComboBox" Property="Visibility" Value="Visible" />
<Setter TargetName="ComboBox" Property="ValueMemberPath" Value="{Binding ValuePath,Mode=TwoWay}" />
<Setter TargetName="ComboBox" Property="DisplayMemberPath" Value="{Binding DisplayMemberPath,Mode=TwoWay}" />
<Setter TargetName="ComboBox" Property="ItemsSource" Value="{Binding DicData, Mode=TwoWay}" />
<Setter TargetName="ComboBox" Property="IsReadOnly" Value="{Binding IsReadOnly, Mode=TwoWay}" />
<Setter TargetName="ComboBox" Property="SelectedValue" Value="{Binding AttributeValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</MultiDataTrigger>
<DataTrigger Binding="{Binding PropertyType}" Value="TextBox">
<Setter TargetName="TextBox" Property="Visibility" Value="Visible" />
<Setter TargetName="TextBox" Property="AllowNullInput" Value="{Binding AllowNull}" />
<Setter TargetName="TextBox" Property="EditValue" Value="{Binding AttributeValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
<!--字段显示设置页面-->
<Grid Grid.Row="0" Grid.RowSpan="3" Background="White" Name="SetFieldsPage" Margin="2px,5" Visibility="Collapsed" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="35"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<dxlc:LayoutGroup Grid.Row="0" Orientation="Horizontal" Margin="5px,1">
<dx:SimpleButton Content="保 存" Width="80" Height="22" x:Name="btnSave" Click="BtnSave_Click"/>
<dx:SimpleButton Content="关 闭" Width="80" Height="22" x:Name="btnClose" Click="BtnClose_Click"/>
</dxlc:LayoutGroup>
<DataGrid x:Name="dgTableMapping" Grid.Row="1" CanUserResizeColumns="True" AutoGenerateColumns="False" CanUserAddRows="False" Margin="5px,1" MinHeight="30" >
<DataGrid.Columns>
<DataGridTemplateColumn Header="导入状态" x:Name="chkSelectedAll" Width="50">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<CheckBox x:Name="AllCheckEidt" HorizontalAlignment="Center" HorizontalContentAlignment="Center" IsChecked="False" Click="AllCheckEidt_Click"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<CheckBox x:Name="checkBox" HorizontalAlignment="Center" VerticalAlignment="Center" IsChecked="{Binding IsCheck,Mode=TwoWay}" Tag="{Binding AttributeAliasName}" Click="checkBox_Click" />
</Grid>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Header="属性名称" Width="*" Binding="{Binding AttributeAliasName}" IsReadOnly="True"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Grid>
<!--设置图斑列表-->
<Grid Grid.Row="0" Grid.RowSpan="3" Background="White" Name="SetTBPage" Margin="2px,5" Visibility="Collapsed" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="35"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<dxlc:LayoutGroup Grid.Row="0" Orientation="Horizontal" Margin="5px,1">
<dx:SimpleButton Content="确 定" Width="80" Height="22" x:Name="btnSetTBOK" Click="BtnSetTBOK_Click"/>
</dxlc:LayoutGroup>
<DataGrid x:Name="dgSetTBTableMapping" Grid.Row="1" CanUserResizeColumns="True" AutoGenerateColumns="False" CanUserAddRows="False" Margin="5px,1" MinHeight="30" >
<DataGrid.Columns>
<DataGridTemplateColumn Header="导入状态" x:Name="chkSetTBSelectedAll" Width="50">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<CheckBox x:Name="setTBAllCheckEidt" HorizontalAlignment="Center" HorizontalContentAlignment="Center" IsChecked="True" Click="setTBAllCheckEidt_Click"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<CheckBox x:Name="setTBCheckBox" HorizontalAlignment="Center" VerticalAlignment="Center" IsChecked="{Binding IsCheck,Mode=TwoWay}" Tag="{Binding AttributeAliasName}" Click="setTBCheckBox_Click" />
</Grid>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Header="标识码" Width="130" Binding="{Binding bsm}" IsReadOnly="True"/>
<DataGridTextColumn Header="图斑标识码" Width="*" Binding="{Binding tbbsm}" IsReadOnly="True"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Grid>
</Grid>
</windows:BaseWindow>