ApiTestView.xaml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <UserControl x:Class="LocalhostMES.Views.Tabs.ApiTestView"
  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:prism="http://prismlibrary.com/"
  7. prism:ViewModelLocator.AutoWireViewModel="True"
  8. mc:Ignorable="d"
  9. d:DesignHeight="400" d:DesignWidth="780"
  10. Unloaded="ApiTestView_OnUnloaded">
  11. <Grid>
  12. <Grid.ColumnDefinitions>
  13. <ColumnDefinition Width="400" />
  14. <ColumnDefinition Width="*" />
  15. </Grid.ColumnDefinitions>
  16. <GroupBox Grid.Column="0" Header="接口列表" Margin="10">
  17. <StackPanel>
  18. <Button Content="测试SN打印请求" Height="40" Margin="0,5" Command="{Binding TestSnPrintCommand}" />
  19. <Button Content="测试SN关键件绑定" Height="40" Margin="0,5" Command="{Binding TestSnComponentCommand}" />
  20. <Button Content="测试加工参数上报" Height="40" Margin="0,5" Command="{Binding TestProcessParamsCommand}" />
  21. <Separator Margin="0,10" />
  22. <Button Content="清空日志" Height="30" Margin="0,5" Style="{StaticResource DangerButtonStyle}" Command="{Binding ClearLogCommand}" />
  23. </StackPanel>
  24. </GroupBox>
  25. <GroupBox Grid.Column="1" Header="请求/响应日志" Margin="10">
  26. <Grid>
  27. <Grid.RowDefinitions>
  28. <RowDefinition Height="*" />
  29. <RowDefinition Height="Auto" />
  30. </Grid.RowDefinitions>
  31. <ListBox Grid.Row="0" ItemsSource="{Binding Logs}" BorderBrush="Transparent" />
  32. <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right">
  33. <TextBlock Text="{Binding StatusTxt}" Margin="5" Foreground="{Binding StatusForeground}" VerticalAlignment="Center" />
  34. </StackPanel>
  35. </Grid>
  36. </GroupBox>
  37. </Grid>
  38. </UserControl>