2025-08-15 16:34:31 +08:00
|
|
|
<UserControl x:Class="SWS.CAD.Views.Dialog.DialogCablePreAssignResult"
|
|
|
|
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:telerik="http://schemas.telerik.com/2008/xaml/presentation"
|
|
|
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
|
xmlns:local="clr-namespace:SWS.CAD.Views.CustomControl"
|
2025-09-22 10:02:17 +08:00
|
|
|
xmlns:cvt="clr-namespace:SWS.Commons.Helper.Converter;assembly=SWS.Commons"
|
2025-08-15 16:34:31 +08:00
|
|
|
mc:Ignorable="d"
|
|
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
|
|
|
<UserControl.Resources>
|
|
|
|
<ResourceDictionary>
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
|
|
<ResourceDictionary Source="pack://application:,,,/SWS.CAD;component/Views/Style/CustomStyles.xaml" />
|
|
|
|
</ResourceDictionary.MergedDictionaries>
|
2025-09-22 10:02:17 +08:00
|
|
|
<!-- 转换器 -->
|
|
|
|
<cvt:RadioButtonValueConverter x:Key="RadioButtonValueCvt" />
|
|
|
|
|
|
|
|
<!-- 使用ItemsControl垂直显示多个值 -->
|
|
|
|
<DataTemplate x:Key="CellTemplate2">
|
|
|
|
<ItemsControl ItemsSource="{Binding Terms}">
|
|
|
|
<ItemsControl.ItemsPanel>
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
<StackPanel Orientation="Vertical"/>
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<Border BorderBrush="#cccccc" BorderThickness="0,0,0,1" Padding="0"
|
|
|
|
HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
|
|
|
<TextBlock Text="{Binding Term_No}" TextAlignment="Center" Padding="4,2" />
|
|
|
|
</Border>
|
|
|
|
</DataTemplate>
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
</ItemsControl>
|
|
|
|
</DataTemplate>
|
|
|
|
<DataTemplate x:Key="CellEditTemplate2">
|
|
|
|
<ItemsControl ItemsSource="{Binding Terms}">
|
|
|
|
<ItemsControl.ItemsPanel>
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
<StackPanel Orientation="Vertical"/>
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<TextBox Text="{Binding Term_No}" TextAlignment="Center" Padding="4,2" />
|
|
|
|
</DataTemplate>
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
</ItemsControl>
|
|
|
|
</DataTemplate>
|
2025-08-15 16:34:31 +08:00
|
|
|
</ResourceDictionary>
|
|
|
|
</UserControl.Resources>
|
|
|
|
<StackPanel Background="#5d6b99">
|
|
|
|
<local:customWindowTitleBar />
|
|
|
|
<Grid Margin="6" >
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition />
|
|
|
|
<RowDefinition />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid Grid.Row="0">
|
2025-09-22 10:02:17 +08:00
|
|
|
<StackPanel >
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<RadioButton IsChecked="{Binding SuccessOrFailure, Converter={StaticResource RadioButtonValueCvt},ConverterParameter=分配成功}" Content="分配成功" Foreground="White" GroupName="RadioButton1"/>
|
|
|
|
<RadioButton IsChecked="{Binding SuccessOrFailure, Converter={StaticResource RadioButtonValueCvt},ConverterParameter=分配失败}" Content="分配失败" Foreground="White" GroupName="RadioButton1"/>
|
|
|
|
</StackPanel>
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<GroupBox Margin="5,0,5,5"
|
|
|
|
Foreground="White"
|
|
|
|
VerticalAlignment="Bottom"
|
|
|
|
Header="预分配电缆列表">
|
|
|
|
<ListBox x:Name="treeView1" Width="120" Height="490" Background="White"
|
|
|
|
ItemsSource="{Binding PreAssignCables,Mode=TwoWay}" SelectedItem="{Binding SelectedPreAssignCable,Mode=TwoWay}"
|
|
|
|
Margin="5" telerik:StyleManager.Theme="Office_Blue"
|
|
|
|
|
|
|
|
>
|
|
|
|
<ListBox.ItemTemplate>
|
|
|
|
<HierarchicalDataTemplate ItemsSource="{Binding PreAssignCables,Mode=TwoWay}">
|
|
|
|
<TextBlock Text="{Binding TagNumber}">
|
|
|
|
</TextBlock>
|
|
|
|
</HierarchicalDataTemplate>
|
|
|
|
</ListBox.ItemTemplate>
|
|
|
|
</ListBox>
|
|
|
|
</GroupBox>
|
|
|
|
<GroupBox Margin="5,0,5,5"
|
|
|
|
Foreground="White"
|
|
|
|
Header="预分配信息">
|
|
|
|
<Grid Width="450" Height="500" Background="White">
|
|
|
|
<telerik:RadGridView x:Name="RadGridView1" SelectionMode="Single" Width="auto" Height="660"
|
|
|
|
AutoGenerateColumns="False" IsFilteringAllowed="False"
|
|
|
|
IsReadOnly="False" RowIndicatorVisibility="Collapsed"
|
|
|
|
ShowGroupPanel="False" telerik:StyleManager.Theme="Office_Blue"
|
|
|
|
ItemsSource="{Binding PreAllocationResultls}" SelectedItem="{Binding SelectedChannelInfo, Mode=TwoWay}"
|
|
|
|
>
|
|
|
|
<telerik:RadGridView.Columns>
|
|
|
|
<telerik:GridViewDataColumn Header="电缆对" DataMemberBinding="{Binding CablePair}" IsReadOnly="True"/>
|
|
|
|
<telerik:GridViewDataColumn Header="IO类型" DataMemberBinding="{Binding IOType}" IsReadOnly="True"/>
|
|
|
|
<telerik:GridViewDataColumn Header="预分配箱子" DataMemberBinding="{Binding ToPanel_TagNumber}" IsReadOnly="True"/>
|
|
|
|
<telerik:GridViewDataColumn Header="实际分配箱子" DataMemberBinding="{Binding Panel_TagNumber}" IsReadOnly="True"/>
|
|
|
|
<telerik:GridViewDataColumn Header="实际分配端子排" DataMemberBinding="{Binding StripName}" IsReadOnly="True"/>
|
|
|
|
<telerik:GridViewDataColumn Header="实际分配端子"
|
|
|
|
DataMemberBinding="{Binding Terms}"
|
|
|
|
Width="*" IsReadOnly="True"
|
|
|
|
CellTemplate="{StaticResource CellTemplate2}" CellEditTemplate="{StaticResource CellEditTemplate2}"/>
|
|
|
|
</telerik:RadGridView.Columns>
|
|
|
|
</telerik:RadGridView>
|
|
|
|
</Grid>
|
|
|
|
</GroupBox>
|
|
|
|
</StackPanel>
|
|
|
|
<TextBlock Text="{Binding SuccessOrFailure}" Foreground="White" FontSize="12" Margin="0 0 0 10"/>
|
2025-08-15 16:34:31 +08:00
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="1">
|
|
|
|
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
|
|
|
<telerik:RadButton Width="80" Margin="0 0 0 6" HorizontalAlignment="Right" Content="确定"
|
|
|
|
Command="{Binding OKCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window}}" />
|
|
|
|
<telerik:RadButton Width="80" Margin="10 0 0 6" HorizontalAlignment="Right" Content="取消"
|
|
|
|
Command="{Binding CloseCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window}}" />
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
</StackPanel>
|
|
|
|
</UserControl>
|