年度变更建库软件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.
 
 

110 lines
8.9 KiB

<windows:BaseWindow xmlns:windows="clr-namespace:KGIS.Framework.Utils;assembly=KGIS.Framework.Utils"
x:Class="Kingo.Plugin.DataLoad.View.FrmLoadOtherData"
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:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:view="clr-namespace:Kingo.Plugin.DataLoad.View"
xmlns:kuiBtn="clr-namespace:KUI.Button;assembly=KUI"
mc:Ignorable="d" Width="600" Height="450" Title="参考数据加载" Closing="BaseWindow_Closing">
<windows:BaseWindow.Resources>
<view:DateConverter x:Key="cvtDate"/>
<view:StateConverter x:Key="cvtStateDate"/>
<Style TargetType="{x:Type dxg:GridColumn}">
<!--列头居中-->
<Setter Property="HorizontalHeaderContentAlignment" Value="Center" />
<!--列值居中-->
<Setter Property="EditSettings">
<Setter.Value>
<dxe:TextEditSettings HorizontalContentAlignment="Center" />
</Setter.Value>
</Setter>
</Style>
</windows:BaseWindow.Resources>
<Grid>
<dxlc:LayoutControl Orientation="Vertical">
<dxlc:LayoutGroup Orientation="Horizontal">
<dxlc:LayoutItem IsRequired="True" Label="选择参考数据:" LabelPosition="Left">
<dxe:ComboBoxEdit x:Name="cobDataBase" IsTextEditable="False" Height="30" SelectedIndexChanged="CobDataBase_SelectedIndexChanged" >
</dxe:ComboBoxEdit>
</dxlc:LayoutItem>
<kuiBtn:KImgButton Content="选 择" Width="80" Height="30" CornerRadius="3" Foreground="White" Click="btnSelectedOtherData_Click" />
<kuiBtn:KImgButton Content="选择shp" Width="80" Height="30" CornerRadius="3" Foreground="White" Click="BtnSelectedShpData_Click" Visibility="Collapsed"/>
</dxlc:LayoutGroup>
<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">
<dxg:GridControl.View>
<dxg:TableView Name="tvAttr" 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://application:,,,/Kingo.Plugin.DataLoad;component/Images/Complate.png" />
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn Header="源图层别名" FieldName="S_TableAliasName" Width="200" ReadOnly="True" />
<dxg:GridColumn Header="目标图层别名" FieldName="T_TableAliasName" Width="200" ReadOnly="False" />
</dxg:GridControl.Columns>
</dxg:GridControl>
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
<dxlc:LayoutItem>
<dxe:CheckEdit x:Name="cbCopyBaseData" IsChecked="True" Content="外部数据拷贝至工作目录参考数据文件夹中" />
</dxlc:LayoutItem>
<dxlc:LayoutItem>
<TextBlock Text="提示:目标图层别名默认获取源图层别名,若需要修改,请单击或者双击目标图层别名单元格进行修改" TextWrapping="Wrap" Foreground="#3366ff" ></TextBlock>
</dxlc:LayoutItem>
<dxlc:LayoutItem>
<TextBlock Text="注:可以将收集到的格式为.gdb、.mdb、.shp、.vct的参考数据加载到软件中,方便对比查看" TextWrapping="Wrap" Foreground="Red" ></TextBlock>
</dxlc:LayoutItem>
<dxlc:LayoutItem>
<StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Center">
<kuiBtn:KImgButton x:Name="btnLoad" Content="加 载" Width="80" Height="30" CornerRadius="3" Margin="10,10" Foreground="White" Click="BtnLoad_Click" />
<kuiBtn:KImgButton x:Name="btnClose" Content="取 消" Width="80" Height="30" CornerRadius="3" Margin="10,10" Foreground="White" Click="btnClose_Click" />
</StackPanel>
</dxlc:LayoutItem>
</dxlc:LayoutControl>
</Grid>
</windows:BaseWindow>