2024-12-05 14:15:08 +08:00
|
|
|
<hc:GlowWindow
|
2024-12-04 14:21:35 +08:00
|
|
|
x:Class="Sinvo.EplanHpD.Plugin.WPFUI.View.LayoutHelperWindow"
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
|
|
xmlns:local="clr-namespace:Sinvo.EplanHpD.Plugin.WPFUI.View"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2024-12-10 17:02:58 +08:00
|
|
|
xmlns:viewmodel="clr-namespace:Sinvo.EplanHpD.Plugin.WPFUI.ViewModel"
|
2024-12-04 14:21:35 +08:00
|
|
|
Title="布线助手"
|
|
|
|
Width="450"
|
2024-12-10 17:02:58 +08:00
|
|
|
Height="260"
|
2024-12-04 14:21:35 +08:00
|
|
|
MinWidth="450"
|
2024-12-10 17:02:58 +08:00
|
|
|
MinHeight="260"
|
|
|
|
d:DataContext="{d:DesignInstance Type=viewmodel:LayoutHelperViewModel}"
|
2024-12-05 14:15:08 +08:00
|
|
|
ActiveGlowColor="{DynamicResource PrimaryColor}"
|
|
|
|
Background="White"
|
2024-12-10 17:02:58 +08:00
|
|
|
Left="1460"
|
|
|
|
Loaded="GlowWindow_Loaded"
|
|
|
|
Top="770"
|
|
|
|
WindowStartupLocation="Manual"
|
2024-12-04 14:21:35 +08:00
|
|
|
mc:Ignorable="d">
|
|
|
|
<Window.Resources>
|
|
|
|
<ResourceDictionary>
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
|
|
<ResourceDictionary Source="pack://application:,,,/Sinvo.EplanHpD.Plugin.WPFUI;component/Themes/Theme.xaml" />
|
|
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
</ResourceDictionary>
|
|
|
|
</Window.Resources>
|
2024-12-05 14:15:08 +08:00
|
|
|
<Border Background="{DynamicResource MainContentForegroundDrawingBrush}">
|
|
|
|
<Grid Margin="2">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="15" />
|
|
|
|
<RowDefinition Height="30" />
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
<RowDefinition Height="30" />
|
|
|
|
<RowDefinition Height="30" />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<hc:SimpleStackPanel Grid.Row="0" Orientation="Horizontal">
|
2024-12-10 17:02:58 +08:00
|
|
|
<!--<TextBlock FontSize="14" TextWrapping="Wrap">
|
2024-12-05 14:15:08 +08:00
|
|
|
<Run Text="选中的电机:" />
|
2024-12-10 17:02:58 +08:00
|
|
|
<Run Foreground="{StaticResource DangerBrush}" Text="{Binding SelectMotorModel}" />
|
|
|
|
</TextBlock>-->
|
2024-12-05 14:15:08 +08:00
|
|
|
<TextBlock
|
2024-12-10 17:02:58 +08:00
|
|
|
Margin="0,0,0,0"
|
2024-12-05 14:15:08 +08:00
|
|
|
FontSize="14"
|
|
|
|
TextWrapping="Wrap">
|
|
|
|
<Run Text="当前布线的电机:" />
|
2024-12-10 17:02:58 +08:00
|
|
|
<Run Foreground="{StaticResource DangerBrush}" Text="{Binding Motor.MotorModelStr}" />
|
|
|
|
<Run Text=" " />
|
|
|
|
<Run Text="轴号:" />
|
|
|
|
<Run Foreground="{StaticResource DangerBrush}" Text="{Binding SelectedLine.AxisNo}" />
|
2024-12-05 14:15:08 +08:00
|
|
|
</TextBlock>
|
|
|
|
</hc:SimpleStackPanel>
|
|
|
|
<StackPanel Grid.Row="1" VerticalAlignment="Center">
|
|
|
|
<TextBlock VerticalAlignment="Center" FontSize="14">
|
|
|
|
<Run Text="当前线段:" />
|
2024-12-10 17:02:58 +08:00
|
|
|
<Run Foreground="{StaticResource DangerBrush}" Text="{Binding SelectedLine.CableConnectionClass}" />
|
|
|
|
<Run Text=" " />
|
2024-12-05 14:15:08 +08:00
|
|
|
<Run Text="当前线类型:" />
|
2024-12-10 17:02:58 +08:00
|
|
|
<Run Foreground="{StaticResource DangerBrush}" Text="{Binding SelectedLine.CableType}" />
|
|
|
|
|
2024-12-05 14:15:08 +08:00
|
|
|
</TextBlock>
|
|
|
|
</StackPanel>
|
|
|
|
<ListView
|
|
|
|
Grid.Row="2"
|
|
|
|
hc:GridViewAttach.ColumnHeaderHeight="10"
|
2024-12-10 17:02:58 +08:00
|
|
|
ItemsSource="{Binding SubLines}"
|
2024-12-05 14:15:08 +08:00
|
|
|
Style="{StaticResource ListView.Small}">
|
|
|
|
<ListView.View>
|
|
|
|
<GridView>
|
2024-12-10 17:02:58 +08:00
|
|
|
<GridViewColumn
|
|
|
|
Width="80"
|
|
|
|
DisplayMemberBinding="{Binding CableType}"
|
|
|
|
Header="线类型" />
|
|
|
|
<GridViewColumn Header="线型号">
|
|
|
|
<GridViewColumn.CellTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<TextBox IsReadOnly="True" Text="{Binding CableModel}" />
|
|
|
|
</DataTemplate>
|
|
|
|
</GridViewColumn.CellTemplate>
|
|
|
|
</GridViewColumn>
|
2024-12-05 14:15:08 +08:00
|
|
|
</GridView>
|
|
|
|
</ListView.View>
|
|
|
|
</ListView>
|
|
|
|
<hc:SimpleStackPanel Grid.Row="3">
|
|
|
|
<TextBlock TextWrapping="Wrap">
|
|
|
|
<Run Text="选中的线:" />
|
|
|
|
</TextBlock>
|
|
|
|
<TextBlock>
|
2024-12-10 17:02:58 +08:00
|
|
|
<Run Text="{Binding SelectLineName}" />
|
2024-12-05 14:15:08 +08:00
|
|
|
</TextBlock>
|
|
|
|
</hc:SimpleStackPanel>
|
|
|
|
<hc:SimpleStackPanel Grid.Row="4" VerticalAlignment="Bottom">
|
|
|
|
<DockPanel HorizontalAlignment="Stretch">
|
|
|
|
<Button
|
2024-12-10 17:02:58 +08:00
|
|
|
Click="PrevBtn_Click"
|
2024-12-05 14:15:08 +08:00
|
|
|
Content="上一根线"
|
|
|
|
DockPanel.Dock="Left"
|
2024-12-10 17:02:58 +08:00
|
|
|
IsEnabled="{Binding HasPrev}"
|
2024-12-05 14:15:08 +08:00
|
|
|
Style="{StaticResource ButtonDanger}" />
|
|
|
|
<Button
|
|
|
|
HorizontalAlignment="Right"
|
2024-12-10 17:02:58 +08:00
|
|
|
Click="NextBtn_Click"
|
2024-12-05 14:15:08 +08:00
|
|
|
Content="下一根线"
|
|
|
|
DockPanel.Dock="Right"
|
2024-12-10 17:02:58 +08:00
|
|
|
IsEnabled="{Binding HasNext}"
|
2024-12-05 14:15:08 +08:00
|
|
|
Style="{StaticResource ButtonPrimary}" />
|
2024-12-10 17:02:58 +08:00
|
|
|
<Button DockPanel.Dock="Right" Style="{StaticResource ButtonSuccess}">
|
|
|
|
<TextBlock>
|
|
|
|
<Run Text="{Binding SelectedLine.AxisNo}" />
|
|
|
|
<Run Text="-" />
|
|
|
|
<Run Text="{Binding SelectedLine.CurrentLine}" />
|
|
|
|
</TextBlock>
|
|
|
|
</Button>
|
2024-12-05 14:15:08 +08:00
|
|
|
</DockPanel>
|
|
|
|
</hc:SimpleStackPanel>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
</hc:GlowWindow>
|