2025-09-23 16:38:40 +08:00
|
|
|
<UserControl x:Class="SWS.CAD.Views.Dialog.DialogSectionBox"
|
|
|
|
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:local="clr-namespace:SWS.CAD.Views.Dialog"
|
2025-10-09 18:08:19 +08:00
|
|
|
xmlns:CustomControl="clr-namespace:SWS.CAD.Views.CustomControl"
|
|
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
|
|
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
|
|
|
|
mc:Ignorable="d" >
|
|
|
|
<prism:Dialog.WindowStyle>
|
|
|
|
<Style TargetType="Window">
|
|
|
|
<Setter Property="Width" Value="1200"/>
|
|
|
|
<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"/>
|
|
|
|
</Style>
|
|
|
|
</prism:Dialog.WindowStyle>
|
|
|
|
<UserControl.Resources>
|
|
|
|
<ResourceDictionary>
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
|
|
<ResourceDictionary Source="pack://application:,,,/SWS.WPF;component/Style/CustomStyles.xaml" />
|
|
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
</ResourceDictionary>
|
|
|
|
</UserControl.Resources>
|
|
|
|
<telerik:RadBusyIndicator BusyContent="{Binding BusyContent}" IsBusy="{Binding IsBusy}">
|
|
|
|
<Grid>
|
|
|
|
<StackPanel Background="#f0f0f0">
|
|
|
|
<CustomControl:customWindowTitleBar/>
|
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="1*" />
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<StackPanel Grid.Column="0" Width="650">
|
|
|
|
<Label Content="开关配置列" FontSize="13" Margin="0"/>
|
|
|
|
<telerik:RadGridView
|
|
|
|
x:Name="dataGrid1"
|
|
|
|
telerik:StyleManager.Theme="Office_Blue"
|
|
|
|
RowIndicatorVisibility="Collapsed"
|
|
|
|
AutoGenerateColumns="False"
|
|
|
|
IsReadOnly="False"
|
|
|
|
IsFilteringAllowed="False"
|
|
|
|
ItemsSource="{Binding CircuitBreakerInfos}"
|
|
|
|
SelectedItem="{Binding SelectCircuitBreaker,Mode=TwoWay}"
|
|
|
|
SelectionMode="Single"
|
|
|
|
ShowGroupPanel="False"
|
|
|
|
Height="450"
|
|
|
|
Margin="5">
|
|
|
|
<telerik:EventToCommandBehavior.EventBindings>
|
|
|
|
<telerik:EventBinding Command="{Binding EditEndCmd}"
|
|
|
|
EventName="CellEditEnded"
|
|
|
|
PassEventArgsToCommand="True" />
|
|
|
|
</telerik:EventToCommandBehavior.EventBindings>
|
|
|
|
<telerik:RadGridView.Columns>
|
|
|
|
<telerik:GridViewDataColumn DataMemberBinding="{Binding Index}" Header="序号"/>
|
|
|
|
<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" Header="开关名称"/>
|
|
|
|
<telerik:GridViewDataColumn DataMemberBinding="{Binding Phase}" Header="相数"/>
|
|
|
|
<telerik:GridViewComboBoxColumn Header="类型"
|
|
|
|
ItemsSource="{Binding DataContext.CB_Typels, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadGridView}}}"
|
|
|
|
DataMemberBinding="{Binding CB_Type}"
|
|
|
|
Width="60"/>
|
|
|
|
<telerik:GridViewDataColumn DataMemberBinding="{Binding Capacity_Max}" Header="额定电流(A)"/>
|
|
|
|
<telerik:GridViewDataColumn DataMemberBinding="{Binding Capacity_Set}" Header="整定电流(A)"/>
|
|
|
|
<telerik:GridViewDataColumn DataMemberBinding="{Binding Capacity_Act}" Header="实际电流(A)"/>
|
|
|
|
<telerik:GridViewDataColumn DataMemberBinding="{Binding CableTagNumbers}" Header="电缆位号" IsReadOnly="True"/>
|
|
|
|
<telerik:GridViewDataColumn DataMemberBinding="{Binding RemoteDeviceId}" Header="另一端连接信息" IsReadOnly="True" Width="*"/>
|
|
|
|
</telerik:RadGridView.Columns>
|
|
|
|
</telerik:RadGridView>
|
|
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Column="1">
|
|
|
|
<telerik:RadButton Content="确定"
|
|
|
|
Style="{StaticResource sysBtn}"
|
|
|
|
Command="{Binding OKCommand}"
|
|
|
|
CommandParameter="{Binding Content,RelativeSource={RelativeSource Self}}"
|
|
|
|
Margin="5"/>
|
|
|
|
<telerik:RadButton Content="取消"
|
|
|
|
Style="{StaticResource sysBtn2}"
|
|
|
|
Command="{Binding CloseCommand}"
|
|
|
|
CommandParameter="{Binding Content,RelativeSource={RelativeSource Self}}"
|
|
|
|
Margin="5"/>
|
|
|
|
<telerik:RadButton Content="新增"
|
|
|
|
Style="{StaticResource sysBtn}"
|
|
|
|
Command="{Binding ButtonCmd}"
|
|
|
|
CommandParameter="{Binding Content,RelativeSource={RelativeSource Self}}"
|
|
|
|
Margin="0,40,0,0"/>
|
|
|
|
<telerik:RadButton Content="删除"
|
|
|
|
Style="{StaticResource sysBtn4}"
|
|
|
|
Command="{Binding ButtonCmd}"
|
|
|
|
CommandParameter="{Binding Content,RelativeSource={RelativeSource Self}}"
|
|
|
|
Margin="5"/>
|
|
|
|
<telerik:RadButton Content="关联电缆"
|
|
|
|
Style="{StaticResource sysBtn}"
|
|
|
|
Command="{Binding ButtonCmd}"
|
|
|
|
CommandParameter="{Binding Content,RelativeSource={RelativeSource Self}}"
|
|
|
|
Margin="5"/>
|
|
|
|
<telerik:RadButton Content="放置开关"
|
|
|
|
Style="{StaticResource sysBtn}"
|
|
|
|
Command="{Binding ButtonCmd}"
|
|
|
|
CommandParameter="{Binding Content,RelativeSource={RelativeSource Self}}"
|
|
|
|
Margin="5"/>
|
|
|
|
<Label Content="开关类型:" FontSize="12" Margin="0,40,0,0"/>
|
|
|
|
<ComboBox ItemsSource="{Binding BreakerTypels}" SelectedItem="{Binding DefaultBreakerType,Mode=TwoWay}" Margin="5"/>
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</telerik:RadBusyIndicator>
|
2025-09-23 16:38:40 +08:00
|
|
|
</UserControl>
|