MainPage.xaml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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. <Grid Margin="0,0,0,187" SizeChanged="Grid_SizeChanged">
  11. <Grid.ColumnDefinitions>
  12. <ColumnDefinition Width="*"/>
  13. <ColumnDefinition Width="*"/>
  14. </Grid.ColumnDefinitions>
  15. <Border Grid.Column="0" BorderBrush="Black" BorderThickness="1" Margin="2,2,2,2">
  16. <Image x:Name="ShowBox" Source="{Binding BitmapImage}" Margin="0,0,0,0"/>
  17. </Border>
  18. <Border Grid.Column="1" BorderBrush="Black" BorderThickness="1" Margin="2,2,2,2">
  19. <StackPanel Orientation="Vertical">
  20. <Image x:Name="MiniShowImageBox1" Source="{Binding ThumbnailImage1}" Margin="3,5,3,5" MouseDown="MiniShowImageBox1_MouseDown" Cursor="Hand" />
  21. <Image x:Name="MiniShowImageBox2" Source="{Binding ThumbnailImage2}" Margin="3,5,3,5" MouseDown="MiniShowImageBox2_MouseDown" Cursor="Hand" />
  22. <Image x:Name="MiniShowImageBox3" Source="{Binding ThumbnailImage3}" Margin="3,5,3,5" MouseDown="MiniShowImageBox3_MouseDown" Cursor="Hand"/>
  23. <Image x:Name="MiniShowImageBox4" Source="{Binding ThumbnailImage4}" Margin="3,5,3,5" MouseDown="MiniShowImageBox4_MouseDown" Cursor="Hand"/>
  24. </StackPanel>
  25. </Border>
  26. </Grid>
  27. <Grid Margin="0,0,0,10" Height="170" VerticalAlignment="Bottom">
  28. <Grid.ColumnDefinitions>
  29. <ColumnDefinition Width="*"/>
  30. <ColumnDefinition Width="*"/>
  31. </Grid.ColumnDefinitions>
  32. <Border Grid.Column="0"
  33. Background="#FF0087FF"
  34. CornerRadius="8"
  35. BorderBrush="Gray"
  36. BorderThickness="1"
  37. Margin="15,10,15,0" Height="155" VerticalAlignment="Top" Cursor="">
  38. <Grid>
  39. <StackPanel Orientation="Vertical" Margin="0,0,130,0">
  40. <StackPanel Orientation="Horizontal">
  41. <Label Content="当前总粒数:" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
  42. <Label x:Name="AllActiveNumLab" Content="{Binding AllActiveNum}" HorizontalAlignment="Left" Margin="20,10,0,0" Width="120" FontWeight="Bold" FontSize="20" Background="{x:Null}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="White"/>
  43. </StackPanel>
  44. <StackPanel Orientation="Horizontal">
  45. <Label Content="当前合格数:" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
  46. <Label x:Name="AllOkNumLab" Content="{Binding AllOkNum}" HorizontalAlignment="Left" Margin="20,10,0,0" Width="120" FontWeight="Bold" FontSize="20" Background="{x:Null}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="White"/>
  47. </StackPanel>
  48. <StackPanel Orientation="Horizontal">
  49. <Label Content="当前不合格数:" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
  50. <Label x:Name="AllNgNumLab" Content="{Binding AllNgNum}" HorizontalAlignment="Left" Margin="0,10,0,0" Width="120" FontWeight="Bold" FontSize="20" Background="{x:Null}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="White"/>
  51. </StackPanel>
  52. </StackPanel>
  53. <StackPanel Orientation="Vertical" HorizontalAlignment="Right" Width="130">
  54. <Label x:Name="CamRunStaticLab" Content="{Binding CamRunStatic}" HorizontalAlignment="Right" Margin="10,5,10,0" VerticalAlignment="Top" Background="{x:Null}" FontSize="25" Foreground="{Binding CameraStaticColor}" FontWeight="Bold" />
  55. <Button x:Name="DataClear" Content="清零" BorderThickness="1" HorizontalAlignment="Right" Margin="10,50,10,0" VerticalAlignment="Top" Width="80" Height="40" Background="#FF0123FF" FontWeight="Bold" FontSize="20" Foreground="White" Click="DataClear_Click" Cursor="Hand">
  56. <Button.Template>
  57. <ControlTemplate TargetType="Button">
  58. <Border CornerRadius="5"
  59. Background="{TemplateBinding Background}"
  60. BorderBrush="{TemplateBinding BorderBrush}"
  61. BorderThickness="{TemplateBinding BorderThickness}">
  62. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  63. </Border>
  64. </ControlTemplate>
  65. </Button.Template>
  66. </Button>
  67. </StackPanel>
  68. </Grid>
  69. <!-- 卡片内容 -->
  70. </Border>
  71. <Border Grid.Column="1"
  72. Background="#FF0087FF"
  73. CornerRadius="8"
  74. BorderBrush="Gray"
  75. BorderThickness="1"
  76. Margin="15,10,15,0" Height="60" VerticalAlignment="Top">
  77. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  78. <Label Content="计数速度:" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
  79. <Label x:Name="ShuLiSpeedTbx" Content="{Binding ShuLiSpeed}" HorizontalAlignment="Left" Margin="0,0,0,0" Width="60" FontWeight="Bold" FontSize="20" Background="{x:Null}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="White"/>
  80. <Label Content="粒/秒" FontWeight="Bold" FontSize="20" Margin="0,10,0,0" Foreground="White" />
  81. </StackPanel>
  82. </Border>
  83. <Border Grid.Column="1"
  84. Background="#FF0087FF"
  85. CornerRadius="8"
  86. BorderBrush="Gray"
  87. BorderThickness="1"
  88. Margin="15,80,15,0" Height="85" VerticalAlignment="Top">
  89. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
  90. <Button x:Name="StartIdentifyBtn" Content="开始" BorderThickness="1" HorizontalAlignment="Right" Margin="0,0,20,0" VerticalAlignment="Top" Width="100" Height="60" Background="#FF0123FF" FontWeight="Bold" FontSize="20" Foreground="White" Cursor="Hand" Click="StartIdentifyBtn_Click">
  91. <Button.Template>
  92. <ControlTemplate TargetType="Button">
  93. <Border CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
  94. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  95. </Border>
  96. </ControlTemplate>
  97. </Button.Template>
  98. </Button>
  99. <Button x:Name="StopIdentifyBtn" Content="暂停" BorderThickness="1" HorizontalAlignment="Right" Margin="0,0,20,0" VerticalAlignment="Top" Width="100" Height="60" Background="#FF0123FF" FontWeight="Bold" FontSize="20" Foreground="White" Cursor="Hand" Click="StopIdentifyBtn_Click">
  100. <Button.Template>
  101. <ControlTemplate TargetType="Button">
  102. <Border CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
  103. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  104. </Border>
  105. </ControlTemplate>
  106. </Button.Template>
  107. </Button>
  108. </StackPanel>
  109. </Border>
  110. </Grid>
  111. </Grid>
  112. </Page>