MainWindow.xaml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <Window x:Class="Send104DataForm.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:Send104DataForm"
  7. mc:Ignorable="d"
  8. Title="MainWindow" Height="450" Width="1000">
  9. <Grid>
  10. <Grid.RowDefinitions>
  11. <RowDefinition Height="Auto"/>
  12. <RowDefinition Height="Auto"/>
  13. <RowDefinition Height="Auto"/>
  14. <RowDefinition Height="Auto"/>
  15. </Grid.RowDefinitions>
  16. <StackPanel Grid.Row="0" Orientation="Horizontal" Margin="5">
  17. <TextBlock Text="设备地址:" VerticalAlignment="Center"/>
  18. <TextBox x:Name="DevAddrTextBox" Text="{Binding DevAddr}" Width="50" Margin="5"/>
  19. <TextBlock Text="扇区号:" VerticalAlignment="Center" Margin="10"/>
  20. <TextBox x:Name="CpuSectorTextBox" Text="{Binding CpuSector}" Width="50" Margin="5"/>
  21. <TextBlock Text="起始信息地址:" VerticalAlignment="Center" Margin="10"/>
  22. <TextBox x:Name="StartInfoAddrTextBox" Text="{Binding StartInfoAddr}" Width="50" Margin="5"/>
  23. <TextBlock Text="信息数量:" VerticalAlignment="Center" Margin="10"/>
  24. <TextBox x:Name="InfoCountTextBox" Text="{Binding InfoCount}" Width="50" Margin="5"/>
  25. <TextBlock Text="发送时间间隔ms:" VerticalAlignment="Center" Margin="10"/>
  26. <TextBox x:Name="IntervalTextBox" Text="{Binding Interval}" Width="50" Margin="5"/>
  27. <TextBlock Text="模拟装置地址:" VerticalAlignment="Center" Margin="10"/>
  28. <TextBox x:Name="UrlTextBox" Text="{Binding Url}" Width="80" Margin="5"/>
  29. </StackPanel>
  30. <Button Content="开始测试" Click="StartTest_Click" Grid.Row="1" Margin="5"/>
  31. <Button Content="停止测试" Click="StopTest_Click" Grid.Row="2" Margin="5"/>
  32. <ScrollViewer VerticalScrollBarVisibility="Auto" Grid.Row="3" MaxHeight="500">
  33. <RichTextBox x:Name="InfoTextBlock" Margin="5,5,5,-130"/>
  34. </ScrollViewer>
  35. </Grid>
  36. </Window>