|
|
@@ -1,26 +1,27 @@
|
|
|
-<UserControl x:Class="TeamAAS_VP.Views.HomeView"
|
|
|
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
- xmlns:prism="http://prismlibrary.com/"
|
|
|
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
- xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
|
- xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
- xmlns:local="clr-namespace:TeamAAS_VP.Views.Home"
|
|
|
- xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels"
|
|
|
- xmlns:oxy="http://oxyplot.org/wpf"
|
|
|
- xmlns:lex="http://wpflocalizeextension.codeplex.com"
|
|
|
- lex:LocalizeDictionary.DesignCulture="zh-CN"
|
|
|
- lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
|
|
|
- lex:ResxLocalizationProvider.DefaultDictionary="Lang"
|
|
|
- prism:ViewModelLocator.AutoWireViewModel="True"
|
|
|
- mc:Ignorable="d"
|
|
|
- d:Height="600"
|
|
|
- d:Width="1024"
|
|
|
- d:Background="White"
|
|
|
- d:DataContext="{d:DesignInstance Type=vm:HomeViewModel}"
|
|
|
- Background="Transparent"
|
|
|
- FontFamily="{DynamicResource DefaultFont}">
|
|
|
+<UserControl
|
|
|
+ x:Class="TeamAAS_VP.Views.HomeView"
|
|
|
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
+ xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
+ xmlns:lex="http://wpflocalizeextension.codeplex.com"
|
|
|
+ xmlns:local="clr-namespace:TeamAAS_VP.Views.Home"
|
|
|
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
|
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
+ xmlns:oxy="http://oxyplot.org/wpf"
|
|
|
+ xmlns:prism="http://prismlibrary.com/"
|
|
|
+ xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels"
|
|
|
+ d:Background="White"
|
|
|
+ d:DataContext="{d:DesignInstance Type=vm:HomeViewModel}"
|
|
|
+ d:Height="600"
|
|
|
+ d:Width="1024"
|
|
|
+ lex:LocalizeDictionary.DesignCulture="zh-CN"
|
|
|
+ lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
|
|
|
+ lex:ResxLocalizationProvider.DefaultDictionary="Lang"
|
|
|
+ prism:ViewModelLocator.AutoWireViewModel="True"
|
|
|
+ Background="Transparent"
|
|
|
+ FontFamily="{DynamicResource DefaultFont}"
|
|
|
+ mc:Ignorable="d">
|
|
|
<b:Interaction.Triggers>
|
|
|
<b:EventTrigger EventName="Loaded">
|
|
|
<b:InvokeCommandAction Command="{Binding LoadedCommand}" />
|
|
|
@@ -37,20 +38,20 @@
|
|
|
<RowDefinition Height="*" />
|
|
|
<!--<RowDefinition Height="*" />-->
|
|
|
</Grid.RowDefinitions>
|
|
|
- <!--图像-->
|
|
|
- <local:ShowVisionRender Grid.Row="0"
|
|
|
- Grid.Column="0" />
|
|
|
-
|
|
|
- <!--曲线图-->
|
|
|
+ <!-- 图像 -->
|
|
|
+ <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"
|
|
|
- x:Name="zzz">
|
|
|
+ <Grid
|
|
|
+ x:Name="zzz"
|
|
|
+ Grid.Row="1"
|
|
|
+ Grid.Column="1">
|
|
|
<Grid.RowDefinitions>
|
|
|
<RowDefinition Height="60*" />
|
|
|
<RowDefinition Height="40*" />
|
|
|
@@ -66,19 +67,20 @@
|
|
|
<ColumnDefinition Width="80*" />
|
|
|
<ColumnDefinition Width="auto" />
|
|
|
</Grid.ColumnDefinitions>
|
|
|
- <!-- 锁付结果展示表格(插入位置) -->
|
|
|
- <materialDesign:Card Grid.Row="0"
|
|
|
- UniformCornerRadius="10"
|
|
|
- BorderBrush="LightGray"
|
|
|
- BorderThickness="1"
|
|
|
- Margin="0,4">
|
|
|
- <DockPanel LastChildFill="True"
|
|
|
- Margin="8">
|
|
|
- <Border DockPanel.Dock="Top"
|
|
|
- Height="24"
|
|
|
- CornerRadius="6"
|
|
|
- Margin="0,0,0,8"
|
|
|
- BorderThickness="1">
|
|
|
+ <!-- 锁付结果展示表格(插入位置) -->
|
|
|
+ <materialDesign:Card
|
|
|
+ Grid.Row="0"
|
|
|
+ Margin="0,4"
|
|
|
+ BorderBrush="LightGray"
|
|
|
+ BorderThickness="1"
|
|
|
+ UniformCornerRadius="10">
|
|
|
+ <DockPanel Margin="8" LastChildFill="True">
|
|
|
+ <Border
|
|
|
+ Height="24"
|
|
|
+ Margin="0,0,0,8"
|
|
|
+ BorderThickness="1"
|
|
|
+ CornerRadius="6"
|
|
|
+ DockPanel.Dock="Top">
|
|
|
<Border.Style>
|
|
|
<Style TargetType="Border">
|
|
|
<Setter Property="Background" Value="#9E9E9E" />
|
|
|
@@ -95,48 +97,55 @@
|
|
|
</Style.Triggers>
|
|
|
</Style>
|
|
|
</Border.Style>
|
|
|
- <TextBlock Text="{Binding management.FinalResultText, FallbackValue=检测中}"
|
|
|
- HorizontalAlignment="Center"
|
|
|
- VerticalAlignment="Center"
|
|
|
- Foreground="White"
|
|
|
- FontWeight="Bold"
|
|
|
- FontSize="14"
|
|
|
- TextAlignment="Center" />
|
|
|
+ <TextBlock
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="14"
|
|
|
+ FontWeight="Bold"
|
|
|
+ Foreground="White"
|
|
|
+ Text="{Binding management.FinalResultText, FallbackValue=检测中}"
|
|
|
+ TextAlignment="Center" />
|
|
|
</Border>
|
|
|
- <TextBlock DockPanel.Dock="Top"
|
|
|
- FontWeight="Bold"
|
|
|
- FontSize="{DynamicResource Font.Size.Body3}"
|
|
|
- Text="{lex:Loc 拍照结果}" />
|
|
|
- <DataGrid x:Name="lockResultGrid"
|
|
|
- ItemsSource="{Binding LockResults}"
|
|
|
- AutoGenerateColumns="False"
|
|
|
- CanUserAddRows="False"
|
|
|
- CanUserDeleteRows="False"
|
|
|
- IsReadOnly="True"
|
|
|
- HeadersVisibility="Column"
|
|
|
- GridLinesVisibility="None"
|
|
|
- RowHeaderWidth="0"
|
|
|
- MinHeight="120"
|
|
|
- VerticalAlignment="Stretch"
|
|
|
- HorizontalAlignment="Stretch"
|
|
|
- Margin="0,8,0,0">
|
|
|
+ <TextBlock
|
|
|
+ DockPanel.Dock="Top"
|
|
|
+ FontSize="{DynamicResource Font.Size.Body3}"
|
|
|
+ FontWeight="Bold"
|
|
|
+ Text="{lex:Loc 拍照结果}" />
|
|
|
+ <DataGrid
|
|
|
+ x:Name="lockResultGrid"
|
|
|
+ MinHeight="120"
|
|
|
+ Margin="0,8,0,0"
|
|
|
+ HorizontalAlignment="Stretch"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ AutoGenerateColumns="False"
|
|
|
+ CanUserAddRows="False"
|
|
|
+ CanUserDeleteRows="False"
|
|
|
+ GridLinesVisibility="None"
|
|
|
+ HeadersVisibility="Column"
|
|
|
+ IsReadOnly="True"
|
|
|
+ ItemsSource="{Binding LockResults}"
|
|
|
+ RowHeaderWidth="0">
|
|
|
<DataGrid.Columns>
|
|
|
- <DataGridTextColumn Header="#"
|
|
|
- Binding="{Binding PhotoName}"
|
|
|
- Width="auto"
|
|
|
- IsReadOnly="True" />
|
|
|
- <DataGridTextColumn Header="{lex:Loc 产品编号}"
|
|
|
- Binding="{Binding PhotoCode}"
|
|
|
- Width="auto"
|
|
|
- IsReadOnly="True" />
|
|
|
- <DataGridTextColumn Header="{lex:Loc 时间}"
|
|
|
- Binding="{Binding Timestamp, StringFormat={}{0:G}}"
|
|
|
- Width="auto"
|
|
|
- IsReadOnly="True" />
|
|
|
- <DataGridTextColumn Header="{lex:Loc 测量数据}"
|
|
|
- Binding="{Binding ResultData}"
|
|
|
- Width="auto"
|
|
|
- IsReadOnly="True" />
|
|
|
+ <DataGridTextColumn
|
|
|
+ Width="auto"
|
|
|
+ Binding="{Binding PhotoName}"
|
|
|
+ Header="#"
|
|
|
+ IsReadOnly="True" />
|
|
|
+ <DataGridTextColumn
|
|
|
+ Width="auto"
|
|
|
+ Binding="{Binding PhotoCode}"
|
|
|
+ Header="{lex:Loc 产品编号}"
|
|
|
+ IsReadOnly="True" />
|
|
|
+ <DataGridTextColumn
|
|
|
+ Width="auto"
|
|
|
+ Binding="{Binding Timestamp, StringFormat={}{0:G}}"
|
|
|
+ Header="{lex:Loc 时间}"
|
|
|
+ IsReadOnly="True" />
|
|
|
+ <DataGridTextColumn
|
|
|
+ Width="auto"
|
|
|
+ Binding="{Binding ResultData}"
|
|
|
+ Header="{lex:Loc 测量数据}"
|
|
|
+ IsReadOnly="True" />
|
|
|
<!--<DataGridTextColumn Header="程序号"
|
|
|
Binding="{Binding ScrewdriverProgramNumber}"
|
|
|
Width="auto"
|
|
|
@@ -149,60 +158,54 @@
|
|
|
Binding="{Binding LockTorque}"
|
|
|
Width="auto"
|
|
|
IsReadOnly="True" />-->
|
|
|
- <DataGridTemplateColumn Header="{lex:Loc 拍照结果}"
|
|
|
- Width="auto"
|
|
|
- IsReadOnly="True">
|
|
|
+ <DataGridTemplateColumn
|
|
|
+ Width="auto"
|
|
|
+ Header="{lex:Loc 拍照结果}"
|
|
|
+ IsReadOnly="True">
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
<DataTemplate>
|
|
|
- <Border x:Name="bd"
|
|
|
- Padding="4"
|
|
|
- CornerRadius="4"
|
|
|
- Background="Transparent"
|
|
|
+ <Border
|
|
|
+ x:Name="bd"
|
|
|
+ Padding="4"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Background="Transparent"
|
|
|
+ CornerRadius="4">
|
|
|
+ <TextBlock
|
|
|
+ x:Name="txt"
|
|
|
HorizontalAlignment="Center"
|
|
|
- VerticalAlignment="Center">
|
|
|
- <TextBlock x:Name="txt"
|
|
|
- HorizontalAlignment="Center"
|
|
|
- VerticalAlignment="Center"
|
|
|
- Foreground="White"
|
|
|
- FontWeight="Bold" />
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontWeight="Bold"
|
|
|
+ Foreground="White" />
|
|
|
</Border>
|
|
|
<DataTemplate.Triggers>
|
|
|
- <DataTrigger Binding="{Binding PhotoPassed}"
|
|
|
- Value="OK">
|
|
|
- <Setter TargetName="bd"
|
|
|
- Property="Background"
|
|
|
- Value="Green" />
|
|
|
- <Setter TargetName="txt"
|
|
|
- Property="Text"
|
|
|
- Value="OK" />
|
|
|
+ <DataTrigger Binding="{Binding PhotoPassed}" Value="OK">
|
|
|
+ <Setter TargetName="bd" Property="Background" Value="Green" />
|
|
|
+ <Setter TargetName="txt" Property="Text" Value="OK" />
|
|
|
</DataTrigger>
|
|
|
- <DataTrigger Binding="{Binding PhotoPassed}"
|
|
|
- Value="NG">
|
|
|
- <Setter TargetName="bd"
|
|
|
- Property="Background"
|
|
|
- Value="Red" />
|
|
|
- <Setter TargetName="txt"
|
|
|
- Property="Text"
|
|
|
- Value="NG" />
|
|
|
+ <DataTrigger Binding="{Binding PhotoPassed}" Value="NG">
|
|
|
+ <Setter TargetName="bd" Property="Background" Value="Red" />
|
|
|
+ <Setter TargetName="txt" Property="Text" Value="NG" />
|
|
|
</DataTrigger>
|
|
|
</DataTemplate.Triggers>
|
|
|
</DataTemplate>
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
</DataGridTemplateColumn>
|
|
|
- <DataGridTextColumn Header="{lex:Loc 详情}"
|
|
|
- Binding="{Binding Detail}"
|
|
|
- Width="auto"
|
|
|
- IsReadOnly="True" />
|
|
|
+ <DataGridTextColumn
|
|
|
+ Width="auto"
|
|
|
+ Binding="{Binding Detail}"
|
|
|
+ Header="{lex:Loc 详情}"
|
|
|
+ IsReadOnly="True" />
|
|
|
</DataGrid.Columns>
|
|
|
</DataGrid>
|
|
|
</DockPanel>
|
|
|
</materialDesign:Card>
|
|
|
- <StackPanel Grid.Column="1"
|
|
|
- Margin="5"
|
|
|
- Orientation="Vertical"
|
|
|
- HorizontalAlignment="Center"
|
|
|
- Visibility="{Binding DataContext.IsShowLabel,ElementName=zzz, Converter={StaticResource BooleanToVisibilityConverter}}">
|
|
|
- </StackPanel>
|
|
|
+ <StackPanel
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="5"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ Orientation="Vertical"
|
|
|
+ Visibility="{Binding DataContext.IsShowLabel, ElementName=zzz, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
|
|
</Grid>
|
|
|
|
|
|
<Grid Grid.Row="1">
|
|
|
@@ -210,30 +213,37 @@
|
|
|
<ColumnDefinition Width="*" />
|
|
|
<ColumnDefinition Width="*" />
|
|
|
</Grid.ColumnDefinitions>
|
|
|
- <!--加载产品-->
|
|
|
- <materialDesign:Card Grid.Row="0"
|
|
|
- Grid.Column="0"
|
|
|
- UniformCornerRadius="10"
|
|
|
- BorderBrush="LightGray"
|
|
|
- BorderThickness="1">
|
|
|
- <!--产品-->
|
|
|
- <StackPanel HorizontalAlignment="Center"
|
|
|
+ <!-- 加载产品 -->
|
|
|
+ <materialDesign:Card
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.Column="0"
|
|
|
+ BorderBrush="LightGray"
|
|
|
+ BorderThickness="1"
|
|
|
+ UniformCornerRadius="10">
|
|
|
+ <!-- 产品 -->
|
|
|
+ <StackPanel
|
|
|
+ Margin="2"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Orientation="Vertical">
|
|
|
+ <StackPanel
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <TextBlock
|
|
|
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}">
|
|
|
+ FontSize="14"
|
|
|
+ Text="{lex:Loc 产品列表,
|
|
|
+ Converter={StaticResource StringFormatConverter},
|
|
|
+ ConverterParameter='{}{0}: '}" />
|
|
|
+ <ComboBox
|
|
|
+ x:Name="selectProduct"
|
|
|
+ Width="100"
|
|
|
+ Margin="20,0"
|
|
|
+ materialDesign:HintAssist.Hint="{lex:Loc 选择产品}"
|
|
|
+ FontSize="14"
|
|
|
+ ItemsSource="{Binding ProductList, Mode=TwoWay}"
|
|
|
+ SelectedItem="{Binding SelectProduct, Mode=TwoWay}">
|
|
|
<ComboBox.ItemTemplate>
|
|
|
<DataTemplate>
|
|
|
<StackPanel Orientation="Vertical">
|
|
|
@@ -241,36 +251,43 @@
|
|
|
<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" />
|
|
|
+ <TextBlock
|
|
|
+ MinHeight="0"
|
|
|
+ MaxWidth="300"
|
|
|
+ FontSize="{DynamicResource Font.Size.Captions4}"
|
|
|
+ Foreground="Gray"
|
|
|
+ Text="{Binding Description}"
|
|
|
+ TextTrimming="CharacterEllipsis"
|
|
|
+ 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">
|
|
|
+ <Button
|
|
|
+ Margin="0,10"
|
|
|
+ materialDesign:ButtonAssist.CornerRadius="10"
|
|
|
+ Command="{Binding LoadProductCommand}"
|
|
|
+ CommandParameter="{Binding ElementName=selectProduct, Path=SelectedItem}"
|
|
|
+ Content="{lex:Loc 加载}"
|
|
|
+ Style="{StaticResource MaterialDesignRaisedButton}" />
|
|
|
+ <StackPanel
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <TextBlock
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="14"
|
|
|
+ Foreground="Green"
|
|
|
+ Text="{lex:Loc 当前产品,
|
|
|
+ Converter={StaticResource StringFormatConverter},
|
|
|
+ ConverterParameter='{}{0}: '}" />
|
|
|
+ <TextBlock
|
|
|
+ Margin="10,0"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="14"
|
|
|
+ FontWeight="Bold">
|
|
|
<TextBlock.Text>
|
|
|
<MultiBinding StringFormat="{}{0}. {1}">
|
|
|
<Binding Path="CurrentProduct.NumberCode" />
|
|
|
@@ -281,15 +298,17 @@
|
|
|
</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">
|
|
|
+ <!-- 生产数量 -->
|
|
|
+ <materialDesign:Card
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.Column="1"
|
|
|
+ BorderBrush="LightGray"
|
|
|
+ BorderThickness="1"
|
|
|
+ UniformCornerRadius="10">
|
|
|
+ <Grid
|
|
|
+ Grid.Row="1"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center">
|
|
|
<Grid.RowDefinitions>
|
|
|
<RowDefinition Height="auto" />
|
|
|
<RowDefinition Height="auto" />
|
|
|
@@ -301,63 +320,70 @@
|
|
|
</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" />
|
|
|
+ <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}" />
|
|
|
+ <TextBlock
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ Text="{lex:Loc 当前产品总产量,
|
|
|
+ Converter={StaticResource StringFormatConverter},
|
|
|
+ ConverterParameter='{}{0}: '}"
|
|
|
+ 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"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ Text="{lex:Loc 今日产量,
|
|
|
+ Converter={StaticResource StringFormatConverter},
|
|
|
+ ConverterParameter='{}{0}: '}"
|
|
|
+ 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"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ Text="UPH:"
|
|
|
+ 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>
|
|
|
|
|
|
- <!--OK/NG--><!--
|
|
|
+ <!-- OK/NG -->
|
|
|
+ <!--
|
|
|
<materialDesign:Card Grid.Row="0"
|
|
|
Grid.Column="2"
|
|
|
UniformCornerRadius="10"
|
|
|
@@ -393,7 +419,8 @@
|
|
|
Value="CharacterEllipsis" />
|
|
|
</Style>
|
|
|
</Grid.Resources>
|
|
|
- --><!--<TextBlock Text="{lex:Loc 抛料数,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
+ -->
|
|
|
+ <!--<TextBlock Text="{lex:Loc 抛料数,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
HorizontalAlignment="Right"
|
|
|
TextAlignment="Right" />
|
|
|
<Border Grid.Row="0"
|
|
|
@@ -429,33 +456,39 @@
|
|
|
BorderThickness="1" />
|
|
|
<TextBlock Grid.Row="2"
|
|
|
Grid.Column="1"
|
|
|
- Text="{Binding management.Yield,StringFormat={}{0:F2}%}" />--><!--
|
|
|
+ Text="{Binding management.Yield,StringFormat={}{0:F2}%}" />-->
|
|
|
+ <!--
|
|
|
</Grid>
|
|
|
</materialDesign:Card>-->
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
- <StackPanel Grid.Row="2"
|
|
|
- Orientation="Horizontal"
|
|
|
- VerticalAlignment="Bottom"
|
|
|
- Margin="10,3">
|
|
|
- <TextBlock Text="CT: "
|
|
|
- FontWeight="Bold"
|
|
|
- FontSize="{DynamicResource Font.Size.Body2}"
|
|
|
- VerticalAlignment="Center" />
|
|
|
- <TextBlock Text="{Binding management.CTtime,StringFormat={}{0:F2} s}"
|
|
|
- FontSize="{DynamicResource Font.Size.Body3}"
|
|
|
- VerticalAlignment="Center"
|
|
|
- Margin="10,0,50,0" />
|
|
|
+ <StackPanel
|
|
|
+ Grid.Row="2"
|
|
|
+ Margin="10,3"
|
|
|
+ VerticalAlignment="Bottom"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <TextBlock
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="{DynamicResource Font.Size.Body2}"
|
|
|
+ FontWeight="Bold"
|
|
|
+ Text="CT: " />
|
|
|
+ <TextBlock
|
|
|
+ Margin="10,0,50,0"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="{DynamicResource Font.Size.Body3}"
|
|
|
+ Text="{Binding management.CTtime, StringFormat={}{0:F2} s}" />
|
|
|
|
|
|
- <TextBlock Text="CT2: "
|
|
|
- FontWeight="Bold"
|
|
|
- FontSize="{DynamicResource Font.Size.Body2}"
|
|
|
- VerticalAlignment="Center" />
|
|
|
- <TextBlock Text="{Binding management.CTtime2,StringFormat={}{0:F2} s}"
|
|
|
- FontSize="{DynamicResource Font.Size.Body3}"
|
|
|
- VerticalAlignment="Center"
|
|
|
- Margin="10,0" />
|
|
|
+ <TextBlock
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="{DynamicResource Font.Size.Body2}"
|
|
|
+ FontWeight="Bold"
|
|
|
+ Text="CT2: " />
|
|
|
+ <TextBlock
|
|
|
+ Margin="10,0"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="{DynamicResource Font.Size.Body3}"
|
|
|
+ Text="{Binding management.CTtime2, StringFormat={}{0:F2} s}" />
|
|
|
</StackPanel>
|
|
|
<!--<CheckBox Grid.Row="2"
|
|
|
VerticalAlignment="Bottom"
|
|
|
@@ -471,63 +504,66 @@
|
|
|
Content="检测结果为1"
|
|
|
IsEnabled="{Binding IsRunning, Converter={StaticResource InvertBooleanConverter}}"
|
|
|
IsChecked="{Binding IsResultTrue, Mode=TwoWay, Converter={StaticResource InvertBooleanConverter}}" Width="98" />-->
|
|
|
- <Button Grid.Row="2"
|
|
|
- Content="{lex:Loc 计数清零}"
|
|
|
- VerticalAlignment="Bottom"
|
|
|
- Margin=" 10,3"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- materialDesign:ButtonAssist.CornerRadius="10"
|
|
|
- Style="{StaticResource MaterialDesignRaisedButton}"
|
|
|
- IsEnabled="{Binding IsAllowEdit}"
|
|
|
- Command="{Binding ResetCounterCommand}" />
|
|
|
+ <Button
|
|
|
+ Grid.Row="2"
|
|
|
+ Margin="10,3"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Bottom"
|
|
|
+ materialDesign:ButtonAssist.CornerRadius="10"
|
|
|
+ Command="{Binding ResetCounterCommand}"
|
|
|
+ Content="{lex:Loc 计数清零}"
|
|
|
+ IsEnabled="{Binding IsAllowEdit}"
|
|
|
+ Style="{StaticResource MaterialDesignRaisedButton}" />
|
|
|
</Grid>
|
|
|
- <Border Grid.Row="1"
|
|
|
- CornerRadius="20"
|
|
|
- BorderBrush="#787878"
|
|
|
- BorderThickness="1">
|
|
|
- <DockPanel LastChildFill="True"
|
|
|
- Margin="10">
|
|
|
- <TextBlock Text="{lex:Loc 运行信息,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
|
|
|
- FontWeight="Bold"
|
|
|
- FontSize="{DynamicResource Font.Size.Body3}"
|
|
|
- DockPanel.Dock="Top" />
|
|
|
- <ListView x:Name="messagelist"
|
|
|
- ItemsSource="{Binding MessageQueue}"
|
|
|
- ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
|
- ScrollViewer.CanContentScroll="False"
|
|
|
- BorderThickness="0"
|
|
|
- Background="Transparent"
|
|
|
- ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
|
|
+ <Border
|
|
|
+ Grid.Row="1"
|
|
|
+ BorderBrush="#787878"
|
|
|
+ BorderThickness="1"
|
|
|
+ CornerRadius="20">
|
|
|
+ <DockPanel Margin="10" LastChildFill="True">
|
|
|
+ <TextBlock
|
|
|
+ DockPanel.Dock="Top"
|
|
|
+ FontSize="{DynamicResource Font.Size.Body3}"
|
|
|
+ FontWeight="Bold"
|
|
|
+ Text="{lex:Loc 运行信息,
|
|
|
+ Converter={StaticResource StringFormatConverter},
|
|
|
+ ConverterParameter='{}{0}: '}" />
|
|
|
+ <ListView
|
|
|
+ x:Name="messagelist"
|
|
|
+ Background="Transparent"
|
|
|
+ BorderThickness="0"
|
|
|
+ ItemsSource="{Binding MessageQueue}"
|
|
|
+ ScrollViewer.CanContentScroll="False"
|
|
|
+ ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
|
+ ScrollViewer.VerticalScrollBarVisibility="Auto">
|
|
|
<ListView.Resources>
|
|
|
<Style TargetType="{x:Type GridViewHeaderRowPresenter}">
|
|
|
- <Setter Property="FrameworkElement.Visibility"
|
|
|
- Value="Collapsed" />
|
|
|
+ <Setter Property="FrameworkElement.Visibility" Value="Collapsed" />
|
|
|
</Style>
|
|
|
</ListView.Resources>
|
|
|
<ListView.ItemContainerStyle>
|
|
|
<Style TargetType="ListViewItem">
|
|
|
- <Setter Property="HorizontalContentAlignment"
|
|
|
- Value="Left" />
|
|
|
- <Setter Property="VerticalContentAlignment"
|
|
|
- Value="Top" />
|
|
|
+ <Setter Property="HorizontalContentAlignment" Value="Left" />
|
|
|
+ <Setter Property="VerticalContentAlignment" Value="Top" />
|
|
|
</Style>
|
|
|
</ListView.ItemContainerStyle>
|
|
|
<ListView.ItemTemplate>
|
|
|
<DataTemplate>
|
|
|
- <Border BorderThickness="0"
|
|
|
- HorizontalAlignment="Left">
|
|
|
- <Label Width="auto"
|
|
|
- BorderThickness="0"
|
|
|
- Background="Transparent"
|
|
|
- Margin="0"
|
|
|
- Padding="0"
|
|
|
- HorizontalAlignment="Left"
|
|
|
- VerticalAlignment="Center"
|
|
|
- FontSize="10">
|
|
|
- <TextBlock TextWrapping="Wrap"
|
|
|
- TextAlignment="Left"
|
|
|
- FontSize="{DynamicResource Font.Size.Captions3}"
|
|
|
- Foreground="{Binding FontColol}">
|
|
|
+ <Border HorizontalAlignment="Left" BorderThickness="0">
|
|
|
+ <Label
|
|
|
+ Width="auto"
|
|
|
+ Margin="0"
|
|
|
+ Padding="0"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Background="Transparent"
|
|
|
+ BorderThickness="0"
|
|
|
+ FontSize="10">
|
|
|
+ <TextBlock
|
|
|
+ FontSize="{DynamicResource Font.Size.Captions3}"
|
|
|
+ Foreground="{Binding FontColol}"
|
|
|
+ TextAlignment="Left"
|
|
|
+ TextWrapping="Wrap">
|
|
|
<TextBlock.Text>
|
|
|
<MultiBinding StringFormat="{}[{0:M/d HH:mm:ss}]:{1}">
|
|
|
<Binding Path="DT" />
|
|
|
@@ -537,10 +573,11 @@
|
|
|
</TextBlock>
|
|
|
<Label.ContextMenu>
|
|
|
<ContextMenu>
|
|
|
- <MenuItem Header="Copy"
|
|
|
- Command="{Binding DataContext.CopyCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}"
|
|
|
- CommandParameter="{Binding Message}"
|
|
|
- Icon="{materialDesign:PackIcon Kind=ContentCopy}" />
|
|
|
+ <MenuItem
|
|
|
+ Command="{Binding DataContext.CopyCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}}"
|
|
|
+ CommandParameter="{Binding Message}"
|
|
|
+ Header="Copy"
|
|
|
+ Icon="{materialDesign:PackIcon Kind=ContentCopy}" />
|
|
|
</ContextMenu>
|
|
|
</Label.ContextMenu>
|
|
|
</Label>
|