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.
108 lines
8.6 KiB
108 lines
8.6 KiB
<windows:BaseWindow xmlns:windows="clr-namespace:KGIS.Framework.Utils;assembly=KGIS.Framework.Utils" |
|
x:Class="Kingo.Plugin.DataLoad.View.FrmLoadBaseData" |
|
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: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="BtnSelectedBaseData_Click" /> |
|
</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" HorizontalContentAlignment="Left" VerticalScrollbarVisibility="Auto" /> |
|
</dxg:GridControl.View> |
|
<dxg:GridControl.Columns> |
|
<dxg:GridColumn Header="导入状态" Width="50" HorizontalHeaderContentAlignment="Center" > |
|
<dxg:GridColumn.HeaderTemplate> |
|
<DataTemplate> |
|
<dxe:CheckEdit x:Name="chkSelectedAll" EditValueChanged="ChkSelectedAll_EditValueChanged" EditValue="true" HorizontalAlignment="Center" HorizontalContentAlignment="Center" IsChecked="False"/> |
|
</DataTemplate> |
|
</dxg:GridColumn.HeaderTemplate> |
|
<dxg:GridColumn.CellTemplate> |
|
<DataTemplate> |
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> |
|
<CheckBox x:Name="checkBox" IsChecked="{Binding RowData.Row.IsLoad,Mode=TwoWay}" HorizontalAlignment="Center" VerticalAlignment="Center" Click="CheckBox_Click"/> |
|
<Image x:Name="img" Visibility="Collapsed" Width="16" Height="16" /> |
|
</Grid> |
|
<DataTemplate.Triggers> |
|
<DataTrigger Binding="{Binding RowData.Row.LoadLayerState,Mode=TwoWay}" Value="Waiting"> |
|
<Setter TargetName="checkBox" Property="Visibility" Value="Visible" /> |
|
</DataTrigger> |
|
<DataTrigger Binding="{Binding RowData.Row.LoadLayerState}" Value="Delete"> |
|
<Setter TargetName="checkBox" Property="Visibility" Value="Visible" /> |
|
<Setter TargetName="img" Property="Visibility" Value="Visible" /> |
|
</DataTrigger> |
|
<DataTrigger Binding="{Binding RowData.Row.LoadLayerState}" Value="BeingImport"> |
|
<Setter TargetName="checkBox" Property="Visibility" Value="Collapsed" /> |
|
<Setter TargetName="img" Property="Visibility" Value="Collapsed" /> |
|
</DataTrigger> |
|
<DataTrigger Binding="{Binding RowData.Row.LoadLayerState}" Value="EndImport"> |
|
<Setter TargetName="checkBox" 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="LayerName" Width="120" ReadOnly="True" /> |
|
<dxg:GridColumn Header="源图层名" FieldName="FcName" Width="120" ReadOnly="True" /> |
|
<dxg:GridColumn Header="源图层路径" FieldName="FcPath" Width="*" ReadOnly="True" /> |
|
<dxg:GridColumn Header="操作" Width="60"> |
|
<dxg:GridColumn.CellTemplate> |
|
<DataTemplate> |
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> |
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"> |
|
<TextBlock x:Name="txt_Delete" Width="30" HorizontalAlignment="Center" VerticalAlignment="Center" Tag="{Binding RowData.Row.FcName}" MouseLeftButtonDown="Txt_Delete_MouseLeftButtonDown" Cursor="Hand" Text="选择" Foreground="Blue" Margin="15,0,0,0"/> |
|
</StackPanel> |
|
<!--<kui:KFontIconButton Style="{StaticResource FButton_LinkButton }" />--> |
|
</Grid> |
|
</DataTemplate> |
|
</dxg:GridColumn.CellTemplate> |
|
</dxg:GridColumn> |
|
</dxg:GridControl.Columns> |
|
</dxg:GridControl> |
|
</dxlc:LayoutItem> |
|
</dxlc:LayoutGroup> |
|
<dxlc:LayoutItem> |
|
<StackPanel Orientation="Horizontal"> |
|
<TextBlock Text="注:将国家下发的基础数据加载到工程中,同时会自动将国家下发的基础数据拷贝至工作目录下的年初数据中" TextWrapping="Wrap" Width="580" Foreground="Red" ></TextBlock> |
|
</StackPanel> |
|
</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>
|
|
|