131 lines
7.8 KiB
XML
131 lines
7.8 KiB
XML
<UserControl x:Class="SWS.CAD.Views.Dialog.DialogCableConfig"
|
|
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"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="450" d:DesignWidth="400">
|
|
<UserControl.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="pack://application:,,,/SWS.CAD;component/Views/Style/CustomStyles.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
<DataTemplate x:Key="CellTemplate1">
|
|
<ItemsControl ItemsSource="{Binding Indexs}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Vertical"/>
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding}" TextAlignment="Center" Padding="4,2" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</DataTemplate>
|
|
|
|
<DataTemplate x:Key="CellTemplate2">
|
|
<ItemsControl ItemsSource="{Binding Wire_Tags}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Vertical"/>
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Wire_Tag}" TextAlignment="Center" Padding="4,2" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</DataTemplate>
|
|
|
|
<DataTemplate x:Key="CellTemplate3">
|
|
<ItemsControl ItemsSource="{Binding Polaritys}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Vertical"/>
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Polarity}" TextAlignment="Center" Padding="4,2" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</DataTemplate>
|
|
|
|
</ResourceDictionary>
|
|
</UserControl.Resources>
|
|
<StackPanel Background="#5d6b99">
|
|
<local:customWindowTitleBar />
|
|
<Grid >
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="9*"/>
|
|
<ColumnDefinition Width="auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Margin="5">
|
|
<TextBlock Text="电缆连接信" Foreground="White"/>
|
|
<telerik:RadGridView Name="RadGridView1"
|
|
Grid.Row="2"
|
|
telerik:StyleManager.Theme="Office_Blue"
|
|
AutoGenerateColumns="False" IsFilteringAllowed="False"
|
|
IsReadOnly="{Binding IsReadOnly,Mode=TwoWay}" RowIndicatorVisibility="Collapsed"
|
|
ItemsSource="{Binding CableSetInfos,Mode=TwoWay}"
|
|
SelectedItem="{Binding SelectedStripParametersInfo}"
|
|
LeftFrozenColumnCount="0"
|
|
ShowGroupPanel="False"
|
|
Width="500" Height="400">
|
|
<i:Interaction.Triggers>
|
|
<i:EventTrigger EventName="CellEditEnded">
|
|
<i:InvokeCommandAction Command="{Binding EditEndCmd}"
|
|
CommandParameter="{Binding EventArgs}"/>
|
|
</i:EventTrigger>
|
|
</i:Interaction.Triggers>
|
|
<telerik:RadGridView.Columns>
|
|
<telerik:GridViewDataColumn Header="序号" CellTemplate="{StaticResource CellTemplate1}" IsReadOnly="True"/>
|
|
<telerik:GridViewDataColumn Header="电缆对" DataMemberBinding="{Binding CableSetName}" IsReadOnly="True"/>
|
|
<telerik:GridViewDataColumn Header="电缆线号" CellTemplate="{StaticResource CellTemplate2}" IsReadOnly="True"/>
|
|
<telerik:GridViewDataColumn Header="极性" CellTemplate="{StaticResource CellTemplate3}" IsReadOnly="True"/>
|
|
<telerik:GridViewDataColumn Header="通道号" DataMemberBinding="{Binding ChannelNumber}" IsReadOnlyBinding="{Binding IsConned}"/>
|
|
<telerik:GridViewDataColumn Header="占用状态" DataMemberBinding="{Binding OccupancyState}" IsReadOnly="True" Width="*">
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock
|
|
Text="{Binding OccupancyState}"
|
|
TextTrimming="CharacterEllipsis"
|
|
ToolTip="{Binding OccupancyState}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
</telerik:RadGridView.Columns>
|
|
</telerik:RadGridView>
|
|
<GroupBox VerticalAlignment="Center" Header="电缆连接端子" Foreground="White" >
|
|
<StackPanel Orientation="Horizontal">
|
|
<StackPanel Orientation="Horizontal" Margin="5">
|
|
<Label Content="起始电缆" Foreground="White" Margin="0,2,0,0" Width="80"/>
|
|
<ComboBox ItemsSource="{Binding StartCables}" SelectedItem="{Binding StartCable}" Width="100" Height="20"/>
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal" Margin="5">
|
|
<Label Content="起始通道" Foreground="White" Margin="0,2,0,0" Width="80"/>
|
|
<ComboBox ItemsSource="{Binding StartChannels}" SelectedItem="{Binding StartChannel}" Width="100" Height="20" />
|
|
</StackPanel>
|
|
<Button Content="连接" Command="{Binding ConnectButtonCmd}" Width="80" Height="20" />
|
|
</StackPanel>
|
|
</GroupBox>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="1" Margin="5">
|
|
<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="0 0 0 6" HorizontalAlignment="Right" Content="取消"
|
|
Command="{Binding CloseCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window}}" />
|
|
<telerik:RadButton Width="80" Margin="0 0 0 6" HorizontalAlignment="Right" Content="清除配置" IsEnabled="{Binding IsEnabledDeleteCableProfile}"
|
|
Command="{Binding DeleteCableProfileCmd}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window}}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</StackPanel>
|
|
</UserControl>
|