|
|
@@ -27,93 +27,26 @@
|
|
|
</b:EventTrigger>
|
|
|
</b:Interaction.Triggers>
|
|
|
<Grid>
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="auto" />
|
|
|
- <RowDefinition Height="*" />
|
|
|
- </Grid.RowDefinitions>
|
|
|
<Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="70*" />
|
|
|
- <ColumnDefinition Width="30*" />
|
|
|
+ <ColumnDefinition Width="60*" />
|
|
|
+ <ColumnDefinition Width="40*" />
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
- <!--产品-->
|
|
|
- <StackPanel Grid.Row="0"
|
|
|
- Grid.Column="0"
|
|
|
- Orientation="Vertical"
|
|
|
- Margin="10">
|
|
|
- <StackPanel Orientation="Horizontal"
|
|
|
- HorizontalAlignment="Left"
|
|
|
- VerticalAlignment="Center">
|
|
|
- <TextBlock Text="{lex:Loc 产品列表,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
- FontSize="{DynamicResource Font.Size.Body2}"
|
|
|
- VerticalAlignment="Center" />
|
|
|
- <ComboBox x:Name="selectProduct"
|
|
|
- MinWidth="100"
|
|
|
- Margin="20,0"
|
|
|
- FontSize="{DynamicResource Font.Size.Body3}"
|
|
|
- materialDesign:HintAssist.Hint="{lex:Loc 选择产品}"
|
|
|
- SelectedItem="{Binding SelectProduct,Mode=TwoWay}"
|
|
|
- ItemsSource="{Binding ProductList,Mode=TwoWay}">
|
|
|
- <ComboBox.ItemTemplate>
|
|
|
- <DataTemplate>
|
|
|
- <StackPanel Orientation="Vertical">
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <materialDesign:PackIcon Kind="CubeOutline" />
|
|
|
- <TextBlock Text="{Binding Name}" />
|
|
|
- </StackPanel>
|
|
|
- <TextBlock Text="{Binding Description}"
|
|
|
- MinHeight="0"
|
|
|
- MaxWidth="300"
|
|
|
- Foreground="Gray"
|
|
|
- TextTrimming="CharacterEllipsis"
|
|
|
- FontSize="{DynamicResource Font.Size.Captions4}"
|
|
|
- TextWrapping="Wrap" />
|
|
|
- </StackPanel>
|
|
|
- </DataTemplate>
|
|
|
- </ComboBox.ItemTemplate>
|
|
|
- </ComboBox>
|
|
|
- <Button Content="{lex:Loc 加载}"
|
|
|
- materialDesign:ButtonAssist.CornerRadius="10"
|
|
|
- Style="{StaticResource MaterialDesignRaisedButton}"
|
|
|
- Margin="20,0,0,0"
|
|
|
- Command="{Binding LoadProductCommand}"
|
|
|
- CommandParameter="{Binding ElementName=selectProduct,Path=SelectedItem}" />
|
|
|
- </StackPanel>
|
|
|
- <StackPanel Margin="0,10,0,10"
|
|
|
- HorizontalAlignment="Left"
|
|
|
- VerticalAlignment="Center"
|
|
|
- Orientation="Horizontal">
|
|
|
- <TextBlock Text="{lex:Loc 当前产品,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
- FontSize="{DynamicResource Font.Size.Body2}"
|
|
|
- Foreground="Green"
|
|
|
- VerticalAlignment="Center" />
|
|
|
- <TextBlock FontSize="{DynamicResource Font.Size.Body3}"
|
|
|
- Margin="10,0"
|
|
|
- FontWeight="Bold"
|
|
|
- VerticalAlignment="Center">
|
|
|
- <TextBlock.Text>
|
|
|
- <MultiBinding StringFormat="{}{0}. {1}">
|
|
|
- <Binding Path="CurrentProduct.NumberCode" />
|
|
|
- <Binding Path="CurrentProduct.Name" />
|
|
|
- </MultiBinding>
|
|
|
- </TextBlock.Text>
|
|
|
- </TextBlock>
|
|
|
- </StackPanel>
|
|
|
- </StackPanel>
|
|
|
-
|
|
|
- <!--图像-->
|
|
|
- <local:ShowVisionRender Grid.Row="1"
|
|
|
- Grid.Column="0" />
|
|
|
-
|
|
|
- <!--<Button Content="全屏"
|
|
|
- Grid.Column="1"
|
|
|
- Margin="10"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- VerticalAlignment="Top"
|
|
|
- Visibility="Hidden"
|
|
|
- materialDesign:ButtonAssist.CornerRadius="10"
|
|
|
- Style="{StaticResource MaterialDesignRaisedButton}" />-->
|
|
|
-
|
|
|
+ <Grid Grid.Row="0">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="*" />
|
|
|
+ <RowDefinition Height="*" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <!--图像-->
|
|
|
+ <local:ShowVisionRender Grid.Row="0"
|
|
|
+ Grid.Column="0" />
|
|
|
+ <!--曲线图-->
|
|
|
+ <oxy:PlotView Grid.Row="1"
|
|
|
+ Grid.Column="0"
|
|
|
+ Model="{Binding LockCurvePlotModel}"
|
|
|
+ Background="Transparent"
|
|
|
+ Margin="10" />
|
|
|
+ </Grid>
|
|
|
<Grid Grid.Row="1"
|
|
|
Grid.Column="1">
|
|
|
<Grid.RowDefinitions>
|
|
|
@@ -124,88 +57,218 @@
|
|
|
<Grid.RowDefinitions>
|
|
|
<RowDefinition Height="*" />
|
|
|
<RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
</Grid.RowDefinitions>
|
|
|
- <Grid HorizontalAlignment="Center"
|
|
|
- VerticalAlignment="Center">
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="auto" />
|
|
|
- <RowDefinition Height="auto" />
|
|
|
- <RowDefinition Height="auto" />
|
|
|
- </Grid.RowDefinitions>
|
|
|
+ <!-- 锁付结果展示表格(插入位置) -->
|
|
|
+ <materialDesign:Card Grid.Row="0"
|
|
|
+ UniformCornerRadius="10"
|
|
|
+ BorderBrush="LightGray"
|
|
|
+ BorderThickness="1"
|
|
|
+ Margin="4">
|
|
|
+ <DockPanel LastChildFill="True"
|
|
|
+ Margin="8">
|
|
|
+ <TextBlock DockPanel.Dock="Top"
|
|
|
+ FontWeight="Bold"
|
|
|
+ FontSize="{DynamicResource Font.Size.Body3}"
|
|
|
+ Text="锁付结果:" />
|
|
|
+ <DataGrid x:Name="lockResultGrid"
|
|
|
+ ItemsSource="{Binding LockResults}"
|
|
|
+ AutoGenerateColumns="False"
|
|
|
+ CanUserAddRows="False"
|
|
|
+ CanUserDeleteRows="False"
|
|
|
+ IsReadOnly="True"
|
|
|
+ HeadersVisibility="Column"
|
|
|
+ GridLinesVisibility="None"
|
|
|
+ RowHeaderWidth="0"
|
|
|
+ MinHeight="120"
|
|
|
+ MaxHeight="260"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ Margin="0,8,0,0">
|
|
|
+ <DataGrid.Columns>
|
|
|
+ <DataGridTextColumn Header="#"
|
|
|
+ Binding="{Binding Index}"
|
|
|
+ Width="auto"
|
|
|
+ IsReadOnly="True" />
|
|
|
+ <DataGridTextColumn Header="时间"
|
|
|
+ Binding="{Binding Timestamp, StringFormat={}{0:G}}"
|
|
|
+ Width="auto"
|
|
|
+ IsReadOnly="True" />
|
|
|
+ <DataGridTextColumn Header="结果"
|
|
|
+ Binding="{Binding Result}"
|
|
|
+ Width="auto"
|
|
|
+ IsReadOnly="True" />
|
|
|
+ <DataGridTextColumn Header="操作员"
|
|
|
+ Binding="{Binding Operator}"
|
|
|
+ Width="auto"
|
|
|
+ IsReadOnly="True" />
|
|
|
+ <DataGridTextColumn Header="详情"
|
|
|
+ Binding="{Binding Detail}"
|
|
|
+ Width="auto"
|
|
|
+ IsReadOnly="True" />
|
|
|
+ </DataGrid.Columns>
|
|
|
+ </DataGrid>
|
|
|
+ </DockPanel>
|
|
|
+ </materialDesign:Card>
|
|
|
+
|
|
|
+ <Grid Grid.Row="1">
|
|
|
<Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="auto" />
|
|
|
- <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
</Grid.ColumnDefinitions>
|
|
|
- <Grid.Resources>
|
|
|
- <Style TargetType="TextBlock">
|
|
|
- <Setter Property="FontSize"
|
|
|
- Value="{DynamicResource Font.Size.Body2}" />
|
|
|
- <Setter Property="FontWeight"
|
|
|
- Value="Bold" />
|
|
|
- <Setter Property="Margin"
|
|
|
- Value="5" />
|
|
|
- <Setter Property="MinWidth"
|
|
|
- Value="120" />
|
|
|
- <Setter Property="HorizontalAlignment"
|
|
|
- Value="Center" />
|
|
|
- <Setter Property="VerticalAlignment"
|
|
|
- Value="Center" />
|
|
|
- <Setter Property="TextAlignment"
|
|
|
- Value="Center" />
|
|
|
- <Setter Property="TextTrimming"
|
|
|
- Value="CharacterEllipsis" />
|
|
|
- </Style>
|
|
|
- </Grid.Resources>
|
|
|
- <TextBlock Text="{lex:Loc 当前产品总产量,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
- FontWeight="Bold"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- TextAlignment="Right" />
|
|
|
- <Border Grid.Row="0"
|
|
|
- Grid.Column="1"
|
|
|
- VerticalAlignment="Bottom"
|
|
|
- BorderBrush="Gray"
|
|
|
- BorderThickness="1" />
|
|
|
- <TextBlock Grid.Row="0"
|
|
|
- Grid.Column="1"
|
|
|
- Text="{Binding management.TotalQuantity}" />
|
|
|
- <TextBlock Grid.Row="1"
|
|
|
- Grid.Column="0"
|
|
|
- Text="{lex:Loc 今日产量,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- TextAlignment="Right" />
|
|
|
- <Border Grid.Row="1"
|
|
|
- Grid.Column="1"
|
|
|
- VerticalAlignment="Bottom"
|
|
|
- BorderBrush="Gray"
|
|
|
- BorderThickness="1" />
|
|
|
- <TextBlock Grid.Row="1"
|
|
|
- Grid.Column="1"
|
|
|
- Text="{Binding management.TotalQuantityToday}" />
|
|
|
- <TextBlock Grid.Row="2"
|
|
|
- Grid.Column="0"
|
|
|
- Text="UPH:"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- TextAlignment="Right" />
|
|
|
- <Border Grid.Row="2"
|
|
|
- Grid.Column="1"
|
|
|
- VerticalAlignment="Bottom"
|
|
|
- BorderBrush="Gray"
|
|
|
- BorderThickness="1" />
|
|
|
- <TextBlock Grid.Row="2"
|
|
|
- Grid.Column="1"
|
|
|
- Text="{Binding management.CurrentUPH}" />
|
|
|
- <!--<ProgressBar Grid.Row="2"
|
|
|
- Grid.Column="1"
|
|
|
- Value="80"
|
|
|
- IsIndeterminate="True"
|
|
|
- Maximum="100"
|
|
|
- Minimum="0"
|
|
|
- Height="15"/>-->
|
|
|
+ <!--加载产品-->
|
|
|
+ <materialDesign:Card Grid.Row="0"
|
|
|
+ Grid.Column="0"
|
|
|
+ UniformCornerRadius="10"
|
|
|
+ BorderBrush="LightGray"
|
|
|
+ BorderThickness="1">
|
|
|
+ <!--产品-->
|
|
|
+ <StackPanel HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Orientation="Vertical"
|
|
|
+ Margin="2">
|
|
|
+ <StackPanel Orientation="Horizontal"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Center">
|
|
|
+ <TextBlock Text="{lex:Loc 产品列表,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
+ FontSize="14"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <ComboBox x:Name="selectProduct"
|
|
|
+ Width="100"
|
|
|
+ Margin="20,0"
|
|
|
+ FontSize="14"
|
|
|
+ materialDesign:HintAssist.Hint="{lex:Loc 选择产品}"
|
|
|
+ SelectedItem="{Binding SelectProduct,Mode=TwoWay}"
|
|
|
+ ItemsSource="{Binding ProductList,Mode=TwoWay}">
|
|
|
+ <ComboBox.ItemTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <materialDesign:PackIcon Kind="CubeOutline" />
|
|
|
+ <TextBlock Text="{Binding Name}" />
|
|
|
+ </StackPanel>
|
|
|
+ <TextBlock Text="{Binding Description}"
|
|
|
+ MinHeight="0"
|
|
|
+ MaxWidth="300"
|
|
|
+ Foreground="Gray"
|
|
|
+ TextTrimming="CharacterEllipsis"
|
|
|
+ FontSize="{DynamicResource Font.Size.Captions4}"
|
|
|
+ TextWrapping="Wrap" />
|
|
|
+ </StackPanel>
|
|
|
+ </DataTemplate>
|
|
|
+ </ComboBox.ItemTemplate>
|
|
|
+ </ComboBox>
|
|
|
+
|
|
|
+ </StackPanel>
|
|
|
+ <Button Content="{lex:Loc 加载}"
|
|
|
+ materialDesign:ButtonAssist.CornerRadius="10"
|
|
|
+ Style="{StaticResource MaterialDesignRaisedButton}"
|
|
|
+ Margin="0,10"
|
|
|
+ Command="{Binding LoadProductCommand}"
|
|
|
+ CommandParameter="{Binding ElementName=selectProduct,Path=SelectedItem}" />
|
|
|
+ <StackPanel HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <TextBlock Text="{lex:Loc 当前产品,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
+ FontSize="14"
|
|
|
+ Foreground="Green"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ <TextBlock FontSize="14"
|
|
|
+ Margin="10,0"
|
|
|
+ FontWeight="Bold"
|
|
|
+ VerticalAlignment="Center">
|
|
|
+ <TextBlock.Text>
|
|
|
+ <MultiBinding StringFormat="{}{0}. {1}">
|
|
|
+ <Binding Path="CurrentProduct.NumberCode" />
|
|
|
+ <Binding Path="CurrentProduct.Name" />
|
|
|
+ </MultiBinding>
|
|
|
+ </TextBlock.Text>
|
|
|
+ </TextBlock>
|
|
|
+ </StackPanel>
|
|
|
+ </StackPanel>
|
|
|
+ </materialDesign:Card>
|
|
|
+ <!--生产数量-->
|
|
|
+ <materialDesign:Card Grid.Row="0"
|
|
|
+ Grid.Column="1"
|
|
|
+ UniformCornerRadius="10"
|
|
|
+ BorderBrush="LightGray"
|
|
|
+ BorderThickness="1">
|
|
|
+ <Grid Grid.Row="1"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ <ColumnDefinition Width="auto" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Grid.Resources>
|
|
|
+ <Style TargetType="TextBlock">
|
|
|
+ <Setter Property="FontSize"
|
|
|
+ Value="14" />
|
|
|
+ <Setter Property="Margin"
|
|
|
+ Value="5" />
|
|
|
+ <Setter Property="MinWidth"
|
|
|
+ Value="50" />
|
|
|
+ <Setter Property="HorizontalAlignment"
|
|
|
+ Value="Center" />
|
|
|
+ <Setter Property="VerticalAlignment"
|
|
|
+ Value="Center" />
|
|
|
+ <Setter Property="TextAlignment"
|
|
|
+ Value="Center" />
|
|
|
+ <Setter Property="TextTrimming"
|
|
|
+ Value="CharacterEllipsis" />
|
|
|
+ </Style>
|
|
|
+ </Grid.Resources>
|
|
|
+ <TextBlock Text="{lex:Loc 当前产品总产量,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ TextAlignment="Right" />
|
|
|
+ <Border Grid.Row="0"
|
|
|
+ Grid.Column="1"
|
|
|
+ VerticalAlignment="Bottom"
|
|
|
+ BorderBrush="Gray"
|
|
|
+ BorderThickness="1" />
|
|
|
+ <TextBlock Grid.Row="0"
|
|
|
+ Grid.Column="1"
|
|
|
+ Text="{Binding management.TotalQuantity}" />
|
|
|
+ <TextBlock Grid.Row="1"
|
|
|
+ Grid.Column="0"
|
|
|
+ Text="{lex:Loc 今日产量,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ TextAlignment="Right" />
|
|
|
+ <Border Grid.Row="1"
|
|
|
+ Grid.Column="1"
|
|
|
+ VerticalAlignment="Bottom"
|
|
|
+ BorderBrush="Gray"
|
|
|
+ BorderThickness="1" />
|
|
|
+ <TextBlock Grid.Row="1"
|
|
|
+ Grid.Column="1"
|
|
|
+ Text="{Binding management.TotalQuantityToday}" />
|
|
|
+ <TextBlock Grid.Row="2"
|
|
|
+ Grid.Column="0"
|
|
|
+ Text="UPH:"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ TextAlignment="Right" />
|
|
|
+ <Border Grid.Row="2"
|
|
|
+ Grid.Column="1"
|
|
|
+ VerticalAlignment="Bottom"
|
|
|
+ BorderBrush="Gray"
|
|
|
+ BorderThickness="1" />
|
|
|
+ <TextBlock Grid.Row="2"
|
|
|
+ Grid.Column="1"
|
|
|
+ Text="{Binding management.CurrentUPH}" />
|
|
|
+ </Grid>
|
|
|
+ </materialDesign:Card>
|
|
|
</Grid>
|
|
|
- <StackPanel Grid.Row="1"
|
|
|
+
|
|
|
+
|
|
|
+ <StackPanel Grid.Row="2"
|
|
|
Orientation="Horizontal"
|
|
|
VerticalAlignment="Bottom"
|
|
|
- Margin=" 20">
|
|
|
+ Margin="10,3">
|
|
|
<TextBlock Text="CT: "
|
|
|
FontWeight="Bold"
|
|
|
FontSize="{DynamicResource Font.Size.Body2}"
|
|
|
@@ -213,12 +276,12 @@
|
|
|
<TextBlock Text="{Binding CTTotalSeconds,StringFormat={}{0:F2} s}"
|
|
|
FontSize="{DynamicResource Font.Size.Body3}"
|
|
|
VerticalAlignment="Center"
|
|
|
- Margin="20,0,20,0" />
|
|
|
+ Margin="10,0" />
|
|
|
</StackPanel>
|
|
|
- <Button Grid.Row="1"
|
|
|
+ <Button Grid.Row="2"
|
|
|
Content="{lex:Loc 计数清零}"
|
|
|
VerticalAlignment="Bottom"
|
|
|
- Margin=" 20"
|
|
|
+ Margin=" 10,3"
|
|
|
HorizontalAlignment="Right"
|
|
|
materialDesign:ButtonAssist.CornerRadius="10"
|
|
|
Style="{StaticResource MaterialDesignRaisedButton}"
|