1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <My:MWindow xmlns:My="clr-namespace:MyWPFControl.Controls;assembly=MyWPFControl"
- x:Class="B20UVLog.Windows.PLCSet"
- 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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:B20UVLog.Windows" xmlns:viewmodels="clr-namespace:B20UVLog.ViewModels"
- mc:Ignorable="d"
- WindowStyle="ToolWindow" WindowStartupLocation="CenterScreen"
- Title="PLC配置" Height="600" Width="1200">
- <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="auto"/>
- <RowDefinition Height="auto"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <WrapPanel Grid.Row="0" Orientation="Horizontal">
- <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">
- <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"/>
- <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>
- <RichTextBox x:Name="RtbRunLog" Grid.Row="2">
- <FlowDocument>
- </FlowDocument>
- </RichTextBox>
- </Grid>
- </My:MWindow>
|