2025-08-15 16:34:31 +08:00

94 lines
6.2 KiB
XML

<UserControl x:Class="SWS.CAD.Views.Dialog.DialogCableConnection_NewStrip"
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:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:prism="http://prismlibrary.com/"
xmlns:CustomControl="clr-namespace:SWS.CAD.Views.CustomControl"
xmlns:local="clr-namespace:SWS.CAD.Views.Dialog"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<prism:Dialog.WindowStyle>
<Style TargetType="Window">
<Setter Property="Width" Value="1000"/>
<Setter Property="Height" Value="800"/>
<Setter Property="WindowState" Value="Normal"/>
<Setter Property="WindowStyle" Value="None"/>
<Setter Property="ResizeMode" Value="NoResize"/>
<Setter Property="ShowInTaskbar" Value="True"/>
<Setter Property="Visibility" Value="Visible"/>
</Style>
</prism:Dialog.WindowStyle>
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/SWS.CAD;component/Views/Style/CustomStyles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<telerik:RadBusyIndicator BusyContent="{Binding BusyContent}" IsBusy="{Binding IsBusy}">
<Grid>
<StackPanel>
<CustomControl:customWindowTitleBar/>
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" Width="300">
<telerik:RadGridView x:Name="RadGridView1" SelectionMode="Single" Width="auto" Height="450"
AutoGenerateColumns="False" IsFilteringAllowed="False"
IsReadOnly="False" RowIndicatorVisibility="Collapsed"
ShowGroupPanel="False" telerik:StyleManager.Theme="Office_Blue"
ItemsSource="{Binding StripInfos}" SelectedItem="{Binding SelectedStripInfo, Mode=TwoWay}"
>
<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="序号" DataMemberBinding="{Binding Index}" IsReadOnly="True" Width="40"/>
<telerik:GridViewDataColumn Header="端子名" DataMemberBinding="{Binding StripName}" Width="*"/>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
</Grid>
<Grid Grid.Column="1">
<StackPanel>
<GroupBox Margin="5" VerticalAlignment="Bottom" Header="端子排">
<StackPanel>
<TextBlock Text="选择端子排:" Margin="0 20 0 0"/>
<telerik:RadComboBox Margin="0 0 0 5"
ItemsSource="{Binding StripList}"
SelectedItem="{Binding SelectedStrip, Mode=TwoWay}"
DisplayMemberPath="StripName"
SelectedValuePath="Id"/>
<telerik:RadButton Width="80" Margin="0 20 0 5" HorizontalAlignment="Center" Content="删除" telerik:StyleManager.Theme="Office_Blue"
Command="{Binding TableButtonCmd}" CommandParameter="{Binding Content,RelativeSource={RelativeSource Self}}" />
<telerik:RadButton Width="80" Margin="0 0 0 5" HorizontalAlignment="Center" Content="更新" telerik:StyleManager.Theme="Office_Blue"
Command="{Binding TableButtonCmd}" CommandParameter="{Binding Content,RelativeSource={RelativeSource Self}}" />
<TextBox Margin="0 20 0 5" Text="{Binding NewStripName, UpdateSourceTrigger=PropertyChanged}" />
<telerik:RadButton Width="80" Margin="0 0 0 5" HorizontalAlignment="Center" Content="新增" telerik:StyleManager.Theme="Office_Blue"
Command="{Binding TableButtonCmd}" CommandParameter="{Binding Content,RelativeSource={RelativeSource Self}}"/>
</StackPanel>
</GroupBox>
<telerik:RadButton Content="清空端子" Margin="0 20 0 0" telerik:StyleManager.Theme="Office_Blue"
Command="{Binding TableButtonCmd}" Width="80"
CommandParameter="{Binding Content,RelativeSource={RelativeSource Self}}" />
<telerik:RadButton Content="添加一页" Margin="5" telerik:StyleManager.Theme="Office_Blue"
Command="{Binding TableButtonCmd}" Width="80"
CommandParameter="{Binding Content,RelativeSource={RelativeSource Self}}" />
</StackPanel>
</Grid>
</Grid>
</StackPanel>
</Grid>
</telerik:RadBusyIndicator>
</UserControl>