|
@@ -8,41 +8,40 @@
|
|
|
mc:Ignorable="d"
|
|
|
WindowStyle="ToolWindow" WindowStartupLocation="CenterScreen"
|
|
|
Title="PLC配置" Height="600" Width="1200">
|
|
|
- <Window.Resources>
|
|
|
- <Style TargetType="TextBox">
|
|
|
- <Setter Property="Height" Value="25"/>
|
|
|
- <Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
|
- </Style>
|
|
|
- </Window.Resources>
|
|
|
<Window.DataContext>
|
|
|
<viewmodels:PLCSetViewModel/>
|
|
|
</Window.DataContext>
|
|
|
<Grid Background="White">
|
|
|
+ <Grid.Resources>
|
|
|
+ <Style TargetType="TextBlock" BasedOn="{StaticResource TextBlockStyle}">
|
|
|
+ <Setter Property="Margin" Value="10 0 0 0"/>
|
|
|
+ </Style>
|
|
|
+ </Grid.Resources>
|
|
|
<Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="30"/>
|
|
|
- <RowDefinition Height="30"/>
|
|
|
+ <RowDefinition Height="auto"/>
|
|
|
+ <RowDefinition Height="auto"/>
|
|
|
<RowDefinition Height="*"/>
|
|
|
</Grid.RowDefinitions>
|
|
|
<WrapPanel Grid.Row="0" Orientation="Horizontal">
|
|
|
- <Label Content="IP地址:"/>
|
|
|
- <TextBox x:Name="PlcIpAddress" DockPanel.Dock="Left" Width="120"/>
|
|
|
- <Label Content="端口号:"/>
|
|
|
- <TextBox x:Name="PlcPort" DockPanel.Dock="Left" Width="120"/>
|
|
|
+ <TextBlock Text="IP地址:"/>
|
|
|
+ <My:MTextBox x:Name="PlcIpAddress" DockPanel.Dock="Left"/>
|
|
|
+ <TextBlock Text="端口号:"/>
|
|
|
+ <My:MTextBox x:Name="PlcPort" DockPanel.Dock="Left"/>
|
|
|
<My:MButton Type="Primary" x:Name="BtnChangeIpAndPort" Content="修改IP地址端口号" Click="BtnChangeIpAndPort_Click" />
|
|
|
<My:MButton Type="Primary" x:Name="BtnConnectPLC" Content="连接PLC" Click="BtnConnectPLC_Click" />
|
|
|
<My:MButton Type="Primary" x:Name="BtnStartPlcLogMonitor" Content="开启PLC监控" Click="BtnStartPlcLogMonitor_Click" />
|
|
|
<My:MButton Type="Primary" x:Name="BtnDisConnectPLC" Content="断开PLC连接" Click="BtnDisConnectPLC_Click" />
|
|
|
</WrapPanel>
|
|
|
<WrapPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center">
|
|
|
- <Label Content="PLC地址:"/>
|
|
|
- <TextBox x:Name="PlcAddress" DockPanel.Dock="Left" Width="100"/>
|
|
|
- <Label Content="写入值:"/>
|
|
|
- <TextBox x:Name="TxbWriteValue" DockPanel.Dock="Left" Width="150"/>
|
|
|
- <Label Content="长度:"/>
|
|
|
- <TextBox x:Name="DataLength" DockPanel.Dock="Left" Text="1" Width="50"/>
|
|
|
- <Label Content="数据类型:"/>
|
|
|
+ <TextBlock Text="PLC地址:"/>
|
|
|
+ <My:MTextBox x:Name="PlcAddress" DockPanel.Dock="Left" />
|
|
|
+ <TextBlock Text="写入值:"/>
|
|
|
+ <My:MTextBox x:Name="TxbWriteValue" DockPanel.Dock="Left" />
|
|
|
+ <TextBlock Text="长度:"/>
|
|
|
+ <My:MNumBox x:Name="DataLength" DockPanel.Dock="Left" Text="1" Width="110"/>
|
|
|
+ <TextBlock Text="数据类型:"/>
|
|
|
<My:MComboBox x:Name="CmbDataType" DockPanel.Dock="Left" Width="100"/>
|
|
|
- <CheckBox x:Name="IsBatch" Content="批量" Width="50" VerticalAlignment="Center"/>
|
|
|
+ <My:MCheckBox x:Name="IsBatch" Content="批量"/>
|
|
|
<My:MButton Type="Primary" x:Name="BtnReadPLC" Content="读取" Click="BtnReadPLC_Click" />
|
|
|
<My:MButton Type="Primary" x:Name="BtnWritePLC" Content="写入" Click="BtnWritePLC_Click" />
|
|
|
</WrapPanel>
|