添加 MX-PD-盘古 项目文件
将 MX-PD-盘古 - new 目录下的所有文件添加到主仓库
This commit is contained in:
@@ -0,0 +1,109 @@
|
||||
<UserControl x:Class="MainShell.DeviceMaintance.View.CameraAccuracyCalibrationView"
|
||||
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:MainShell.DeviceMaintance.View"
|
||||
xmlns:mwControls="http://www.maxwell-gp.com/"
|
||||
xmlns:customControl="clr-namespace:MainShell.Resources.CustomControl"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="700">
|
||||
<UserControl.Resources>
|
||||
<Style TargetType="GroupBox" BasedOn="{StaticResource GroupStepControl}"/>
|
||||
<Style TargetType="Label" BasedOn="{StaticResource {x:Type Label}}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Right"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="Margin" Value="5"/>
|
||||
<Setter Property="Height" Value="35"/>
|
||||
</Style>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}" >
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="Margin" Value="3"/>
|
||||
<Setter Property="Height" Value="35"/>
|
||||
<Setter Property="Width" Value="90"/>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
<Grid mwControls:ParameterAttach.DelayAcceptValue ="{Binding ParameterHelper}">
|
||||
<StackPanel>
|
||||
<GroupBox IsEnabled="{Binding UiEnable}" Header="【第一步】针尖高度设置">
|
||||
<customControl:AxisMoveControl LableContent1="Z1(mm):"
|
||||
Value1="{Binding QuickNeedlePrintParameter.Z1InkHeight}"
|
||||
IsAllShow="False"
|
||||
ReadCommand="{mwControls:Action TeachZ1Pos}"
|
||||
IsReadOnly="False"
|
||||
MoveCommand="{mwControls:Action MoveToZ1Pos}"/>
|
||||
|
||||
</GroupBox>
|
||||
<GroupBox IsEnabled="{Binding UiEnable}" Header="【第二步】WS避让位">
|
||||
<GroupBox.Content>
|
||||
<customControl:AxisMoveControl LableContent1="X2(mm):"
|
||||
Value1="{Binding QuickNeedlePrintParameter.AvoidancePoint.PointX}"
|
||||
LableContent2="Y2(mm):"
|
||||
Value2="{Binding QuickNeedlePrintParameter.AvoidancePoint.PointY}"
|
||||
ReadCommand="{mwControls:Action TeachWSPos}"
|
||||
MoveCommand="{mwControls:Action MoveToWsPos}"
|
||||
IsReadOnly="True"/>
|
||||
<!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<Label VerticalAlignment="Center" Content="X2:"/>
|
||||
<mwControls:NumberBox Value="{Binding QuickNeedlePrintParameter.AvoidancePoint.PointX}" IsReadOnly="True" Width="80" Margin="4,0" />
|
||||
<Label VerticalAlignment="Center" Content="Y2:"/>
|
||||
<mwControls:NumberBox Value="{Binding QuickNeedlePrintParameter.AvoidancePoint.PointY}" IsReadOnly="True" Width="80" Margin="4,0" />
|
||||
<Button Margin="2,0" Click="{mwControls:Action TeachWSPos}" Content="示教"/>
|
||||
<Button Margin="2,0" Click="{mwControls:Action MoveToWsPos}" Content="移动"/>
|
||||
</StackPanel>-->
|
||||
</GroupBox.Content>
|
||||
</GroupBox>
|
||||
<GroupBox IsEnabled="{Binding UiEnable}" Margin="2" Header="【第三步】墨水位置">
|
||||
<GroupBox.Content>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<customControl:AxisMoveControl LableContent1="X2(mm):"
|
||||
Value1="{Binding QuickNeedlePrintParameter.InkPos.PointX}"
|
||||
LableContent2="Y2(mm):"
|
||||
Value2="{Binding QuickNeedlePrintParameter.InkPos.PointY}"
|
||||
ReadCommand="{mwControls:Action TeachInkPos}"
|
||||
MoveCommand="{mwControls:Action MoveToInkPos}"
|
||||
IsReadOnly="True"/>
|
||||
|
||||
<Button Margin="2,0" HorizontalAlignment="Right" Click="{mwControls:Action InkSmearing}" Content="涂墨"/>
|
||||
</Grid>
|
||||
</GroupBox.Content>
|
||||
</GroupBox>
|
||||
<GroupBox Header="【第四步】快打针印参数设置">
|
||||
<StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label VerticalAlignment="Center" HorizontalAlignment="Left" Content="打件颗数:"/>
|
||||
<mwControls:IntNumberBox Value="{Binding BondingNumber}" IsReadOnly="True" Width="75" Margin="4,0" />
|
||||
<Button IsEnabled="{Binding UiEnable}" Margin="2,0" Click="{mwControls:Action PositiveBonding}" Content="快打正向"/>
|
||||
<Button IsEnabled="{Binding UiEnable}" Margin="2,0" Click="{mwControls:Action NegativeBonding}" Content="快打反向"/>
|
||||
<Button IsEnabled="{Binding UiEnable}" Margin="2,0" Click="{mwControls:Action SlowBonding}" Content="补打"/>
|
||||
<Button Margin="2,0" Content="停止打件" Click="{mwControls:Action StopBonding}"/>
|
||||
</StackPanel>
|
||||
<Label Content="正向针印查看:" HorizontalAlignment="Left"/>
|
||||
<StackPanel IsEnabled="{Binding UiEnable}" HorizontalAlignment="Left" Orientation="Horizontal">
|
||||
<Button Margin="2,0" IsEnabled="{Binding CanLastPositiveIndex}" Click="{mwControls:Action LastPositiveIndex}" Content="上一个"/>
|
||||
<Button Margin="2,0" IsEnabled="{Binding CanNextPositiveIndex}" Click="{mwControls:Action NextPositiveIndex}" Content="下一个"/>
|
||||
</StackPanel>
|
||||
<Label Content="反向针印查看:" HorizontalAlignment="Left"/>
|
||||
<StackPanel IsEnabled="{Binding UiEnable}" HorizontalAlignment="Left" Orientation="Horizontal">
|
||||
<Button Margin="2,0" IsEnabled="{Binding CanLastNegativeIndex}" Click="{mwControls:Action LastNegativeIndex}" Content="上一个"/>
|
||||
<Button Margin="2,0" IsEnabled="{Binding CanNextNegativeIndex}" Click="{mwControls:Action NextNegativeIndex}" Content="下一个"/>
|
||||
</StackPanel>
|
||||
<Label Content="补打针印查看:" HorizontalAlignment="Left"/>
|
||||
<StackPanel IsEnabled="{Binding UiEnable}" HorizontalAlignment="Left" Orientation="Horizontal">
|
||||
<Button Margin="2,0" IsEnabled="{Binding CanLastSlowIndex}" Click="{mwControls:Action LastSlowIndex}" Content="上一个"/>
|
||||
<Button Margin="2,0" IsEnabled="{Binding CanNextSlowIndex}" Click="{mwControls:Action NextSlowIndex}" Content="下一个"/>
|
||||
</StackPanel>
|
||||
<Button IsEnabled="{Binding UiEnable}" HorizontalAlignment="Right" Click="{mwControls:Action SaveParameter}" Margin="10,2" Content="保存"/>
|
||||
</StackPanel>
|
||||
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace MainShell.DeviceMaintance.View
|
||||
{
|
||||
/// <summary>
|
||||
/// CameraAccuracyCalibrationView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class CameraAccuracyCalibrationView : UserControl
|
||||
{
|
||||
public CameraAccuracyCalibrationView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
<UserControl x:Class="MainShell.DeviceMaintance.View.CylinderView"
|
||||
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:MainShell.DeviceMaintance.View"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<Style x:Key="CylinderCardStyle" TargetType="Border">
|
||||
<Setter Property="Background" Value="#F8FAFD"/>
|
||||
<Setter Property="BorderBrush" Value="#D4DCE8"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="CornerRadius" Value="8"/>
|
||||
<Setter Property="Padding" Value="14"/>
|
||||
<Setter Property="Margin" Value="0,0,0,12"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CylinderDotStyle" TargetType="Ellipse">
|
||||
<Setter Property="Width" Value="10"/>
|
||||
<Setter Property="Height" Value="10"/>
|
||||
<Setter Property="Fill" Value="#CBD5E1"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsOn}" Value="True">
|
||||
<Setter Property="Fill" Value="#22C55E"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CylinderActionButtonStyle" TargetType="Button">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="Padding" Value="12,6"/>
|
||||
<Setter Property="MinWidth" Value="90"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="Margin" Value="0,0,8,0"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
CornerRadius="18"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid Background="#EDF1F7">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Margin="12,12,12,8">
|
||||
<TextBlock Text="CYLINDER CONTROL / 气缸控制" FontSize="20" FontWeight="Bold" Foreground="#0F3B7A"/>
|
||||
<Border Background="#EFF6FF" BorderBrush="#BFDBFE" BorderThickness="1" CornerRadius="6" Padding="10" Margin="0,8,0,0">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="最近操作:" Foreground="#475569" Margin="0,0,8,0"/>
|
||||
<TextBlock Text="{Binding PageState.LastActionTime, StringFormat={}{0:HH:mm:ss}}" Foreground="#0F172A" FontWeight="Bold" Margin="0,0,12,0"/>
|
||||
<TextBlock Text="{Binding PageState.LastActionMessage}" Foreground="#1D4ED8" FontWeight="SemiBold" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
||||
<ScrollViewer Grid.Row="1" Margin="12,0,12,12" VerticalScrollBarVisibility="Auto">
|
||||
<ItemsControl ItemsSource="{Binding PageState.Cylinders}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Style="{StaticResource CylinderCardStyle}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Name}" FontSize="18" FontWeight="Bold" Foreground="#0F3B7A"/>
|
||||
<TextBlock Text="{Binding Description}" Foreground="#64748B" Margin="0,4,0,0"/>
|
||||
</StackPanel>
|
||||
<Border Grid.Column="1" Background="#FEF3C7" CornerRadius="12" Padding="10,4" VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding ControlTypeText}" Foreground="#92400E" FontWeight="Bold"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="1" Margin="0,12,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Margin="0,0,16,0">
|
||||
<TextBlock Text="控制" Foreground="#1D4ED8" FontWeight="Bold" Margin="0,0,0,8"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Content="伸出"
|
||||
Command="{Binding ExtendCommand}"
|
||||
Background="#2563EB"
|
||||
BorderBrush="#2563EB"
|
||||
Style="{StaticResource CylinderActionButtonStyle}"/>
|
||||
<Button Content="缩回"
|
||||
Command="{Binding RetractCommand}"
|
||||
Background="#F97316"
|
||||
BorderBrush="#F97316"
|
||||
Style="{StaticResource CylinderActionButtonStyle}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="1" Margin="0,0,16,0">
|
||||
<TextBlock Text="输出信号" Foreground="#C2410C" FontWeight="Bold" Margin="0,0,0,8"/>
|
||||
<ItemsControl ItemsSource="{Binding OutputSignals}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Background="#FFF7ED" BorderBrush="#FED7AA" BorderThickness="1" CornerRadius="4" Padding="8,6" Margin="0,0,0,6">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Ellipse Style="{StaticResource CylinderDotStyle}" VerticalAlignment="Center" Margin="0,0,8,0"/>
|
||||
<StackPanel Grid.Column="1">
|
||||
<TextBlock Text="{Binding Name}" Foreground="#9A3412" FontWeight="SemiBold"/>
|
||||
<TextBlock Text="{Binding IoNameText}" Foreground="#7C2D12" FontSize="11" TextWrapping="Wrap"/>
|
||||
<TextBlock Text="{Binding LineNo, StringFormat=线标:{0}}" Foreground="#C2410C" FontSize="11"/>
|
||||
</StackPanel>
|
||||
<TextBlock Grid.Column="2" Text="{Binding StateText}" Foreground="#C2410C" FontWeight="Bold"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="2">
|
||||
<TextBlock Text="反馈信号" Foreground="#166534" FontWeight="Bold" Margin="0,0,0,8"/>
|
||||
<ItemsControl ItemsSource="{Binding FeedbackSignals}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Background="#F0FDF4" BorderBrush="#BBF7D0" BorderThickness="1" CornerRadius="4" Padding="8,6" Margin="0,0,0,6">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Ellipse Style="{StaticResource CylinderDotStyle}" VerticalAlignment="Center" Margin="0,0,8,0"/>
|
||||
<StackPanel Grid.Column="1">
|
||||
<TextBlock Text="{Binding Name}" Foreground="#166534" FontWeight="SemiBold"/>
|
||||
<TextBlock Text="{Binding IoNameText}" Foreground="#15803D" FontSize="11" TextWrapping="Wrap"/>
|
||||
<TextBlock Text="{Binding LineNo, StringFormat=线标:{0}}" Foreground="#15803D" FontSize="11"/>
|
||||
</StackPanel>
|
||||
<TextBlock Grid.Column="2" Text="{Binding StateText}" Foreground="#166534" FontWeight="Bold"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace MainShell.DeviceMaintance.View
|
||||
{
|
||||
/// <summary>
|
||||
/// CylinderView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class CylinderView : UserControl
|
||||
{
|
||||
public CylinderView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,310 @@
|
||||
<UserControl x:Class="MainShell.DeviceMaintance.View.DeviceIoView"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="900">
|
||||
<UserControl.Resources>
|
||||
<Style x:Key="IoCardStyle" TargetType="Border">
|
||||
<Setter Property="Background" Value="#F8FAFD"/>
|
||||
<Setter Property="BorderBrush" Value="#D4DCE8"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="CornerRadius" Value="8"/>
|
||||
<Setter Property="Margin" Value="0,0,0,12"/>
|
||||
<Setter Property="Padding" Value="14"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StatusBadgeBorderStyle" TargetType="Border">
|
||||
<Setter Property="CornerRadius" Value="12"/>
|
||||
<Setter Property="Padding" Value="10,4"/>
|
||||
<Setter Property="Margin" Value="0,0,8,0"/>
|
||||
<Setter Property="Background" Value="#E2E8F0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="InputStatusDotStyle" TargetType="Ellipse">
|
||||
<Setter Property="Width" Value="10"/>
|
||||
<Setter Property="Height" Value="10"/>
|
||||
<Setter Property="Fill" Value="#93C5FD"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsOn}" Value="True">
|
||||
<Setter Property="Fill" Value="#2563EB"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OutputStatusDotStyle" TargetType="Ellipse">
|
||||
<Setter Property="Width" Value="10"/>
|
||||
<Setter Property="Height" Value="10"/>
|
||||
<Setter Property="Fill" Value="#FCD34D"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsOn}" Value="True">
|
||||
<Setter Property="Fill" Value="#F97316"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="InputItemBorderStyle" TargetType="Border">
|
||||
<Setter Property="Background" Value="#EFF6FF"/>
|
||||
<Setter Property="BorderBrush" Value="#DBEAFE"/>
|
||||
<Setter Property="BorderThickness" Value="0,0,0,1"/>
|
||||
<Setter Property="Padding" Value="8,6"/>
|
||||
<Setter Property="Margin" Value="0,0,0,4"/>
|
||||
<Setter Property="CornerRadius" Value="4"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OutputItemBorderStyle" TargetType="Border">
|
||||
<Setter Property="Background" Value="#FFF7ED"/>
|
||||
<Setter Property="BorderBrush" Value="#FED7AA"/>
|
||||
<Setter Property="BorderThickness" Value="0,0,0,1"/>
|
||||
<Setter Property="Padding" Value="8,6"/>
|
||||
<Setter Property="Margin" Value="0,0,0,4"/>
|
||||
<Setter Property="CornerRadius" Value="4"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="IoSectionBorderStyle" TargetType="Border">
|
||||
<Setter Property="CornerRadius" Value="6"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="10"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="IoOutputToggleButtonStyle" TargetType="ToggleButton">
|
||||
<Setter Property="Width" Value="90"/>
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ToggleButton">
|
||||
<Border x:Name="Root" Background="#CBD5E1" BorderBrush="#94A3B8" BorderThickness="1" CornerRadius="15">
|
||||
<Grid Margin="2">
|
||||
<Border x:Name="Knob" Width="24" Height="24" Background="White" CornerRadius="12" HorizontalAlignment="Left"/>
|
||||
<TextBlock x:Name="ToggleLabel" Text="OFF" Foreground="#334155" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="Root" Property="Background" Value="#16A34A"/>
|
||||
<Setter TargetName="Root" Property="BorderBrush" Value="#16A34A"/>
|
||||
<Setter TargetName="Knob" Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter TargetName="ToggleLabel" Property="Text" Value="ON"/>
|
||||
<Setter TargetName="ToggleLabel" Property="Foreground" Value="White"/>
|
||||
<Setter TargetName="ToggleLabel" Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter TargetName="ToggleLabel" Property="Margin" Value="10,0,0,0"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="Root" Property="Opacity" Value="0.45"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid Background="#EDF1F7">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Margin="10,10,10,8">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="DEVICE IO MONITOR / 设备IO监控" FontSize="20" FontWeight="Bold" Foreground="#0F3B7A"/>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<Border Style="{StaticResource StatusBadgeBorderStyle}">
|
||||
<TextBlock Text="{Binding PageState.LastRefreshTime, StringFormat=刷新:{0:HH:mm:ss}}" Foreground="#475569"/>
|
||||
</Border>
|
||||
<Border>
|
||||
<Border.Style>
|
||||
<Style TargetType="Border" BasedOn="{StaticResource StatusBadgeBorderStyle}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding PageState.IsOnline}" Value="True">
|
||||
<Setter Property="Background" Value="#DCFCE7"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding PageState.IsOnline}" Value="False">
|
||||
<Setter Property="Background" Value="#FEE2E2"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<TextBlock Text="{Binding PageState.OnlineText}">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="Foreground" Value="#B91C1C"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding PageState.IsOnline}" Value="True">
|
||||
<Setter Property="Foreground" Value="#166534"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<Border Margin="0,8,0,0" Padding="12,6">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border" BasedOn="{StaticResource StatusBadgeBorderStyle}">
|
||||
<Setter Property="Background" Value="#EFF6FF"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding PageState.IsWriteSuccess}" Value="True">
|
||||
<Setter Property="Background" Value="#DCFCE7"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding PageState.IsWriteSuccess}" Value="False">
|
||||
<Setter Property="Background" Value="#FEF3C7"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding PageState.LastWriteTime, StringFormat=写入时间:{0:HH:mm:ss}}" Foreground="#475569" Margin="0,0,14,0"/>
|
||||
<TextBlock Text="{Binding PageState.LastWriteMessage}" FontWeight="SemiBold" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
||||
<ScrollViewer Grid.Row="1" Margin="10,0,10,10" VerticalScrollBarVisibility="Auto">
|
||||
<ItemsControl ItemsSource="{Binding PageState.Modules}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Style="{StaticResource IoCardStyle}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding Name}" FontSize="18" FontWeight="Bold" Foreground="#0F3B7A"/>
|
||||
|
||||
<Grid Grid.Row="1" Margin="0,10,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition>
|
||||
<ColumnDefinition.Style>
|
||||
<Style TargetType="ColumnDefinition">
|
||||
<Setter Property="Width" Value="*"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding HasInputs}" Value="False">
|
||||
<Setter Property="Width" Value="0"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ColumnDefinition.Style>
|
||||
</ColumnDefinition>
|
||||
<ColumnDefinition>
|
||||
<ColumnDefinition.Style>
|
||||
<Style TargetType="ColumnDefinition">
|
||||
<Setter Property="Width" Value="*"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding HasOutputs}" Value="False">
|
||||
<Setter Property="Width" Value="0"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ColumnDefinition.Style>
|
||||
</ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Border BorderBrush="#BFDBFE" Background="#F8FBFF">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border" BasedOn="{StaticResource IoSectionBorderStyle}">
|
||||
<Setter Property="Margin" Value="0,0,6,0"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding HasInputs}" Value="False">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding HasOutputs}" Value="False">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<StackPanel>
|
||||
<TextBlock Text="输入 IO" Foreground="#1D4ED8" FontWeight="Bold" Margin="0,0,0,8"/>
|
||||
<ItemsControl ItemsSource="{Binding InputPoints}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Style="{StaticResource InputItemBorderStyle}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Ellipse Style="{StaticResource InputStatusDotStyle}" VerticalAlignment="Center" Margin="0,0,8,0"/>
|
||||
<StackPanel Grid.Column="1">
|
||||
<TextBlock Text="{Binding Description}" Foreground="#1E3A8A" FontWeight="SemiBold"/>
|
||||
<TextBlock Text="{Binding StationNo, StringFormat=站号:{0}}" Foreground="#1D4ED8" FontSize="11"/>
|
||||
<TextBlock Text="{Binding LineNo, StringFormat=线标:{0}}" Foreground="#1D4ED8" FontSize="11"/>
|
||||
<TextBlock Text="{Binding Name}" Foreground="#64748B" FontSize="11" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
<TextBlock Grid.Column="2" Text="{Binding StateText}" VerticalAlignment="Center" Foreground="#1E40AF" FontWeight="Bold"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Column="1" BorderBrush="#FDBA74" Background="#FFF9F2">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border" BasedOn="{StaticResource IoSectionBorderStyle}">
|
||||
<Setter Property="Margin" Value="6,0,0,0"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding HasOutputs}" Value="False">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding HasInputs}" Value="False">
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<StackPanel>
|
||||
<TextBlock Text="输出 IO" Foreground="#C2410C" FontWeight="Bold" Margin="0,0,0,8"/>
|
||||
<ItemsControl ItemsSource="{Binding OutputPoints}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Style="{StaticResource OutputItemBorderStyle}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Ellipse Style="{StaticResource OutputStatusDotStyle}" VerticalAlignment="Center" Margin="0,0,8,0"/>
|
||||
<StackPanel Grid.Column="1">
|
||||
<TextBlock Text="{Binding Description}" Foreground="#9A3412" FontWeight="SemiBold"/>
|
||||
<TextBlock Text="{Binding StationNo, StringFormat=站号:{0}}" Foreground="#C2410C" FontSize="11"/>
|
||||
<TextBlock Text="{Binding LineNo, StringFormat=线标:{0}}" Foreground="#C2410C" FontSize="11"/>
|
||||
<TextBlock Text="{Binding Name}" Foreground="#7C2D12" FontSize="11" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
<TextBlock Grid.Column="2" Text="{Binding StateText}" Margin="0,0,10,0" VerticalAlignment="Center" Foreground="#C2410C" FontWeight="Bold"/>
|
||||
<ToggleButton Grid.Column="3"
|
||||
Style="{StaticResource IoOutputToggleButtonStyle}"
|
||||
IsChecked="{Binding IsOn, Mode=OneWay}"
|
||||
Command="{Binding ToggleCommand}"
|
||||
IsEnabled="{Binding CanWrite}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,12 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace MainShell.DeviceMaintance.View
|
||||
{
|
||||
public partial class DeviceIoView : UserControl
|
||||
{
|
||||
public DeviceIoView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<UserControl x:Class="MainShell.DeviceMaintance.View.DeviceMaintanceView"
|
||||
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:MainShell.DeviceMaintance.View"
|
||||
xmlns:mw="http://www.maxwell-gp.com/"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Margin="-40,0,0,0" Grid.Column="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<mw:SideMenu ItemsSource="{Binding MenuItemWraps}"
|
||||
SelectedItem="{Binding SelectedMenuItem, Mode=TwoWay}"
|
||||
Grid.Row ="0" Width="180"
|
||||
ExpandMode="Accordion"
|
||||
AutoSelect="True"
|
||||
>
|
||||
<mw:SideMenu.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type mw:SideMenuItem}" BasedOn="{StaticResource SideMenuItemHeaderAccordionBaseStyle}">
|
||||
<Setter Property="Header" Value="{Binding Header}" />
|
||||
<Setter Property="Tag" Value="{Binding Tag}" />
|
||||
</Style>
|
||||
</mw:SideMenu.ItemContainerStyle>
|
||||
</mw:SideMenu>
|
||||
|
||||
</Grid>
|
||||
|
||||
<ContentControl Margin="5,0" Grid.Column="1" mw:View.Model="{Binding CurrentScreen}"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace MainShell.DeviceMaintance.View
|
||||
{
|
||||
/// <summary>
|
||||
/// DeviceMaintanceView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class DeviceMaintanceView : UserControl
|
||||
{
|
||||
public DeviceMaintanceView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
<UserControl x:Class="MainShell.DeviceMaintance.View.HardwareTestView"
|
||||
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:mw="http://www.maxwell-gp.com/"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<Style x:Key="HardwareTestLabelStyle" TargetType="Label" BasedOn="{StaticResource ProcessLabelStyle}">
|
||||
<Setter Property="Width" Value="126"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="HardwareTestValueBorderStyle" TargetType="Border">
|
||||
<Setter Property="Background" Value="#F8FAFC"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource ProcessCardBorderBrush}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="CornerRadius" Value="4"/>
|
||||
<Setter Property="Padding" Value="12,6"/>
|
||||
<Setter Property="Margin" Value="8,0,18,0"/>
|
||||
<Setter Property="MinWidth" Value="150"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="HardwareTestValueTextStyle" TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource ProcessBodyForegroundBrush}"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="HardwareTestIntNumberBoxStyle" TargetType="{x:Type mw:IntNumberBox}" BasedOn="{StaticResource ProcessLargeIntNumberBoxStyle}">
|
||||
<Setter Property="Margin" Value="8,0,18,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="HardwareTestButtonStyle" TargetType="Button" BasedOn="{StaticResource TestButtonStyle}">
|
||||
<Setter Property="Width" Value="110"/>
|
||||
<Setter Property="Height" Value="32"/>
|
||||
<Setter Property="Margin" Value="8,0,0,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="HardwareTestStartButtonStyle" TargetType="Button" BasedOn="{StaticResource StartButtonStyle}">
|
||||
<Setter Property="Width" Value="110"/>
|
||||
<Setter Property="Height" Value="32"/>
|
||||
<Setter Property="Margin" Value="8,0,0,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="HardwareTestStopButtonStyle" TargetType="Button" BasedOn="{StaticResource CloseButtonStyle}">
|
||||
<Setter Property="Width" Value="110"/>
|
||||
<Setter Property="Height" Value="32"/>
|
||||
<Setter Property="Margin" Value="8,0,0,0"/>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid Background="{StaticResource ProcessPageBackgroundBrush}">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Margin="4" Padding="0,0,4,0">
|
||||
<StackPanel Margin="0,0,0,4">
|
||||
<GroupBox Header="{DynamicResource Diastimeter}" Style="{StaticResource ProcessWideCardGroupBoxStyle}">
|
||||
<WrapPanel>
|
||||
<Label Style="{StaticResource HardwareTestLabelStyle}" Content="{DynamicResource DiastimeterValue}"/>
|
||||
<Border Style="{StaticResource HardwareTestValueBorderStyle}">
|
||||
<TextBlock Style="{StaticResource HardwareTestValueTextStyle}" Text="{Binding Message}"/>
|
||||
</Border>
|
||||
<Button Style="{StaticResource HardwareTestButtonStyle}" Click="{mw:Action btnZeroClick}" Content="{DynamicResource SetZero}"/>
|
||||
<Button Style="{StaticResource HardwareTestButtonStyle}" Click="{mw:Action btnGetCurrentValueClick}" Content="{DynamicResource GetCurrentValue}"/>
|
||||
</WrapPanel>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="FFU" Style="{StaticResource ProcessWideCardGroupBoxStyle}">
|
||||
<WrapPanel>
|
||||
<Label Style="{StaticResource HardwareTestLabelStyle}" Content="{DynamicResource FFURotateSpeed}"/>
|
||||
<mw:IntNumberBox Style="{StaticResource HardwareTestIntNumberBoxStyle}" Value="{Binding FFURotateSpeed}" ValueChanged="{mw:Action FFURotateSpeedChanged}"/>
|
||||
<Button Style="{StaticResource HardwareTestStartButtonStyle}" Content="{DynamicResource Open}" Click="{mw:Action BtnOpenFFU}"/>
|
||||
<Button Style="{StaticResource HardwareTestStopButtonStyle}" Content="{DynamicResource Close}" Click="{mw:Action BtnCloseFFU}"/>
|
||||
</WrapPanel>
|
||||
</GroupBox>
|
||||
|
||||
<WrapPanel>
|
||||
<GroupBox Header="{DynamicResource WaferScaner}" Style="{StaticResource ProcessCardGroupBoxStyle}" Width="430" Margin="0,0,18,18">
|
||||
<WrapPanel>
|
||||
<Button Style="{StaticResource HardwareTestButtonStyle}" Click="{mw:Action btnScanWaferBarcodeClick}" Content="{DynamicResource GetCurrentValue}"/>
|
||||
<Border Style="{StaticResource HardwareTestValueBorderStyle}" MinWidth="180" Margin="8,0,0,0">
|
||||
<TextBlock Style="{StaticResource HardwareTestValueTextStyle}" Text="{Binding WaferBarcode}"/>
|
||||
</Border>
|
||||
</WrapPanel>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="{DynamicResource GlassScaner}" Style="{StaticResource ProcessCardGroupBoxStyle}" Width="430" Margin="0,0,0,18">
|
||||
<WrapPanel>
|
||||
<Button Style="{StaticResource HardwareTestButtonStyle}" Click="{mw:Action btnScanGlassBarcodeClick}" Content="{DynamicResource GetCurrentValue}"/>
|
||||
<Border Style="{StaticResource HardwareTestValueBorderStyle}" MinWidth="180" Margin="8,0,0,0">
|
||||
<TextBlock Style="{StaticResource HardwareTestValueTextStyle}" Text="{Binding GlassBarcode}"/>
|
||||
</Border>
|
||||
</WrapPanel>
|
||||
</GroupBox>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace MainShell.DeviceMaintance.View
|
||||
{
|
||||
/// <summary>
|
||||
/// HardwareTestView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class HardwareTestView : UserControl
|
||||
{
|
||||
public HardwareTestView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<UserControl x:Class="MainShell.DeviceMaintance.View.IOMaintanceView"
|
||||
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:MainShell.DeviceMaintance.View"
|
||||
xmlns:mw="http://www.maxwell-gp.com/"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Border Background="{StaticResource BackgroundBrush}" BorderBrush="{StaticResource BorderBrush}" BorderThickness="2,2,2,2">
|
||||
<TabControl mw:TabControlAttach.FontSize="14">
|
||||
<TabItem Header="IO监控" >
|
||||
<ContentControl mw:View.Model="{Binding IOMonitorViewModel}" Margin="15"/>
|
||||
</TabItem>
|
||||
<TabItem Header="气缸控制" >
|
||||
<ContentControl mw:View.Model="{Binding CylinderViewModel}" Margin="15"/>
|
||||
</TabItem>
|
||||
<TabItem Header="IO测试" >
|
||||
<ContentControl mw:View.Model="{Binding IoTestViewModel}" Margin="15"/>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Border>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,13 @@
|
||||
<UserControl x:Class="MainShell.DeviceMaintance.View.IOMonitorView"
|
||||
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:MainShell.DeviceMaintance.View"
|
||||
xmlns:mw="http://www.maxwell-gp.com/"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<ContentControl mw:View.Model="{Binding DeviceIoViewModel}"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace MainShell.DeviceMaintance.View
|
||||
{
|
||||
/// <summary>
|
||||
/// IOMonitorView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class IOMonitorView : UserControl
|
||||
{
|
||||
public IOMonitorView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
<UserControl x:Class="MainShell.DeviceMaintance.View.IoTestView"
|
||||
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:mw="http://www.maxwell-gp.com/"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="560" d:DesignWidth="980">
|
||||
<UserControl.Resources>
|
||||
<Style x:Key="IoTestGroupBoxStyle" TargetType="GroupBox" BasedOn="{StaticResource ProcessWideCardGroupBoxStyle}">
|
||||
<Setter Property="Margin" Value="0,0,0,16"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="IoTestLabelStyle" TargetType="Label" BasedOn="{StaticResource ProcessLabelStyle}">
|
||||
<Setter Property="Width" Value="95"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="IoTestNumberBoxStyle" TargetType="{x:Type mw:IntNumberBox}" BasedOn="{StaticResource ProcessLargeIntNumberBoxStyle}">
|
||||
<Setter Property="Width" Value="110"/>
|
||||
<Setter Property="Margin" Value="0,0,12,8"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="IoTestButtonStyle" TargetType="Button" BasedOn="{StaticResource TestButtonStyle}">
|
||||
<Setter Property="Width" Value="100"/>
|
||||
<Setter Property="Height" Value="32"/>
|
||||
<Setter Property="Margin" Value="0,0,12,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="IoTestResultBorderStyle" TargetType="Border">
|
||||
<Setter Property="Background" Value="#F8FAFC"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource ProcessCardBorderBrush}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="CornerRadius" Value="4"/>
|
||||
<Setter Property="Padding" Value="12,8"/>
|
||||
<Setter Property="Margin" Value="0,4,0,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="IoTestCheckBoxStyle" TargetType="CheckBox">
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Margin" Value="0,0,18,8"/>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid Background="{StaticResource ProcessPageBackgroundBrush}">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Margin="4" Padding="0,0,4,0">
|
||||
<StackPanel Margin="0,0,0,4">
|
||||
<GroupBox Header="Delta IO状态" Style="{StaticResource IoTestGroupBoxStyle}">
|
||||
<StackPanel>
|
||||
<WrapPanel>
|
||||
<Label Style="{StaticResource IoTestLabelStyle}" Content="控制卡状态"/>
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding CardStatusText}" TextWrapping="Wrap" Width="620"/>
|
||||
<Button Style="{StaticResource IoTestButtonStyle}" Content="刷新状态" Click="{mw:Action RefreshCardStatus}"/>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="数字量 Bit 测试" Style="{StaticResource IoTestGroupBoxStyle}">
|
||||
<StackPanel>
|
||||
<WrapPanel>
|
||||
<Label Style="{StaticResource IoTestLabelStyle}" Content="CardNo"/>
|
||||
<mw:IntNumberBox Style="{StaticResource IoTestNumberBoxStyle}" Value="{Binding BitState.CardNo}"/>
|
||||
<Label Style="{StaticResource IoTestLabelStyle}" Content="Node"/>
|
||||
<mw:IntNumberBox Style="{StaticResource IoTestNumberBoxStyle}" Value="{Binding BitState.Node}"/>
|
||||
<Label Style="{StaticResource IoTestLabelStyle}" Content="Slot"/>
|
||||
<mw:IntNumberBox Style="{StaticResource IoTestNumberBoxStyle}" Value="{Binding BitState.Slot}"/>
|
||||
</WrapPanel>
|
||||
|
||||
<WrapPanel>
|
||||
<Label Style="{StaticResource IoTestLabelStyle}" Content="Index"/>
|
||||
<mw:IntNumberBox Style="{StaticResource IoTestNumberBoxStyle}" Value="{Binding BitState.Index}"/>
|
||||
<Label Style="{StaticResource IoTestLabelStyle}" Content="SubIndex"/>
|
||||
<mw:IntNumberBox Style="{StaticResource IoTestNumberBoxStyle}" Value="{Binding BitState.SubIndex}"/>
|
||||
<Label Style="{StaticResource IoTestLabelStyle}" Content="BitNo"/>
|
||||
<mw:IntNumberBox Style="{StaticResource IoTestNumberBoxStyle}" Value="{Binding BitState.BitNo}"/>
|
||||
</WrapPanel>
|
||||
|
||||
<WrapPanel>
|
||||
<Label Style="{StaticResource IoTestLabelStyle}" Content="IoType"/>
|
||||
<mw:IntNumberBox Style="{StaticResource IoTestNumberBoxStyle}" Value="{Binding BitState.IoType}"/>
|
||||
<Label Style="{StaticResource IoTestLabelStyle}" Content="ReadIoType"/>
|
||||
<mw:IntNumberBox Style="{StaticResource IoTestNumberBoxStyle}" Value="{Binding BitState.ReadIoType}"/>
|
||||
<CheckBox Style="{StaticResource IoTestCheckBoxStyle}" Content="写入值" IsChecked="{Binding BitState.WriteValue}"/>
|
||||
<CheckBox Style="{StaticResource IoTestCheckBoxStyle}" Content="读取结果" IsChecked="{Binding BitState.ReadValue}" IsEnabled="False"/>
|
||||
</WrapPanel>
|
||||
|
||||
<WrapPanel Margin="0,4,0,0">
|
||||
<Button Style="{StaticResource IoTestButtonStyle}" Content="读取 Bit" Click="{mw:Action ReadBit}"/>
|
||||
<Button Style="{StaticResource IoTestButtonStyle}" Content="写入 Bit" Click="{mw:Action WriteBit}"/>
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding BitState.ReturnCode, StringFormat=返回码:{0}}"/>
|
||||
</WrapPanel>
|
||||
|
||||
<Border Style="{StaticResource IoTestResultBorderStyle}">
|
||||
<TextBlock Text="{Binding BitState.ResultMessage}" TextWrapping="Wrap"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="模拟量 DA 测试" Style="{StaticResource IoTestGroupBoxStyle}">
|
||||
<StackPanel>
|
||||
<WrapPanel>
|
||||
<Label Style="{StaticResource IoTestLabelStyle}" Content="CardNo"/>
|
||||
<mw:IntNumberBox Style="{StaticResource IoTestNumberBoxStyle}" Value="{Binding DaState.CardNo}"/>
|
||||
<Label Style="{StaticResource IoTestLabelStyle}" Content="Node"/>
|
||||
<mw:IntNumberBox Style="{StaticResource IoTestNumberBoxStyle}" Value="{Binding DaState.Node}"/>
|
||||
<Label Style="{StaticResource IoTestLabelStyle}" Content="Slot"/>
|
||||
<mw:IntNumberBox Style="{StaticResource IoTestNumberBoxStyle}" Value="{Binding DaState.Slot}"/>
|
||||
</WrapPanel>
|
||||
|
||||
<WrapPanel>
|
||||
<Label Style="{StaticResource IoTestLabelStyle}" Content="Index"/>
|
||||
<mw:IntNumberBox Style="{StaticResource IoTestNumberBoxStyle}" Value="{Binding DaState.Index}"/>
|
||||
<Label Style="{StaticResource IoTestLabelStyle}" Content="SubIndex"/>
|
||||
<mw:IntNumberBox Style="{StaticResource IoTestNumberBoxStyle}" Value="{Binding DaState.SubIndex}"/>
|
||||
<Label Style="{StaticResource IoTestLabelStyle}" Content="ByteSize"/>
|
||||
<mw:IntNumberBox Style="{StaticResource IoTestNumberBoxStyle}" Value="{Binding DaState.ByteSize}"/>
|
||||
</WrapPanel>
|
||||
|
||||
<WrapPanel>
|
||||
<Label Style="{StaticResource IoTestLabelStyle}" Content="IoType"/>
|
||||
<mw:IntNumberBox Style="{StaticResource IoTestNumberBoxStyle}" Value="{Binding DaState.IoType}"/>
|
||||
<Label Style="{StaticResource IoTestLabelStyle}" Content="写入值"/>
|
||||
<mw:IntNumberBox Style="{StaticResource IoTestNumberBoxStyle}" Value="{Binding DaState.WriteRawValue}"/>
|
||||
<Label Style="{StaticResource IoTestLabelStyle}" Content="读取值"/>
|
||||
<mw:IntNumberBox Style="{StaticResource IoTestNumberBoxStyle}" Value="{Binding DaState.ReadRawValue}" IsEnabled="False"/>
|
||||
</WrapPanel>
|
||||
|
||||
<WrapPanel>
|
||||
<CheckBox Style="{StaticResource IoTestCheckBoxStyle}" Content="有符号" IsChecked="{Binding DaState.Signed}"/>
|
||||
<Button Style="{StaticResource IoTestButtonStyle}" Content="读取 DA" Click="{mw:Action ReadDa}"/>
|
||||
<Button Style="{StaticResource IoTestButtonStyle}" Content="写入 DA" Click="{mw:Action WriteDa}"/>
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding DaState.ReturnCode, StringFormat=返回码:{0}}"/>
|
||||
</WrapPanel>
|
||||
|
||||
<Border Style="{StaticResource IoTestResultBorderStyle}">
|
||||
<TextBlock Text="{Binding DaState.ResultMessage}" TextWrapping="Wrap"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace MainShell.DeviceMaintance.View
|
||||
{
|
||||
/// <summary>
|
||||
/// IoTestView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class IoTestView : UserControl
|
||||
{
|
||||
public IoTestView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
<UserControl x:Class="MainShell.DeviceMaintance.View.LaserCompensationView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:mw="http://www.maxwell-gp.com/"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="560"
|
||||
d:DesignWidth="900">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<Style TargetType="Label" BasedOn="{StaticResource {x:Type Label}}">
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="Margin" Value="8,0,8,0"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource ProcessBodyForegroundBrush}"/>
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
|
||||
<Setter Property="Foreground" Value="{StaticResource ProcessBodyForegroundBrush}"/>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Width" Value="110"/>
|
||||
<Setter Property="Height" Value="32"/>
|
||||
<Setter Property="Margin" Value="8,0,0,0"/>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<Grid Background="{StaticResource ProcessPageBackgroundBrush}" Margin="8">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Grid.Row="0" Header="{DynamicResource LaserCompensationParameters}" Style="{StaticResource ProcessWideCardGroupBoxStyle}">
|
||||
<Grid Margin="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="280"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="280"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="280"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="{DynamicResource AxisName}"/>
|
||||
<ComboBox Grid.Row="0" Grid.Column="1"
|
||||
Style="{StaticResource ProcessLargeComboBoxStyle}"
|
||||
|
||||
ItemsSource="{Binding AxisNames}"
|
||||
SelectedItem="{Binding SelectedAxisName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="2" Content="{DynamicResource LaserCompensationStartPosition}"/>
|
||||
<mw:NumberBox Grid.Row="0" Grid.Column="3"
|
||||
Style="{StaticResource ProcessLargeNumberBoxStyle}"
|
||||
|
||||
Value="{Binding Setting.StartPos, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
DecimalPlaces="4"
|
||||
mw:NumericKeypadAttach.IsEnabled="True"
|
||||
ShowUpDownButton="True"/>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="4" Content="{DynamicResource LaserCompensationStepDistance}"/>
|
||||
<mw:NumberBox Grid.Row="0" Grid.Column="5"
|
||||
Style="{StaticResource ProcessLargeNumberBoxStyle}"
|
||||
|
||||
Value="{Binding Setting.Steps, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
DecimalPlaces="4"
|
||||
mw:NumericKeypadAttach.IsEnabled="True"
|
||||
ShowUpDownButton="True"/>
|
||||
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{DynamicResource LaserCompensationStepCount}"/>
|
||||
<mw:IntNumberBox Grid.Row="1" Grid.Column="1"
|
||||
Style="{StaticResource ProcessLargeIntNumberBoxStyle}"
|
||||
|
||||
Value="{Binding Setting.StepsCount, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
mw:NumericKeypadAttach.IsEnabled="True"
|
||||
ShowUpDownButton="True"/>
|
||||
|
||||
<Label Grid.Row="1" Grid.Column="2" Content="{DynamicResource LaserCompensationJumpPosition}"/>
|
||||
<mw:NumberBox Grid.Row="1" Grid.Column="3"
|
||||
Style="{StaticResource ProcessLargeNumberBoxStyle}"
|
||||
|
||||
Value="{Binding Setting.JumpPos, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
DecimalPlaces="4"
|
||||
mw:NumericKeypadAttach.IsEnabled="True"
|
||||
ShowUpDownButton="True"/>
|
||||
|
||||
<Label Grid.Row="1" Grid.Column="4" Content="{DynamicResource LaserCompensationCycleCount}"/>
|
||||
<mw:IntNumberBox Grid.Row="1" Grid.Column="5"
|
||||
Style="{StaticResource ProcessLargeIntNumberBoxStyle}"
|
||||
|
||||
Value="{Binding Setting.WorkCount, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
mw:NumericKeypadAttach.IsEnabled="True"
|
||||
ShowUpDownButton="True"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{DynamicResource Speed}"/>
|
||||
<mw:NumberBox Grid.Row="2" Grid.Column="1"
|
||||
Style="{StaticResource ProcessLargeNumberBoxStyle}"
|
||||
|
||||
Value="{Binding Setting.Speed, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
DecimalPlaces="4"
|
||||
mw:NumericKeypadAttach.IsEnabled="True"
|
||||
ShowUpDownButton="True"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="2" Content="{DynamicResource LaserCompensationDelaySeconds}"/>
|
||||
<mw:NumberBox Grid.Row="2" Grid.Column="3"
|
||||
Style="{StaticResource ProcessLargeNumberBoxStyle}"
|
||||
|
||||
Value="{Binding Setting.DwellTime, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
DecimalPlaces="3"
|
||||
mw:NumericKeypadAttach.IsEnabled="True"
|
||||
ShowUpDownButton="True"/>
|
||||
|
||||
<Button Grid.Row="2" Grid.Column="5" Content="{DynamicResource Save}" Click="{mw:Action Save}" HorizontalAlignment="Left"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Grid.Row="1" Header="{DynamicResource LaserCompensationExecutionControl}" Style="{StaticResource ProcessWideCardGroupBoxStyle}" Margin="0,12,0,0">
|
||||
<Grid Margin="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Content="{DynamicResource Start}" IsEnabled="{Binding UiEnable}" Click="{mw:Action StartAsync}"/>
|
||||
<Button Grid.Column="1" Content="{DynamicResource Stop}" IsEnabled="{Binding IsRunning}" Click="{mw:Action Stop}"/>
|
||||
|
||||
<TextBlock Grid.Column="2"
|
||||
VerticalAlignment="Center"
|
||||
Text="{DynamicResource LaserCompensationTrajectoryOrder}"
|
||||
Margin="18,0,0,0"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Grid.Row="2" Header="{DynamicResource LaserCompensationExecutionStatus}" Style="{StaticResource ProcessWideCardGroupBoxStyle}" Margin="0,12,0,0">
|
||||
<Grid Margin="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="120"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="120"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="160"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Content="{DynamicResource LaserCompensationCurrentCycle}"/>
|
||||
<TextBlock Grid.Column="1" VerticalAlignment="Center" Text="{Binding CurrentLoopIndex}"/>
|
||||
<Label Grid.Column="2" Content="{DynamicResource LaserCompensationCurrentPoint}"/>
|
||||
<TextBlock Grid.Column="3" VerticalAlignment="Center" Text="{Binding CurrentPointIndex}"/>
|
||||
<Label Grid.Column="4" Content="{DynamicResource LaserCompensationCurrentTarget}"/>
|
||||
<TextBlock Grid.Column="5" VerticalAlignment="Center" Text="{Binding CurrentTargetPosition, StringFormat=F4}"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Grid.Row="3" Header="{DynamicResource Description}" Style="{StaticResource ProcessWideCardGroupBoxStyle}" Margin="0,12,0,0">
|
||||
<StackPanel Margin="4">
|
||||
<TextBlock TextWrapping="Wrap"
|
||||
Text="{DynamicResource LaserCompensationDescriptionPrimary}"/>
|
||||
<TextBlock Margin="0,8,0,0"
|
||||
TextWrapping="Wrap"
|
||||
Text="{DynamicResource LaserCompensationDescriptionSecondary}"/>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,12 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace MainShell.DeviceMaintance.View
|
||||
{
|
||||
public partial class LaserCompensationView : UserControl
|
||||
{
|
||||
public LaserCompensationView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<UserControl x:Class="MainShell.DeviceMaintance.View.NeedleBaseView"
|
||||
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:MainShell.DeviceMaintance.View"
|
||||
xmlns:mw="http://www.maxwell-gp.com/"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox Grid.Row="0" Background="#D7DDE4"
|
||||
Style="{StaticResource NavigationListBoxStyle}"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
ItemsSource="{Binding NavigationItems}"
|
||||
SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate >
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}"
|
||||
FontWeight="Bold"
|
||||
Foreground="#505050"
|
||||
FontSize="14" />
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ContentControl Margin="2" Content="{Binding CameraAxisViewModel}"/>
|
||||
<Border BorderBrush="Gray" BorderThickness="1" Margin="5,2" Grid.Column="1">
|
||||
<ContentControl Margin="2"
|
||||
mw:View.Model="{Binding CurrentScreen}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace MainShell.DeviceMaintance.View
|
||||
{
|
||||
/// <summary>
|
||||
/// NeedleBaseView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class NeedleBaseView : UserControl
|
||||
{
|
||||
public NeedleBaseView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
<UserControl x:Class="MainShell.DeviceMaintance.View.NeedleCaliView"
|
||||
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:MainShell.DeviceMaintance.View"
|
||||
xmlns:mwControls="http://www.maxwell-gp.com/"
|
||||
xmlns:Att="clr-namespace:MainShell.Common.ControlAttribute"
|
||||
xmlns:customControl="clr-namespace:MainShell.Resources.CustomControl"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="850" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<Style TargetType="GroupBox" BasedOn="{StaticResource GroupStepControl}"/>
|
||||
<Style TargetType="Label" BasedOn="{StaticResource {x:Type Label}}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Right"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="Margin" Value="5"/>
|
||||
<Setter Property="Height" Value="35"/>
|
||||
<Setter Property="Width" Value="80"/>
|
||||
</Style>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="Margin" Value="3"/>
|
||||
<Setter Property="Height" Value="35"/>
|
||||
<Setter Property="Width" Value="90"/>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
<Grid mwControls:ParameterAttach.DelayAcceptValue="{Binding ParameterHelper}">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Visible" Margin="5" ClipToBounds="True">
|
||||
<StackPanel>
|
||||
<GroupBox Header="【第一步】对刀仪偏差设置" IsEnabled="{Binding UiEnable}">
|
||||
<StackPanel Margin="5" HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<Label Content="对刀时偏差:" />
|
||||
<mwControls:NumberBox Value="{Binding NeedleZCalibrationItem.KnifeOffset}" mwControls:NumericKeypadAttach.IsEnabled="True" Minimum="-1000" Maximum="1000" HorizontalAlignment="Left" Margin="2" Width="80" Height="35" />
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<GroupBox Header="【第二步】SZ / StagePlatform设置" IsEnabled="{Binding UiEnable}">
|
||||
<customControl:AxisMoveControl LableContent1="SZ(mm):"
|
||||
Value1="{Binding NeedleZCalibrationItem.CZHeight}"
|
||||
LableContent2="StagePlatform高度:"
|
||||
Value2="{Binding NeedleZCalibrationItem.StageHeight}"
|
||||
IsAllShow="{Binding HasStagePlatform}"
|
||||
MoveCommand="{mwControls:Action MoveCzCurrentLocation}"/>
|
||||
</GroupBox>
|
||||
<GroupBox Header="【第三步】龙门2的避让位置" IsEnabled="{Binding UiEnable}">
|
||||
<customControl:AxisMoveControl LableContent1="X2(mm):"
|
||||
Value1="{Binding NeedleZCalibrationItem.Gantry2AvoidPositionX}"
|
||||
LableContent2="Y2(mm):"
|
||||
Value2="{Binding NeedleZCalibrationItem.Gantry2AvoidPositionY}"
|
||||
ReadCommand="{mwControls:Action ReadGantry2CurrentLocation}"
|
||||
MoveCommand="{mwControls:Action MoveGantry2ToCurrentLocation}"/>
|
||||
</GroupBox>
|
||||
<GroupBox Header="【第四步】针尖对准对刀仪位置" IsEnabled="{Binding UiEnable}">
|
||||
<customControl:AxisMoveControl LableContent1="X1(mm):"
|
||||
Value1="{Binding NeedleZCalibrationItem.SupportPinPositionX}"
|
||||
LableContent2="Y1(mm):"
|
||||
Value2="{Binding NeedleZCalibrationItem.SupportPinPositionY}"
|
||||
ReadCommand="{mwControls:Action ReadSupportPinCurrentLocation}"
|
||||
MoveCommand="{mwControls:Action MoveSupportPinToCurrentLocation}"/>
|
||||
</GroupBox>
|
||||
<GroupBox Header="【第五步】Z1设置" IsEnabled="{Binding UiEnable}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<UniformGrid Columns="4" Rows="1">
|
||||
<Label Content="开始位置(mm)" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right" />
|
||||
<mwControls:NumberBox Value="{Binding NeedleZCalibrationItem.Z1StartPosition}" mwControls:NumericKeypadAttach.IsEnabled="True" Minimum="-1000" Maximum="1000" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="2" Width="80" Height="35" />
|
||||
<Label Content="速度(mm/s)" Grid.Row="0" Grid.Column="2" HorizontalAlignment="Right" />
|
||||
<mwControls:NumberBox Value="{Binding NeedleZCalibrationItem.Z1Speed}" mwControls:NumericKeypadAttach.IsEnabled="True" Minimum="-1000" Maximum="1000" Grid.Row="0" Grid.Column="3" HorizontalAlignment="Left" Margin="2" Width="80" Height="35" />
|
||||
</UniformGrid>
|
||||
<UniformGrid Columns="2" Rows="1" Grid.Column="1">
|
||||
<Label Content="下降距离(mm)" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Right" />
|
||||
<mwControls:NumberBox Value="{Binding NeedleZCalibrationItem.Z1DropMaxPosition}" mwControls:NumericKeypadAttach.IsEnabled="True" Minimum="-1000" Maximum="1000" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" Margin="2" Width="80" Height="35" />
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<GroupBox Header="【第六步】刺针触碰到对刀仪" IsEnabled="{Binding UiEnable}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="100"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Visibility="Visible" Content="基准值(mm):" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right" />
|
||||
<mwControls:NumberBox Visibility="Visible" IsReadOnly="True" Value="{Binding NeedleZCalibrationItem.NeedleTouchHeightBase}" mwControls:NumericKeypadAttach.IsEnabled="True" Minimum="-1000" Maximum="1000" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="5" Width="80" Height="35" />
|
||||
|
||||
<Label Content="Z1平均高度(mm):" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Right" />
|
||||
<mwControls:NumberBox IsReadOnly="True" Value="{Binding NeedleZCalibrationItem.NeedleTouchHeightAve}" mwControls:NumericKeypadAttach.IsEnabled="True" Minimum="-1000" Maximum="1000" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" Margin="5" Width="80" Height="35" />
|
||||
|
||||
<Label Content="对刀次数:" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" />
|
||||
<mwControls:NumberBox Value="{Binding NeedleZCalibrationItem.NeedleTouchCount}" mwControls:NumericKeypadAttach.IsEnabled="True" Minimum="1" Maximum="100" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" Margin="5" Width="80" Height="35" />
|
||||
|
||||
<Label Content="当前使用对刀高度(mm):" Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Width="140"/>
|
||||
<mwControls:NumberBox IsEnabled="False" Grid.Row="3" Value="{Binding NeedleZCalibrationItem.CurrentNeedleTouchHeight}" mwControls:NumericKeypadAttach.IsEnabled="True" Minimum="-1000" Maximum="1000" Grid.Column="1" HorizontalAlignment="Left" Margin="5" Width="80" Height="35" />
|
||||
|
||||
<Label Content="对刀与基准偏差(mm):" Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" />
|
||||
<mwControls:NumberBox IsReadOnly="True" Grid.Row="4" Value="{Binding NeedleZCalibrationItem.NeedleTouchOffset}" mwControls:NumericKeypadAttach.IsEnabled="True" Minimum="-1000" Maximum="1000" Grid.Column="1" HorizontalAlignment="Left" Margin="5" Width="80" Height="35" />
|
||||
|
||||
<Grid Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="5">
|
||||
<ListView ItemsSource="{Binding NeedleZCalibrationItem.NeedleTouchRecords}" SelectedItem="{Binding SelectedRecord}">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Header="当前次数" DisplayMemberBinding="{Binding CurrentCount}" Width="100"/>
|
||||
<GridViewColumn Header="Z1高度(mm)" DisplayMemberBinding="{Binding Height}" Width="210"/>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<GroupBox Header="【第七步】对刀控制" IsEnabled="{Binding IsEnabledNeedleCalibrationControl}">
|
||||
<StackPanel>
|
||||
<StackPanel Margin="4" IsEnabled="{Binding UiEnable}" Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<CheckBox Content="自动抬高" Margin="6,0" IsChecked="{Binding AutoRaiseZ1}"/>
|
||||
<Button Visibility="Collapsed" Content="设置当前基准值" Tag="设置当前基准值" Click="{mwControls:Action SetBaseHeight}" Margin="6,0" />
|
||||
<Button Content="Z1对刀" Tag="Z1对刀" Margin="6,0" Click="{mwControls:Action StartSingleZ1CalibrationAsync}"/>
|
||||
<Button Content="使用当前对刀高度" Width="120" Tag="使用当前对刀高度" Click="{mwControls:Action UseCurrentZ1Height}" Margin="6,0" />
|
||||
</StackPanel>
|
||||
<StackPanel Margin="4" Orientation="Horizontal">
|
||||
<Button Content="开始" Tag="开始" Click="{mwControls:Action StartCalibrationAsync}" Margin="6,0" IsEnabled="{Binding UiEnable}"/>
|
||||
<Button Content="停止" Tag="停止" Click="{mwControls:Action StopCalibrationAsync}" Margin="6,0" IsEnabled="{Binding UiEnable, Converter={StaticResource boolToInversionConverter}}"/>
|
||||
<Button Content="保存" Tag="保存" Click="{mwControls:Action SaveCalibration}" Margin="6,0" IsEnabled="{Binding UiEnable}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace MainShell.DeviceMaintance.View
|
||||
{
|
||||
/// <summary>
|
||||
/// NeedleCaliView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class NeedleCaliView : UserControl
|
||||
{
|
||||
public NeedleCaliView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
<UserControl x:Class="MainShell.DeviceMaintance.View.NeedleCameraPrintView"
|
||||
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:MainShell.DeviceMaintance.View"
|
||||
xmlns:mwControls="http://www.maxwell-gp.com/"
|
||||
xmlns:customControl="clr-namespace:MainShell.Resources.CustomControl"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="750" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<Style TargetType="GroupBox" BasedOn="{StaticResource GroupStepControl}"/>
|
||||
<Style TargetType="Label" BasedOn="{StaticResource {x:Type Label}}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Right"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="Margin" Value="5"/>
|
||||
<Setter Property="Height" Value="35"/>
|
||||
<Setter Property="Width" Value="80"/>
|
||||
</Style>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}" >
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="Margin" Value="3"/>
|
||||
<Setter Property="Height" Value="35"/>
|
||||
<Setter Property="Width" Value="90"/>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
<Grid mwControls:ParameterAttach.DelayAcceptValue ="{Binding ParameterHelper}">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<StackPanel>
|
||||
<GroupBox IsEnabled="{Binding UiEnable}" Margin="2" Header="【第一步】基础设置">
|
||||
<GroupBox.Content>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<Button Click="{mwControls:Action MoveToOrginPos}" Content="SXSZ至初始位" Width="100"/>
|
||||
<GroupBox Header="速度设置" Style="{x:Null}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<RadioButton GroupName="speed" Click="{mwControls:Action SpeedChanged}" Tag="10" Margin="5,0" Content="10"/>
|
||||
<RadioButton GroupName="speed" IsChecked="True" Click="{mwControls:Action SpeedChanged}" Tag="50" Margin="5,0" Content="50"/>
|
||||
<RadioButton GroupName="speed" Click="{mwControls:Action SpeedChanged}" Tag="100" Margin="5,0" Content="100"/>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</GroupBox.Content>
|
||||
</GroupBox>
|
||||
<GroupBox IsEnabled="{Binding UiEnable}" Margin="2" Header="【第二步】WS避让位">
|
||||
<GroupBox.Content>
|
||||
<customControl:AxisMoveControl LableContent1="X2(mm):"
|
||||
Value1="{Binding NeedlePrintCalibrateParameter.AvoidancePoint.PointX}"
|
||||
LableContent2="Y2(mm):"
|
||||
Value2="{Binding NeedlePrintCalibrateParameter.AvoidancePoint.PointY}"
|
||||
ReadCommand="{mwControls:Action TeachWSPos}"
|
||||
MoveCommand="{mwControls:Action MoveToWsPos}"/>
|
||||
<!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<Label VerticalAlignment="Center" Content="X2:"/>
|
||||
<mwControls:NumberBox Value="{Binding NeedlePrintCalibrateParameter.AvoidancePoint.PointX}" IsReadOnly="True" Width="80" Margin="4,0" />
|
||||
<Label VerticalAlignment="Center" Content="Y2:"/>
|
||||
<mwControls:NumberBox Value="{Binding NeedlePrintCalibrateParameter.AvoidancePoint.PointY}" IsReadOnly="True" Width="80" Margin="4,0" />
|
||||
<Button Margin="2,0" Click="{mwControls:Action TeachWSPos}" Content="示教"/>
|
||||
<Button Margin="2,0" Click="{mwControls:Action MoveToWsPos}" Content="移动"/>
|
||||
</StackPanel>-->
|
||||
</GroupBox.Content>
|
||||
</GroupBox>
|
||||
<GroupBox IsEnabled="{Binding UiEnable}" Margin="2" Header="【第三步】Z1位置设置">
|
||||
<GroupBox.Content>
|
||||
<customControl:AxisMoveControl LableContent1="Z1(mm):"
|
||||
Value1="{Binding NeedlePrintCalibrateParameter.Z1WorkHeight}"
|
||||
IsAllShow="False"
|
||||
ReadCommand="{mwControls:Action TeachZ1Pos}"
|
||||
MoveCommand="{mwControls:Action MoveToZ1Pos}"/>
|
||||
<!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Label VerticalAlignment="Center" Content="Z1:"/>
|
||||
<mwControls:NumberBox mwControls:NumericKeypadAttach.IsEnabled="True" Value="{Binding NeedlePrintCalibrateParameter.Z1WorkHeight, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="False" Width="80" Margin="4,0" />
|
||||
<Button Margin="2,0" Click="{mwControls:Action TeachZ1Pos}" Content="示教"/>
|
||||
<Button Margin="2,0" Click="{mwControls:Action MoveToZ1Pos}" Content="移动"/>
|
||||
</StackPanel>-->
|
||||
</GroupBox.Content>
|
||||
</GroupBox>
|
||||
<GroupBox IsEnabled="{Binding UiEnable}" Margin="2" Header="【第四步】Z2位置设置">
|
||||
<GroupBox.Content>
|
||||
<customControl:AxisMoveControl LableContent1="Z2(mm):"
|
||||
Value1="{Binding NeedlePrintCalibrateParameter.Z2WorkHeight}"
|
||||
IsAllShow="False"
|
||||
ReadCommand="{mwControls:Action TeachZ2Pos}"
|
||||
MoveCommand="{mwControls:Action MoveToZ2Pos}"/>
|
||||
<!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Label VerticalAlignment="Center" Content="Z2:"/>
|
||||
<mwControls:NumberBox mwControls:NumericKeypadAttach.IsEnabled="True" Value="{Binding NeedlePrintCalibrateParameter.Z2WorkHeight, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="False" Width="80" Margin="4,0" />
|
||||
<Button Margin="2,0" Click="{mwControls:Action TeachZ2Pos}" Content="示教"/>
|
||||
<Button Margin="2,0" Click="{mwControls:Action MoveToZ2Pos}" Content="移动"/>
|
||||
</StackPanel>-->
|
||||
</GroupBox.Content>
|
||||
</GroupBox>
|
||||
<GroupBox IsEnabled="{Binding UiEnable}" Margin="2" Header="【第五步】铜箔区域设置">
|
||||
<GroupBox.Content>
|
||||
<StackPanel>
|
||||
<Label Content="起点设置:"/>
|
||||
<customControl:AxisMoveControl LableContent1="X1(mm):"
|
||||
Value1="{Binding NeedlePrintCalibrateParameter.StartPoint.PointX}"
|
||||
LableContent2="Y1(mm):"
|
||||
Value2="{Binding NeedlePrintCalibrateParameter.StartPoint.PointY}"
|
||||
ReadCommand="{mwControls:Action TeachStartPos}"
|
||||
MoveCommand="{mwControls:Action MoveToStartPos}"
|
||||
IsReadOnly="True"/>
|
||||
<!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<Label VerticalAlignment="Center" Content="X1:"/>
|
||||
<mwControls:NumberBox Value="{Binding NeedlePrintCalibrateParameter.StartPoint.PointX}" IsReadOnly="True" Width="80" Margin="4,0" />
|
||||
<Label VerticalAlignment="Center" Content="Y1:"/>
|
||||
<mwControls:NumberBox Value="{Binding NeedlePrintCalibrateParameter.StartPoint.PointY}" IsReadOnly="True" Width="80" Margin="4,0" />
|
||||
<Button Margin="2,0" Click="{mwControls:Action TeachStartPos}" Content="示教"/>
|
||||
<Button Margin="2,0" Click="{mwControls:Action MoveToStartPos}" Content="移动"/>
|
||||
</StackPanel>-->
|
||||
<Label Content="尾点设置:"/>
|
||||
<customControl:AxisMoveControl LableContent1="X2(mm):"
|
||||
Value1="{Binding NeedlePrintCalibrateParameter.EndPoint.PointX}"
|
||||
LableContent2="Y2(mm):"
|
||||
Value2="{Binding NeedlePrintCalibrateParameter.EndPoint.PointY}"
|
||||
ReadCommand="{mwControls:Action TeachEndPos}"
|
||||
MoveCommand="{mwControls:Action MoveToEndPos}"
|
||||
IsReadOnly="True"/>
|
||||
<!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<Label VerticalAlignment="Center" Content="X1:"/>
|
||||
<mwControls:NumberBox Value="{Binding NeedlePrintCalibrateParameter.EndPoint.PointX}" IsReadOnly="True" Width="80" Margin="4,0" />
|
||||
<Label VerticalAlignment="Center" Content="Y1:"/>
|
||||
<mwControls:NumberBox Value="{Binding NeedlePrintCalibrateParameter.EndPoint.PointY}" IsReadOnly="True" Width="80" Margin="4,0" />
|
||||
<Button Margin="2,0" Click="{mwControls:Action TeachEndPos}" Content="示教"/>
|
||||
<Button Margin="2,0" Click="{mwControls:Action MoveToEndPos}" Content="移动"/>
|
||||
</StackPanel>-->
|
||||
<Label Content="间距设置:"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label VerticalAlignment="Center" Content="Xpitch:"/>
|
||||
<mwControls:NumberBox mwControls:NumericKeypadAttach.IsEnabled="True" Value="{Binding NeedlePrintCalibrateParameter.Xpitch}" IsReadOnly="False" Width="80" Margin="4,0" />
|
||||
<Label VerticalAlignment="Center" Content="Ypitch:"/>
|
||||
<mwControls:NumberBox mwControls:NumericKeypadAttach.IsEnabled="True" Value="{Binding NeedlePrintCalibrateParameter.Ypitch}" IsReadOnly="False" Width="80" Margin="4,0" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</GroupBox.Content>
|
||||
</GroupBox>
|
||||
<GroupBox Margin="2" Header="【第六步】针印检验">
|
||||
<GroupBox.Content>
|
||||
<StackPanel>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button IsEnabled="{Binding UiEnable}" Click="{mwControls:Action StartVerify}" Content="开始校验"/>
|
||||
<Button IsEnabled="{Binding UiEnable,Converter={StaticResource boolToInversionConverter}}" Click="{mwControls:Action StopVerify}" Content="停止校验"/>
|
||||
<Button IsEnabled="{Binding UiEnable}" Click="{mwControls:Action SaveParam}" Content="保存"/>
|
||||
<Button IsEnabled="{Binding UiEnable}" Click="{mwControls:Action ResetRecord}" Content="重置记录"/>
|
||||
</StackPanel>
|
||||
<StackPanel IsEnabled="{Binding UiEnable}" Margin="0,2" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button Click="{mwControls:Action NeedleAlignment}" Content="针尖对准"/>
|
||||
<Button Click="{mwControls:Action CameraAlignment}" Content="相机对准"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
</GroupBox.Content>
|
||||
</GroupBox>
|
||||
<GroupBox IsEnabled="{Binding UiEnable}" Margin="2" Header="【第七步】偏差补偿">
|
||||
<GroupBox.Content>
|
||||
<StackPanel>
|
||||
<Label Content="当前针尖补偿:" Width="90"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label VerticalAlignment="Center" Content="XOffset:"/>
|
||||
<mwControls:NumberBox Value="{Binding CurrentNeedleOffsetPoint.PointX}" IsReadOnly="True" Width="80" Margin="4,0" />
|
||||
<Label VerticalAlignment="Center" Content="YOffsetY:"/>
|
||||
<mwControls:NumberBox Value="{Binding CurrentNeedleOffsetPoint.PointY}" IsReadOnly="True" Width="80" Margin="4,0" />
|
||||
</StackPanel>
|
||||
<Label Content="针尖点位:"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label VerticalAlignment="Center" Content="X1:"/>
|
||||
<mwControls:NumberBox Value="{Binding CurrentNeedlePoint.PointX}" IsReadOnly="True" Width="80" Margin="4,0" />
|
||||
<Label VerticalAlignment="Center" Content="Y1:"/>
|
||||
<mwControls:NumberBox Value="{Binding CurrentNeedlePoint.PointY}" IsReadOnly="True" Width="80" Margin="4,0" />
|
||||
</StackPanel>
|
||||
<Label Content="相机点位:"/>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<Label VerticalAlignment="Center" Content="X1:"/>
|
||||
<mwControls:NumberBox Value="{Binding CameraPoint.PointX}" IsReadOnly="True" Width="80" Margin="4,0" />
|
||||
<Label VerticalAlignment="Center" Content="Y1:"/>
|
||||
<mwControls:NumberBox Value="{Binding CameraPoint.PointY}" IsReadOnly="True" Width="80" Margin="4,0" />
|
||||
<Button Margin="2,0" Click="{mwControls:Action TeachCameraPos}" Content="示教"/>
|
||||
<Button Margin="2,0" Content="补偿偏差" Click="{mwControls:Action CalculateOffset}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
</GroupBox.Content>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace MainShell.DeviceMaintance.View
|
||||
{
|
||||
/// <summary>
|
||||
/// NeedleCameraPrintView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class NeedleCameraPrintView : UserControl
|
||||
{
|
||||
public NeedleCameraPrintView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user