台架程序tp化
This commit is contained in:
@@ -195,8 +195,7 @@
|
||||
</Ellipse.Style>
|
||||
</Ellipse>
|
||||
<TextBlock Text="{Binding ConnectionStatus}" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" Margin="0,0,20,0"/>
|
||||
<Button Content="配置连接" Width="100" Margin="0" Command="{Binding OpenConfigCommand}"/>
|
||||
<Button Content="连接" Width="80" Margin="8,0,0,0" Style="{StaticResource ConnectButtonStyle}" Command="{Binding ConnectCommand}"/>
|
||||
<Button Content="连接" Width="80" Margin="0" Style="{StaticResource ConnectButtonStyle}" Command="{Binding ConnectCommand}"/>
|
||||
<Button Content="断开" Width="80" Margin="8,0,0,0" Style="{StaticResource StopButtonStyle}" Command="{Binding DisconnectCommand}"/>
|
||||
<Button Content="刷新状态" Width="90" Margin="8,0,0,0" Command="{Binding ReadStatusCommand}"/>
|
||||
</StackPanel>
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
<UserControl x:Class="BenchMovementModule.Views.Dialogs.GantryConfigDialogView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:helpers="clr-namespace:UIShare.Helpers;assembly=UIShare"
|
||||
xmlns:converters="clr-namespace:UIShare.Converters;assembly=UIShare"
|
||||
mc:Ignorable="d"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
Background="White"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True"
|
||||
Width="440"
|
||||
Height="380">
|
||||
<prism:Dialog.WindowStyle>
|
||||
<Style BasedOn="{StaticResource DialogUserManageStyle}"
|
||||
TargetType="Window" />
|
||||
</prism:Dialog.WindowStyle>
|
||||
|
||||
<UserControl.Resources>
|
||||
<converters:StringToVisibilityConverter x:Key="StringToVisibility"/>
|
||||
</UserControl.Resources>
|
||||
|
||||
<GroupBox Padding="12,8,12,8"
|
||||
helpers:WindowDragHelper.EnableWindowDrag="True">
|
||||
<GroupBox.Header>
|
||||
<Grid Margin="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Title}"
|
||||
Foreground="White"
|
||||
VerticalAlignment="Center"
|
||||
Margin="5,0,10,0" />
|
||||
</Grid>
|
||||
</GroupBox.Header>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- 连接配置表单 -->
|
||||
<Grid Grid.Row="0" Margin="0,4,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="120"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
Text="IP 地址:"
|
||||
VerticalAlignment="Center" Margin="0,6"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Margin="0,6"
|
||||
materialDesign:HintAssist.Hint=""
|
||||
Text="{Binding IpAddress, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0"
|
||||
Text="端口:"
|
||||
VerticalAlignment="Center" Margin="0,6"/>
|
||||
<ComboBox Grid.Row="1" Grid.Column="1" Margin="0,6"
|
||||
IsEditable="True"
|
||||
materialDesign:HintAssist.Hint=""
|
||||
ItemsSource="{Binding CommonPorts}"
|
||||
Text="{Binding Port, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
|
||||
<TextBlock Grid.Row="2" Grid.Column="0"
|
||||
Text="发送超时(ms):"
|
||||
VerticalAlignment="Center" Margin="0,6"/>
|
||||
<ComboBox Grid.Row="2" Grid.Column="1" Margin="0,6"
|
||||
IsEditable="True"
|
||||
materialDesign:HintAssist.Hint=""
|
||||
ItemsSource="{Binding CommonTimeouts}"
|
||||
Text="{Binding SendTimeout, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
|
||||
<TextBlock Grid.Row="3" Grid.Column="0"
|
||||
Text="接收超时(ms):"
|
||||
VerticalAlignment="Center" Margin="0,6"/>
|
||||
<ComboBox Grid.Row="3" Grid.Column="1" Margin="0,6"
|
||||
IsEditable="True"
|
||||
materialDesign:HintAssist.Hint=""
|
||||
ItemsSource="{Binding CommonTimeouts}"
|
||||
Text="{Binding ReceiveTimeout, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
</Grid>
|
||||
|
||||
<!-- 连接状态 -->
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,8,0,0">
|
||||
<Ellipse Width="12" Height="12" Margin="0,0,6,0">
|
||||
<Ellipse.Style>
|
||||
<Style TargetType="Ellipse">
|
||||
<Setter Property="Fill" Value="#999999"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsConnected}" Value="True">
|
||||
<Setter Property="Fill" Value="#5CB85C"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Ellipse.Style>
|
||||
</Ellipse>
|
||||
<TextBlock Text="{Binding ConnectionStatus}" FontSize="14" FontWeight="Bold" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- 错误提示 -->
|
||||
<TextBlock Grid.Row="2"
|
||||
Margin="0,8,0,0"
|
||||
Foreground="#D32F2F"
|
||||
TextWrapping="Wrap"
|
||||
Text="{Binding ErrorMessage}"
|
||||
Visibility="{Binding ErrorMessage, Converter={StaticResource StringToVisibility}}"/>
|
||||
|
||||
<!-- 按钮区 -->
|
||||
<StackPanel Grid.Row="3"
|
||||
Orientation="Horizontal"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,12,0,0">
|
||||
<Button Content="连接台架"
|
||||
Width="100" Padding="0,4"
|
||||
Margin="0,0,10,0"
|
||||
Command="{Binding ConnectCommand}"/>
|
||||
<Button Content="断开台架"
|
||||
Width="100" Padding="0,4"
|
||||
Margin="0,0,10,0"
|
||||
Command="{Binding DisconnectCommand}"/>
|
||||
<Button Content="关闭"
|
||||
Width="80" Padding="0,4"
|
||||
IsDefault="True"
|
||||
Command="{Binding CloseCommand}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</UserControl>
|
||||
@@ -1,12 +0,0 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace BenchMovementModule.Views.Dialogs
|
||||
{
|
||||
public partial class GantryConfigDialogView : UserControl
|
||||
{
|
||||
public GantryConfigDialogView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user