| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487 |
- <Page x:Class="CCDCountWpf.WpfPage.MainPage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:CCDCountWpf.WpfPage"
- xmlns:BindNameSpace="clr-namespace:CCDCountWpf"
- mc:Ignorable="d"
- Stylus.IsPressAndHoldEnabled="False"
- Stylus.IsFlicksEnabled="False"
- Title="MainPage" Height="1000" Width="1560" Loaded="Page_Loaded">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="335"/>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="650"/>
- </Grid.ColumnDefinitions>
- <Border Grid.Column="0" BorderThickness="1" Margin="2,2,2,2">
- <Image x:Name="ShowBox" Source="{Binding BitmapImage}"/>
- </Border>
- <Grid Grid.Column="1">
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="100"/>
- </Grid.RowDefinitions>
- <Border>
- <DataGrid Name="AlarmMessDataGrid" ItemsSource="{Binding AlarmMessShowList}" AutoGenerateColumns="False" Margin="5,12,5,0" Background="{x:Null}" FontSize="18">
- <DataGrid.Columns>
- <DataGridTextColumn Binding="{Binding ID}" Width="50">
- <DataGridTextColumn.Header>
- <TextBlock Text="{DynamicResource Number}"/>
- </DataGridTextColumn.Header>
- </DataGridTextColumn>
- <!--<DataGridTextColumn x:Name="DataGridMessageTypeColumn" Binding="{Binding AlarmChType}" Width="155">
- <DataGridTextColumn.Header>
- <TextBlock Text="{DynamicResource MessageType}"/>
- </DataGridTextColumn.Header>
- </DataGridTextColumn>-->
- <DataGridTextColumn x:Name="DataGridMessageColumn" Binding="{Binding AlarmChMess}" Width="1*">
- <DataGridTextColumn.ElementStyle>
- <Style>
- <Setter Property="TextBlock.TextWrapping" Value="Wrap"/>
- <Setter Property="TextBlock.MaxHeight" Value="60"/>
- <!-- 限制最大高度 -->
- </Style>
- </DataGridTextColumn.ElementStyle>
- <DataGridTextColumn.Header>
- <TextBlock Text="{DynamicResource Message}"/>
- </DataGridTextColumn.Header>
- </DataGridTextColumn>
- <DataGridTextColumn Binding="{Binding AlarmDateTime}" Width="200">
- <DataGridTextColumn.Header>
- <TextBlock Text="{DynamicResource DateTime}"/>
- </DataGridTextColumn.Header>
- </DataGridTextColumn>
- </DataGrid.Columns>
- </DataGrid>
- </Border>
- <Border Grid.Row="1" Style="{StaticResource CardBackGround}" CornerRadius="8" BorderThickness="1" Margin="5,5,5,0" Height="90" VerticalAlignment="Top">
- <StackPanel>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10,0,0">
- <TextBlock Text="{DynamicResource CanningSpeed}" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White" Width="170" TextAlignment="Center"/>
- <TextBlock Text="{Binding BottingCountSpeed}" Margin="0,0,0,0" Width="70" FontWeight="Bold" FontSize="20" Background="{x:Null}" Foreground="White" TextAlignment="Center"/>
- <TextBlock Text="{DynamicResource UnitCanningSpeed}" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White" Width="110" TextAlignment="Center"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10,0,0">
- <TextBlock Text="{DynamicResource CountingSpeed}" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White" TextAlignment="Center" Width="170"/>
- <TextBlock x:Name="ShuLiSpeedTbx" Text="{Binding ShuLiSpeed}" HorizontalAlignment="Left" Margin="0,0,0,0" Width="70" FontWeight="Bold" FontSize="20" Background="{x:Null}" Foreground="White" TextAlignment="Center"/>
- <TextBlock Text="{DynamicResource UnitCountingSpeed}" FontWeight="Bold" FontSize="20" Margin="10,0,0,0" Foreground="White" TextAlignment="Center" Width="110"/>
- </StackPanel>
- </StackPanel>
- </Border>
- </Grid>
- </Grid>
- <Grid Grid.Row="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="380"/>
- <ColumnDefinition Width="550"/>
- </Grid.ColumnDefinitions>
- <Border Style="{StaticResource CardBackGround}" CornerRadius="8" BorderThickness="1" Margin="15,10,5,5">
- <StackPanel Orientation="Vertical" HorizontalAlignment="Center" Margin="10,0,0,0" VerticalAlignment="Center">
- <StackPanel Orientation="Horizontal" Margin="0,5,0,0" HorizontalAlignment="Center">
- <TextBlock Text="{DynamicResource ASpeed}" FontSize="22" Margin="0,0,0,0" VerticalAlignment="Center" Foreground="White" Width="180" TextAlignment="Center"/>
- <Button x:Name="BottingMaterialCylinderVibrationTableHighSpeedValueUpUPBtn" Content="++" Width="60" Height="59" Click="BottingMaterialCylinderVibrationTableHighSpeedValueUpUpBtn_Click" Style="{StaticResource BtnColor}" FontSize="20" Cursor="Hand" Margin="0,0,15,0">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <Button x:Name="BottingMaterialCylinderVibrationTableHighSpeedValueUpBtn" Content="+" Width="60" Height="60" Click="BottingMaterialCylinderVibrationTableHighSpeedValueUpBtn_Click" Style="{StaticResource BtnColor}" FontSize="20" Cursor="Hand" Margin="0,0,5,0">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <TextBox Text="{Binding Source={x:Static BindNameSpace:PlcSettingMessageBus.PlcMessageShowBindage},Path = ShakeTable1H_FillingSpeed,Mode=TwoWay,UpdateSourceTrigger=LostFocus}" FontSize="18" Width="90" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="White" Background="{x:Null}" KeyDown="TextBox_KeyDown"/>
- <Button x:Name="BottingMaterialCylinderVibrationTableHighSpeedValueDownBtn" Content="-" Width="60" Click="BottingMaterialCylinderVibrationTableHighSpeedValueDownBtn_Click" Style="{StaticResource BtnColor}" FontSize="20" Cursor="Hand" Margin="5,0,15,0">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <Button x:Name="BottingMaterialCylinderVibrationTableHighSpeedValueDownDownBtn" Content="--" Width="60" Click="BottingMaterialCylinderVibrationTableHighSpeedValueDownDownBtn_Click" Style="{StaticResource BtnColor}" FontSize="20" Cursor="Hand">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0,20,0,0" HorizontalAlignment="Center">
- <TextBlock Text="{DynamicResource BSpeed}" FontSize="22" Margin="0,0,0,0" VerticalAlignment="Center" Foreground="White" Width="180" TextAlignment="Center"/>
- <Button x:Name="BottingFilterVibrationTableHighSpeedValueUpUpBtn" Content="++" Width="60" Height="60" Click="BottingFilterVibrationTableHighSpeedValueUpUpBtn_Click" Style="{StaticResource BtnColor}" FontSize="20" Cursor="Hand" Margin="0,0,15,0">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <Button x:Name="BottingFilterVibrationTableHighSpeedValueUpBtn" Content="+" Width="60" Height="60" Click="BottingFilterVibrationTableHighSpeedValueUpBtn_Click" Style="{StaticResource BtnColor}" FontSize="20" Cursor="Hand" Margin="0,0,5,0">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <TextBox Text="{Binding Source={x:Static BindNameSpace:PlcSettingMessageBus.PlcMessageShowBindage},Path = ShakeTable2H_FillingSpeed,Mode=TwoWay,UpdateSourceTrigger=LostFocus}" FontSize="18" Width="90" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="White" Background="{x:Null}" KeyDown="TextBox_KeyDown"/>
- <Button x:Name="BottingFilterVibrationTableHighSpeedValueDownBtn" Content="-" Width="60" Click="BottingFilterVibrationTableHighSpeedValueDownBtn_Click" Style="{StaticResource BtnColor}" FontSize="20" Cursor="Hand" Margin="5,0,15,0">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <Button x:Name="BottingFilterVibrationTableHighSpeedValueDownDownBtn" Content="--" Width="60" Click="BottingFilterVibrationTableHighSpeedValueDownDownBtn_Click" Style="{StaticResource BtnColor}" FontSize="20" Cursor="Hand">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0,20,0,0" HorizontalAlignment="Center">
- <TextBlock Text="{DynamicResource CSpeed}" FontSize="22" Margin="0,0,0,0" VerticalAlignment="Center" Foreground="White" Width="180" TextAlignment="Center"/>
- <Button x:Name="BottingCountVibrationTableHighSpeedValueUpUpBtn" Content="++" Width="60" Height="60" Click="BottingCountVibrationTableHighSpeedValueUpUpBtn_Click" Style="{StaticResource BtnColor}" FontSize="20" Cursor="Hand" Margin="0,0,15,0">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <Button x:Name="BottingCountVibrationTableHighSpeedValueUpBtn" Content="+" Width="60" Height="60" Click="BottingCountVibrationTableHighSpeedValueUpBtn_Click" Style="{StaticResource BtnColor}" FontSize="20" Cursor="Hand" Margin="0,0,5,0">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <TextBox Text="{Binding Source={x:Static BindNameSpace:PlcSettingMessageBus.PlcMessageShowBindage},Path = ShakeTable3H_FillingSpeed,Mode=TwoWay,UpdateSourceTrigger=LostFocus}" FontSize="18" Width="90" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Background="{x:Null}" Foreground="White" KeyDown="TextBox_KeyDown"/>
- <Button x:Name="BottingCountVibrationTableHighSpeedValueDownBtn" Content="-" Width="60" Click="BottingCountVibrationTableHighSpeedValueDownBtn_Click" Style="{StaticResource BtnColor}" FontSize="20" Cursor="Hand" Margin="5,0,15,0">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <Button x:Name="BottingCountVibrationTableHighSpeedValueDownDownBtn" Content="--" Width="60" Click="BottingCountVibrationTableHighSpeedValueDownDownBtn_Click" Style="{StaticResource BtnColor}" FontSize="20" Cursor="Hand">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0,20,0,0" HorizontalAlignment="Center">
- <TextBlock Text="{DynamicResource PreservedValue}" FontSize="22" Margin="0,0,0,0" VerticalAlignment="Center" Foreground="White" Width="180" TextAlignment="Center"/>
- <Button x:Name="BottValueSetUpUpBtn" Content="++" Width="60" Height="60" Click="BottValueSetUpUpBtn_Click" Style="{StaticResource BtnColor}" FontSize="20" Cursor="Hand" Margin="0,0,15,0">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <Button x:Name="BottValueSetUpBtn" Content="+" Width="60" Height="60" Click="BottValueSetUpBtn_Click" Style="{StaticResource BtnColor}" FontSize="20" Cursor="Hand" Margin="0,0,5,0">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <TextBox Text="{Binding Source={x:Static BindNameSpace:PlcSettingMessageBus.PlcMessageShowBindage},Path = BottValueSet,Mode=TwoWay,UpdateSourceTrigger=LostFocus}" FontSize="18" Width="90" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Background="{x:Null}" Foreground="White" KeyDown="TextBox_KeyDown"/>
- <Button x:Name="BottValueSetDownBtn" Content="-" Width="60" Click="BottValueSetDownBtn_Click" Style="{StaticResource BtnColor}" FontSize="20" Cursor="Hand" Margin="5,0,15,0">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <Button x:Name="BottValueSetDownDownBtn" Content="--" Width="60" Click="BottValueSetDownDownBtn_Click" Style="{StaticResource BtnColor}" FontSize="20" Cursor="Hand">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </StackPanel>
- </StackPanel>
- </Border>
- <Border Name="ShuLiData" Grid.Column="1"
- Style="{StaticResource CardBackGround}"
- CornerRadius="8"
- BorderThickness="1"
- Margin="5,10,5,5" HorizontalAlignment="Right" Width="370">
- <Grid>
- <StackPanel Orientation="Horizontal" Margin="0,20,0,0" VerticalAlignment="Top" HorizontalAlignment="Center">
- <StackPanel HorizontalAlignment="Left">
- <Label Content="{DynamicResource TotalCount}" HorizontalAlignment="Left" Margin="10,5,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
- <!--<Label Content="{DynamicResource OKCount}" HorizontalAlignment="Left" Margin="10,5,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
- <Label Content="{DynamicResource NGCount}" HorizontalAlignment="Left" Margin="10,5,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>-->
- <Label Content="{DynamicResource BottlingQuantity}" HorizontalAlignment="Left" Margin="10,5,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
- </StackPanel>
- <StackPanel HorizontalAlignment="Left">
- <Label x:Name="AllActiveNumLab" Content="{Binding AllActiveNum}" HorizontalAlignment="Left" Margin="0,5,0,0" Width="100" FontWeight="Bold" FontSize="20" Background="{x:Null}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="White"/>
- <!--<Label x:Name="AllOkNumLab" Content="{Binding AllOkNum}" HorizontalAlignment="Left" Margin="0,5,0,0" Width="100" FontWeight="Bold" FontSize="20" Background="{x:Null}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="White"/>
- <Label x:Name="AllNgNumLab" Content="{Binding AllNgNum}" HorizontalAlignment="Left" Margin="0,5,0,0" Width="100" FontWeight="Bold" FontSize="20" Background="{x:Null}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="White"/>-->
- <Label Content="{Binding BottingCount}" HorizontalAlignment="Left" Margin="0,5,0,0" Width="100" FontWeight="Bold" FontSize="20" Background="{x:Null}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="White"/>
- </StackPanel>
- <StackPanel HorizontalAlignment="Left">
- <Label Content="{DynamicResource UnitGrain}" HorizontalAlignment="Left" Margin="10,5,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
- <!--<Label Content="{DynamicResource UnitGrain}" HorizontalAlignment="Left" Margin="10,5,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
- <Label Content="{DynamicResource UnitGrain}" HorizontalAlignment="Left" Margin="10,5,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>-->
- <Label Content="{DynamicResource UnitBottle}" HorizontalAlignment="Left" Margin="10,5,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
- </StackPanel>
- </StackPanel>
- <Label x:Name="CamRunStaticLab" Content="{Binding CamRunStatic}" HorizontalAlignment="Left" Margin="10,0,10,5" VerticalAlignment="Bottom" Background="{x:Null}" FontSize="25" Foreground="{Binding CameraStaticColor}" FontWeight="Bold" />
- <Button x:Name="DataClear" Content="{DynamicResource ResetToZero}" BorderThickness="1" HorizontalAlignment="Right" Margin="10,0,10,12" Height="40" Style="{StaticResource BtnColor}" FontWeight="Bold" FontSize="20" Click="DataClear_Click" Cursor="Hand" VerticalAlignment="Bottom" MinWidth="80">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </Grid>
- <!-- 卡片内容 -->
- </Border>
- <Border Grid.Column="2"
- Height="160"
- Style="{StaticResource CardBackGround}"
- CornerRadius="8"
- BorderThickness="1"
- Margin="5,10,5,5" Cursor="" VerticalAlignment="Top">
- <Grid>
- <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
- <TextBlock Text="{DynamicResource CurrentFormula}" FontWeight="Bold" FontSize="20" Margin="10,0,0,0" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" Width="170" TextAlignment="Center"/>
- <TextBox x:Name="FormulationName" Text="{Binding FormulationName,Mode=TwoWay,UpdateSourceTrigger=LostFocus}" Width="160" Height="40" Foreground="White" Background="{x:Null}" KeyDown="TextBox_KeyDown" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" GotFocus="FormulationName_GotFocus"/>
- <Button x:Name="SaveFormulationBtn" Content="{DynamicResource SaveFormula}" BorderThickness="1" HorizontalAlignment="Center" Margin="20,0,0,0" VerticalAlignment="Center" Width="140" Height="50" Style="{StaticResource BtnColor}" FontWeight="Bold" FontSize="20" Cursor="Hand" Click="SaveFormulationBtn_Click">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0,15,0,0" HorizontalAlignment="Center" VerticalAlignment="Center">
- <TextBlock Text="{DynamicResource SelectFormula}" FontWeight="Bold" FontSize="20" Margin="10,0,0,0" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" Width="170" />
- <ComboBox x:Name="FormulationCoBox" Height="40" Width="160" ItemsSource="{Binding FormulationItems}" HorizontalAlignment="Center" VerticalAlignment="Center" HorizontalContentAlignment="Center" FontSize="20">
- <ComboBox.Template>
- <ControlTemplate TargetType="ComboBox">
- <Grid>
- <ToggleButton
- Foreground="White"
- IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}"
- ClickMode="Press">
- <ToggleButton.Template>
- <ControlTemplate TargetType="ToggleButton">
- <Border x:Name="Border" Background="#FF34495E" BorderBrush="#FFABADB3" BorderThickness="1">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="20" />
- </Grid.ColumnDefinitions>
- <ContentPresenter Grid.Column="0" Margin="3" />
- <Path x:Name="Arrow" Grid.Column="1"
- Fill="White"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M 0 0 L 4 4 L 8 0 Z" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="Border" Property="Background" Value="LightBlue" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </ToggleButton.Template>
- </ToggleButton>
- <ContentPresenter x:Name="ContentSite"
- IsHitTestVisible="False"
- Content="{TemplateBinding SelectionBoxItem}"
- ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
- Margin="3,3,23,3"
- VerticalAlignment="Center"
- HorizontalAlignment="Left"
- TextBlock.Foreground="White"/>
- <Popup x:Name="Popup"
- Placement="Bottom"
- IsOpen="{TemplateBinding IsDropDownOpen}"
- AllowsTransparency="True"
- Focusable="False"
- PopupAnimation="Slide">
- <Border x:Name="DropDownBorder"
- Background="#FF34495E"
- BorderBrush="#FF34495E"
- BorderThickness="1">
- <ScrollViewer Margin="0,3,0,3"
- SnapsToDevicePixels="True">
- <ItemsPresenter KeyboardNavigation.DirectionalNavigation="Contained" />
- </ScrollViewer>
- </Border>
- </Popup>
- </Grid>
- </ControlTemplate>
- </ComboBox.Template>
- <ComboBox.ItemContainerStyle>
- <Style TargetType="ComboBoxItem">
- <Setter Property="Background" Value="#FF34495E" />
- <Setter Property="Foreground" Value="White" />
- <Style.Triggers>
- <Trigger Property="IsHighlighted" Value="True">
- <Setter Property="Background" Value="LightBlue" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </ComboBox.ItemContainerStyle>
- </ComboBox>
- <Button x:Name="ReadFormulationBtn" Content="{DynamicResource ReadFormula}" BorderThickness="1" HorizontalAlignment="Center" Margin="20,0,0,0" VerticalAlignment="Center" Width="138" Height="50" Style="{StaticResource BtnColor}" FontWeight="Bold" FontSize="20" Cursor="Hand" Click="ReadFormulationBtn_Click">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </StackPanel>
- </StackPanel>
- </Grid>
- </Border>
- <Border Grid.Column="2"
- Style="{StaticResource CardBackGround}"
- CornerRadius="8"
- BorderThickness="1"
- Margin="5,180,5,0" Height="150" VerticalAlignment="Top">
- <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
- <TextBlock Text="{DynamicResource ProductionBatch}" FontSize="20" Margin="0,0,20,0" VerticalAlignment="Center" Foreground="White" Width="170" TextAlignment="Center"/>
- <TextBox x:Name="BatchNumberTbx" Text="{Binding Source={x:Static BindNameSpace:ShowMessageBus.ShowBinding},Path = BatchNumber,Mode=TwoWay,UpdateSourceTrigger=LostFocus}" FontSize="16" Width="160" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Background="{x:Null}" Foreground="White" KeyDown="TextBox_KeyDown" Height="45" GotFocus="BatchNumberTbx_GotFocus"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,10,0,0">
- <Button x:Name="StartIdentifyBtn" Content="{DynamicResource Start}" BorderThickness="1" HorizontalAlignment="Right" Margin="0,0,20,0" VerticalAlignment="Top" Width="100" Height="60" Style="{StaticResource BtnColor}" FontWeight="Bold" FontSize="20" Cursor="Hand" Click="StartIdentifyBtn_Click">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <Button x:Name="StopIdentifyBtn" Content="{DynamicResource Pause}" BorderThickness="1" HorizontalAlignment="Right" Margin="0,0,0,0" VerticalAlignment="Top" Width="100" Height="60" Style="{StaticResource BtnColor}" FontWeight="Bold" FontSize="20" Cursor="Hand" Click="StopIdentifyBtn_Click">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </StackPanel>
- </StackPanel>
- </Border>
- </Grid>
- </Grid>
- </Page>
|