MainPage.xaml 6.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <Page x:Class="CCDCountWpf.WpfPage.MainPage"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:CCDCountWpf.WpfPage"
  7. mc:Ignorable="d"
  8. Title="MainPage" Height="503" Width="876" Loaded="Page_Loaded">
  9. <Grid>
  10. <Image x:Name="ShowBox" Height="160" VerticalAlignment="Top" OpacityMask="Black" />
  11. <Grid Margin="0,160,0,60">
  12. <Grid.ColumnDefinitions>
  13. <ColumnDefinition Width="*"/>
  14. <ColumnDefinition Width="*"/>
  15. </Grid.ColumnDefinitions>
  16. <Border Grid.Column="0"
  17. Background="#7F808080"
  18. CornerRadius="8"
  19. BorderBrush="Gray"
  20. BorderThickness="1"
  21. Margin="15,10,15,0" Height="160" VerticalAlignment="Top">
  22. <StackPanel Orientation="Horizontal">
  23. <StackPanel Orientation="Vertical">
  24. <Label Content="当前总粒数:" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20"/>
  25. <Label Content="当前合格数:" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20"/>
  26. <Label Content="当前不合格数:" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20"/>
  27. </StackPanel>
  28. <StackPanel Orientation="Vertical">
  29. <TextBox x:Name="AllActiveNumTbx" HorizontalAlignment="Left" Margin="0,15,0,0" TextWrapping="Wrap" Width="120" FontWeight="Bold" FontSize="20" IsReadOnly="True" Background="{x:Null}"/>
  30. <TextBox x:Name="AllOkNumTbx" HorizontalAlignment="Left" Margin="0,17,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" FontWeight="Bold" FontSize="20" IsReadOnly="True" Background="{x:Null}"/>
  31. <TextBox x:Name="AllNgNumTbx" HorizontalAlignment="Left" Margin="0,17,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" FontWeight="Bold" FontSize="20" IsReadOnly="True" Background="{x:Null}"/>
  32. </StackPanel>
  33. <StackPanel Orientation="Vertical">
  34. <Label x:Name="CamRunStaticLab" Content="未运行" HorizontalAlignment="Right" Margin="10,5,10,0" VerticalAlignment="Top" Background="{x:Null}" FontSize="25" Foreground="Red" FontWeight="Bold"/>
  35. <Button x:Name="DataClear" Content="清零" BorderThickness="1" HorizontalAlignment="Left" Margin="10,50,10,0" VerticalAlignment="Top" Width="80" Height="40" Background="#FF1709AF" FontWeight="Bold" FontSize="20" Foreground="White" Click="DataClear_Click">
  36. <Button.Template>
  37. <ControlTemplate TargetType="Button">
  38. <Border CornerRadius="5"
  39. Background="{TemplateBinding Background}"
  40. BorderBrush="{TemplateBinding BorderBrush}"
  41. BorderThickness="{TemplateBinding BorderThickness}">
  42. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  43. </Border>
  44. </ControlTemplate>
  45. </Button.Template>
  46. </Button>
  47. </StackPanel>
  48. </StackPanel>
  49. <!-- 卡片内容 -->
  50. </Border>
  51. <Border Grid.Column="0"
  52. Background="#7F808080"
  53. CornerRadius="8"
  54. BorderBrush="Gray"
  55. BorderThickness="1"
  56. Margin="15,180,15,0" Height="60" VerticalAlignment="Top">
  57. <StackPanel Orientation="Horizontal">
  58. <StackPanel Orientation="Vertical">
  59. <Label Content="计数速度:" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20"/>
  60. </StackPanel>
  61. <StackPanel Orientation="Vertical" Margin="40,0,0,0" >
  62. <TextBox x:Name="ShuLiSpeedTbx" HorizontalAlignment="Left" Margin="0,15,0,0" TextWrapping="Wrap" Width="120" FontWeight="Bold" FontSize="20" IsReadOnly="True" Background="{x:Null}"/>
  63. </StackPanel>
  64. <StackPanel Orientation="Vertical" Margin="10,0,0,0" >
  65. <Label Content="粒/秒" FontWeight="Bold" FontSize="20" Margin="0,10,0,0" />
  66. </StackPanel>
  67. </StackPanel>
  68. </Border>
  69. <Border Grid.Column="1"
  70. Background="#7F808080"
  71. CornerRadius="8"
  72. BorderBrush="Gray"
  73. BorderThickness="1"
  74. Margin="15,10,15,0" Height="250" VerticalAlignment="Top">
  75. <Label Content="控制按钮预留区域" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="30"/>
  76. </Border>
  77. </Grid>
  78. <Grid VerticalAlignment="Bottom" Height="50" Margin="0,0,0,5">
  79. <Border Grid.Column="0"
  80. Background="#7F808080"
  81. CornerRadius="8"
  82. BorderBrush="Gray"
  83. BorderThickness="1"
  84. Margin="10,0,10,0" VerticalAlignment="Bottom" Height="50">
  85. <StackPanel Orientation="Horizontal">
  86. <Label x:Name="CPUMonitorLab" HorizontalAlignment="Left" VerticalAlignment="Top" Height="40" Margin="30,8,0,0" Width="120" FontSize="18" FontWeight="Bold"></Label>
  87. <Label x:Name="RamMonitorLab" HorizontalAlignment="Left" VerticalAlignment="Top" Height="40" Margin="30,8,0,0" Width="180" FontSize="18" FontWeight="Bold"></Label>
  88. </StackPanel>
  89. </Border>
  90. </Grid>
  91. </Grid>
  92. </Page>