<Window x:Class="WPF_2_NModbus.MainWindow"
        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"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <StackPanel>
        <Button Width="100" Name="ConnectButton" Click="ConnectButton_OnClick">测试连接</Button>

        <StackPanel Orientation="Horizontal">
            <TextBlock Margin="0,0,5,0">从站id</TextBlock>
            <TextBox Name="SlaveIdTextBox" Width="100" Text="1" />

            <TextBlock Margin="5 0">开始地址</TextBlock>
            <TextBox Name="StartAddressTextBox" Width="100" />

            <TextBlock Margin="5 0">操作内容</TextBlock>
            <TextBox Name="WirTextBox" Width="100" />

            <Button Name="WriteRegistersButton" Click="WriteRegistersButton_OnClick">开始写入</Button>
        </StackPanel>
    </StackPanel>
</Window>