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.
193 lines
15 KiB
193 lines
15 KiB
<windows:BaseWindow xmlns:windows="clr-namespace:KGIS.Framework.Utils;assembly=KGIS.Framework.Utils" |
|
x:Class="Kingo.Plugin.DataLoad.View.FrmLoadDDTCData" |
|
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.DataLoad.View" |
|
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" |
|
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol" |
|
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" |
|
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|
xmlns:kuiBtn="clr-namespace:KUI.Button;assembly=KUI" |
|
mc:Ignorable="d" |
|
Width="900" Height="600" Title="单独图层加载" > |
|
<windows:BaseWindow.Resources> |
|
<Style TargetType="{x:Type dxg:GridColumn}"> |
|
<!--列头居中--> |
|
<Setter Property="HorizontalHeaderContentAlignment" Value="Center" /> |
|
<!--列值居中--> |
|
<Setter Property="EditSettings"> |
|
<Setter.Value> |
|
<dxe:TextEditSettings HorizontalContentAlignment="Center" /> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
|
|
<local:DateConverter x:Key="cvtDate"/> |
|
<local:StateConverter x:Key="cvtStateDate"/> |
|
</windows:BaseWindow.Resources> |
|
<dxlc:LayoutControl Orientation="Vertical"> |
|
<dxlc:LayoutGroup Orientation="Horizontal"> |
|
<dxlc:LayoutItem IsRequired="True" Label="选择单独图层数据:" LabelPosition="Left"> |
|
<dxe:ButtonEdit x:Name="btnImportDataPath" Height="30" IsReadOnly="True" AllowDefaultButton="False"> |
|
</dxe:ButtonEdit> |
|
</dxlc:LayoutItem> |
|
<kuiBtn:KImgButton Content="选 择" Width="80" Height="30" CornerRadius="3" Foreground="White" Click="btnSelectedDDTCData_Click" /> |
|
</dxlc:LayoutGroup> |
|
<!--<GroupBox Header="单独图层数据"> |
|
<dxg:GridControl x:Name="ddtcGrid" SelectedItemChanged="DdtcGrid_SelectedItemChanged"> |
|
<dxg:GridControl.View> |
|
<dxg:TableView Name="DDTCDataTable" RowMinHeight="30" AllowColumnFiltering="False" ShowTotalSummary="False" AllowSorting="False" AllowGrouping="False" MultiSelectMode="Row" ShowGroupPanel="False" AllowEditing="True" VerticalScrollbarVisibility="Auto" /> |
|
</dxg:GridControl.View> |
|
<dxg:GridControl.Columns> |
|
<dxg:GridColumn Header="导入状态" Width="120" HorizontalHeaderContentAlignment="Center" > |
|
<dxg:GridColumn.HeaderTemplate> |
|
<DataTemplate> |
|
<dxe:CheckEdit x:Name="chkSelectedAll" EditValueChanged="chkSelectedAll_EditValueChanged" EditValue="true" HorizontalAlignment="Center" HorizontalContentAlignment="Center"/> |
|
</DataTemplate> |
|
</dxg:GridColumn.HeaderTemplate> |
|
<dxg:GridColumn.CellTemplate> |
|
<DataTemplate> |
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> |
|
<CheckBox x:Name="checkBox" IsChecked="{Binding RowData.Row.State,Mode=TwoWay,Converter={StaticResource cvtStateDate}}" HorizontalAlignment="Center" VerticalAlignment="Center" Click="CheckBox_Click"/> |
|
<Image x:Name="img" Visibility="Collapsed" Width="16" Height="16" /> |
|
<dxe:ProgressBarEdit x:Name="labProgress" Visibility="Collapsed" Maximum="{Binding RowData.Row.Count}" EditValue="{Binding RowData.Row.Progress}" ShowBorder="False" IsPercent="True" ContentDisplayMode="Value" Content="正在执行…"> |
|
<dxe:ProgressBarEdit.DisplayFormatString> |
|
<sys:String>{0:p}</sys:String> |
|
</dxe:ProgressBarEdit.DisplayFormatString> |
|
</dxe:ProgressBarEdit> |
|
</Grid> |
|
<DataTemplate.Triggers> |
|
<DataTrigger Binding="{Binding RowData.Row.State,Mode=TwoWay}" Value="Waiting"> |
|
<Setter TargetName="checkBox" Property="Visibility" Value="Visible" /> |
|
<Setter TargetName="labProgress" Property="Visibility" Value="Collapsed" /> |
|
</DataTrigger> |
|
<DataTrigger Binding="{Binding RowData.Row.State}" Value="Delete"> |
|
<Setter TargetName="checkBox" Property="Visibility" Value="Visible" /> |
|
<Setter TargetName="labProgress" Property="Visibility" Value="Collapsed" /> |
|
</DataTrigger> |
|
<DataTrigger Binding="{Binding RowData.Row.State}" Value="BeingImport"> |
|
<Setter TargetName="checkBox" Property="Visibility" Value="Collapsed" /> |
|
<Setter TargetName="labProgress" Property="Visibility" Value="Visible" /> |
|
<Setter TargetName="img" Property="Visibility" Value="Collapsed" /> |
|
</DataTrigger> |
|
<DataTrigger Binding="{Binding RowData.Row.State}" Value="EndImport"> |
|
<Setter TargetName="checkBox" Property="Visibility" Value="Collapsed" /> |
|
<Setter TargetName="labProgress" Property="Visibility" Value="Collapsed" /> |
|
<Setter TargetName="img" Property="Visibility" Value="Visible" /> |
|
<Setter TargetName="img" Property="Source" Value="pack://siteoforigin:,,,/Images/Complate.png" /> |
|
</DataTrigger> |
|
</DataTemplate.Triggers> |
|
</DataTemplate> |
|
</dxg:GridColumn.CellTemplate> |
|
</dxg:GridColumn> |
|
<dxg:GridColumn Header="源图层" FieldName="S_TableAliasName" Width="300" ReadOnly="True" /> |
|
<dxg:GridColumn x:Name="colSTable" Header="目标图层" FieldName="T_TableName" Width="*" ReadOnly="True"> |
|
<dxg:GridColumn.CellTemplate> |
|
<DataTemplate> |
|
<dxlc:LayoutGroup> |
|
<ComboBox VerticalContentAlignment="Center" x:Name="cmbTargetTable" IsEditable="False" ItemsSource="{Binding RowData.Row.T_TableList}" SelectedValue="{Binding RowData.Row.T_TableName,Mode=TwoWay}" DisplayMemberPath="NAME" SelectedValuePath="CODE"/> |
|
</dxlc:LayoutGroup> |
|
</DataTemplate> |
|
</dxg:GridColumn.CellTemplate> |
|
</dxg:GridColumn> |
|
</dxg:GridControl.Columns> |
|
</dxg:GridControl> |
|
</GroupBox>--> |
|
<dxlc:LayoutGroup Orientation="Horizontal"> |
|
<dxlc:LayoutItem IsRequired="True" x:Name="TagFieldName" Label="单独图层表映射:" dxlc:LayoutControl.AllowHorizontalSizing="True" VerticalAlignment="Stretch" LabelPosition="Top"> |
|
<dxg:GridControl x:Name="dgTableMapping" SelectedItemChanged="DgTableMapping_SelectedItemChanged"> |
|
<dxg:GridControl.View> |
|
<dxg:TableView Name="DDTCDataTable" IsColumnMenuEnabled="False" RowMinHeight="30" AllowColumnFiltering="False" ShowTotalSummary="False" AllowSorting="False" AllowGrouping="False" MultiSelectMode="Row" ShowGroupPanel="False" AllowEditing="True" VerticalScrollbarVisibility="Auto" /> |
|
</dxg:GridControl.View> |
|
<dxg:GridControl.Columns> |
|
<dxg:GridColumn Header="导入状态" Width="120" HorizontalHeaderContentAlignment="Center" > |
|
<dxg:GridColumn.HeaderTemplate> |
|
<DataTemplate> |
|
<dxe:CheckEdit x:Name="chkSelectedAll" EditValueChanged="chkSelectedAll_EditValueChanged" EditValue="true" HorizontalAlignment="Center" HorizontalContentAlignment="Center"/> |
|
</DataTemplate> |
|
</dxg:GridColumn.HeaderTemplate> |
|
<dxg:GridColumn.CellTemplate> |
|
<DataTemplate> |
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> |
|
<CheckBox x:Name="checkBox" IsChecked="{Binding RowData.Row.State,Mode=TwoWay,Converter={StaticResource cvtStateDate}}" HorizontalAlignment="Center" VerticalAlignment="Center" Click="CheckBox_Click"/> |
|
<Image x:Name="img" Visibility="Collapsed" Width="16" Height="16" /> |
|
<dxe:ProgressBarEdit x:Name="labProgress" Visibility="Collapsed" Maximum="{Binding RowData.Row.Count}" EditValue="{Binding RowData.Row.Progress}" ShowBorder="False" IsPercent="True" ContentDisplayMode="Value" Content="正在执行…"> |
|
<dxe:ProgressBarEdit.DisplayFormatString> |
|
<sys:String>{0:p}</sys:String> |
|
</dxe:ProgressBarEdit.DisplayFormatString> |
|
</dxe:ProgressBarEdit> |
|
</Grid> |
|
<DataTemplate.Triggers> |
|
<DataTrigger Binding="{Binding RowData.Row.State,Mode=TwoWay}" Value="Waiting"> |
|
<Setter TargetName="checkBox" Property="Visibility" Value="Visible" /> |
|
<Setter TargetName="labProgress" Property="Visibility" Value="Collapsed" /> |
|
</DataTrigger> |
|
<DataTrigger Binding="{Binding RowData.Row.State}" Value="Delete"> |
|
<Setter TargetName="checkBox" Property="Visibility" Value="Visible" /> |
|
<Setter TargetName="labProgress" Property="Visibility" Value="Collapsed" /> |
|
</DataTrigger> |
|
<DataTrigger Binding="{Binding RowData.Row.State}" Value="BeingImport"> |
|
<Setter TargetName="checkBox" Property="Visibility" Value="Collapsed" /> |
|
<Setter TargetName="labProgress" Property="Visibility" Value="Visible" /> |
|
<Setter TargetName="img" Property="Visibility" Value="Collapsed" /> |
|
</DataTrigger> |
|
<DataTrigger Binding="{Binding RowData.Row.State}" Value="EndImport"> |
|
<Setter TargetName="checkBox" Property="Visibility" Value="Collapsed" /> |
|
<Setter TargetName="labProgress" Property="Visibility" Value="Collapsed" /> |
|
<Setter TargetName="img" Property="Visibility" Value="Visible" /> |
|
<Setter TargetName="img" Property="Source" Value="pack://siteoforigin:,,,/Images/Complate.png" /> |
|
</DataTrigger> |
|
</DataTemplate.Triggers> |
|
</DataTemplate> |
|
</dxg:GridColumn.CellTemplate> |
|
</dxg:GridColumn> |
|
<dxg:GridColumn Header="源图层" FieldName="S_TableAliasName" Width="200" ReadOnly="True" /> |
|
<dxg:GridColumn x:Name="colSTable" Header="目标图层" FieldName="T_TableName" Width="*" ReadOnly="True"> |
|
<dxg:GridColumn.CellTemplate> |
|
<DataTemplate> |
|
<dxlc:LayoutGroup> |
|
<ComboBox VerticalContentAlignment="Center" x:Name="cmbTargetTable" IsEditable="False" ItemsSource="{Binding RowData.Row.T_TableList}" SelectedValue="{Binding RowData.Row.T_TableName,Mode=TwoWay}" DisplayMemberPath="NAME" SelectedValuePath="CODE"/> |
|
</dxlc:LayoutGroup> |
|
</DataTemplate> |
|
</dxg:GridColumn.CellTemplate> |
|
</dxg:GridColumn> |
|
</dxg:GridControl.Columns> |
|
</dxg:GridControl> |
|
</dxlc:LayoutItem> |
|
<dxlc:LayoutItem IsRequired="True" Label="字段映射:" VerticalAlignment="Stretch" MaxWidth="240" LabelPosition="Top"> |
|
<dxg:GridControl x:Name="dgFieldMapping"> |
|
<dxg:GridControl.View> |
|
<dxg:TableView RowMinHeight="30" IsColumnMenuEnabled="False" ShowTotalSummary="False" AllowGrouping="False" MultiSelectMode="Row" ShowGroupPanel="False" AllowEditing="True" VerticalScrollbarVisibility="Auto" /> |
|
</dxg:GridControl.View> |
|
<dxg:GridControl.Columns> |
|
<dxg:GridColumn Header="源字段" FieldName="S_FieldName" Width="*" ReadOnly="True" /> |
|
<dxg:GridColumn x:Name="colSField" Header="目标字段" Width="*"> |
|
<dxg:GridColumn.CellTemplate> |
|
<DataTemplate> |
|
<ComboBox BorderThickness="0" ItemsSource="{Binding RowData.Row.FieldList}" IsEditable="False" SelectedValue="{Binding RowData.Row.T_FieldIndex}" DisplayMemberPath="DisplayName" SelectedValuePath="CODE" /> |
|
</DataTemplate> |
|
</dxg:GridColumn.CellTemplate> |
|
</dxg:GridColumn> |
|
</dxg:GridControl.Columns> |
|
</dxg:GridControl> |
|
</dxlc:LayoutItem> |
|
</dxlc:LayoutGroup> |
|
<dxlc:LayoutItem> |
|
<StackPanel Orientation="Horizontal"> |
|
<dxe:CheckEdit x:Name="cbReplace" IsChecked="True" Content="替换已有数据" /> |
|
</StackPanel> |
|
</dxlc:LayoutItem> |
|
<!--确定取消按钮--> |
|
<dxlc:LayoutItem> |
|
<TextBlock Text="注:将制作好的单独图层数据加载到工程中" TextWrapping="Wrap" Foreground="Red" ></TextBlock> |
|
</dxlc:LayoutItem> |
|
<dxlc:LayoutGroup> |
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Height="40"> |
|
<kuiBtn:KImgButton x:Name="btnOK" Content="确 定" Width="80" Height="30" CornerRadius="3" Margin="10,0" Foreground="White" Click="btnOK_Click" /> |
|
<kuiBtn:KImgButton x:Name="btnClose" Content="取 消" Width="80" Height="30" CornerRadius="3" Margin="10,0" Foreground="White" Click="btnClose_Click" /> |
|
</StackPanel> |
|
</dxlc:LayoutGroup> |
|
</dxlc:LayoutControl> |
|
</windows:BaseWindow>
|
|
|