CHEN-ZW\acer c76c8ada14 Merge branch 'main' of http://27.154.35.18:7053/yuxingheng/009_DI-Elec
# Conflicts:
#	newFront/c#前端/SWS.CAD/Commands.cs
#	newFront/c#前端/SWS.Electrical/obj/Debug/Views/DialogTest2.g.i.cs
#	newFront/c#前端/SWS.Electrical/obj/Debug/Views/SWSDialogWindow.g.cs
#	newFront/c#前端/SWS.Electrical/obj/Debug/Views/SWSDialogWindow.g.i.cs
#	newFront/c#前端/SWS.WPF/obj/Debug/Views/CustomDialogWindow.g.cs
#	newFront/c#前端/SWS.WPF/obj/Debug/Views/CustomDialogWindow.g.i.cs
2025-10-09 18:08:19 +08:00

139 lines
9.1 KiB
XML

<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"
xmlns:cvt="clr-namespace:SWS.Commons.Helper.Converter;assembly=SWS.Commons"
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>
<!-- 转换器 -->
<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>
</ResourceDictionary>
</UserControl.Resources>
<StackPanel Background="#5d6b99">
<local:customWindowTitleBar />
<Grid Margin="6" >
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<StackPanel >
<DockPanel>
<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 Width="20" HorizontalAlignment="Right">
<telerik:RadPathButton PathGeometry="{telerik:RadGlyph Glyph=&#xe134;}"
ToolTip="导出电缆预分配结果明细表"
Command="{Binding HeadButtonCmd}"
CommandParameter="{Binding ToolTip,RelativeSource={RelativeSource Self}}">
</telerik:RadPathButton>
</StackPanel>
</DockPanel>
<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,0,5"
Foreground="White"
Header="预分配信息">
<Grid Width="480" 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:EventToCommandBehavior.EventBindings>
<telerik:EventBinding
Command="{Binding EditEndCmd}"
EventName="CellEditEnded"
PassEventArgsToCommand="True" />
</telerik:EventToCommandBehavior.EventBindings>
<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"/>
</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>