@@ -59,7 +59,7 @@ | |||||
</Setter> | </Setter> | ||||
</Style> | </Style> | ||||
</ResourceDictionary> | </ResourceDictionary> | ||||
</Application.Resources> | </Application.Resources> | ||||
</Application> | </Application> |
@@ -1,16 +1,18 @@ | |||||
<UserControl x:Class="BPASmartClient.JXJFoodBigStation.View.BomOfMaterialView" | |||||
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:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource" | |||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |||||
xmlns:vm="clr-namespace:BPASmartClient.JXJFoodBigStation.ViewModel" | |||||
mc:Ignorable="d" | |||||
d:DesignHeight="1080" d:DesignWidth="1920"> | |||||
<UserControl | |||||
x:Class="BPASmartClient.JXJFoodBigStation.View.BomOfMaterialView" | |||||
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:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource" | |||||
xmlns:vm="clr-namespace:BPASmartClient.JXJFoodBigStation.ViewModel" | |||||
d:DesignHeight="1080" | |||||
d:DesignWidth="1920" | |||||
mc:Ignorable="d"> | |||||
<UserControl.DataContext> | <UserControl.DataContext> | ||||
<vm:BomOfMaterialViewModel /> | <vm:BomOfMaterialViewModel /> | ||||
</UserControl.DataContext> | </UserControl.DataContext> | ||||
<Grid Margin="10"> | <Grid Margin="10"> | ||||
<Grid.RowDefinitions> | <Grid.RowDefinitions> | ||||
<RowDefinition Height="50" /> | <RowDefinition Height="50" /> | ||||
@@ -19,7 +21,10 @@ | |||||
</Grid.RowDefinitions> | </Grid.RowDefinitions> | ||||
<!--#region 表格标题栏设置--> | <!--#region 表格标题栏设置--> | ||||
<Grid> | <Grid> | ||||
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal"> | |||||
<StackPanel | |||||
HorizontalAlignment="Right" | |||||
VerticalAlignment="Center" | |||||
Orientation="Horizontal"> | |||||
<pry:IcoButton | <pry:IcoButton | ||||
Margin="5" | Margin="5" | ||||
Command="{Binding AddMaterial}" | Command="{Binding AddMaterial}" | ||||
@@ -35,32 +40,55 @@ | |||||
Foreground="Aqua" | Foreground="Aqua" | ||||
Style="{StaticResource IcoButtonStyle}" /> | Style="{StaticResource IcoButtonStyle}" /> | ||||
</StackPanel> | </StackPanel> | ||||
</Grid> | </Grid> | ||||
<Grid | <Grid | ||||
Grid.Row="1" | Grid.Row="1" | ||||
Margin="0,10,0,0" | Margin="0,10,0,0" | ||||
Background="#ff0C255F"> | Background="#ff0C255F"> | ||||
<Grid.ColumnDefinitions> | <Grid.ColumnDefinitions> | ||||
<ColumnDefinition Width="1*"/> | |||||
<ColumnDefinition Width="1*"/> | |||||
<ColumnDefinition Width="1*"/> | |||||
<ColumnDefinition Width="1*"/> | |||||
<ColumnDefinition Width="1*" /> | |||||
<ColumnDefinition Width="1*" /> | |||||
<ColumnDefinition Width="1*" /> | |||||
<ColumnDefinition Width="1*" /> | |||||
</Grid.ColumnDefinitions> | </Grid.ColumnDefinitions> | ||||
<Grid Grid.Column="0"> | <Grid Grid.Column="0"> | ||||
<TextBlock Text="序号" FontSize="24" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"/> | |||||
<Border BorderThickness="1,1,1,1" Cursor="SizeWE" /> | |||||
<TextBlock | |||||
HorizontalAlignment="Center" | |||||
VerticalAlignment="Center" | |||||
FontSize="24" | |||||
Foreground="Aqua" | |||||
Text="序号" /> | |||||
<Border BorderThickness="1,1,1,1" Cursor="SizeWE" /> | |||||
</Grid> | </Grid> | ||||
<TextBlock Grid.Column="1" FontSize="24" Text="原料编号" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" /> | |||||
<TextBlock Grid.Column="2" FontSize="24" Text="原料名称" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" /> | |||||
<TextBlock Grid.Column="3" FontSize="24" Text="操作" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" /> | |||||
<TextBlock | |||||
Grid.Column="1" | |||||
HorizontalAlignment="Center" | |||||
VerticalAlignment="Center" | |||||
FontSize="24" | |||||
Foreground="Aqua" | |||||
Text="原料编号" /> | |||||
<TextBlock | |||||
Grid.Column="2" | |||||
HorizontalAlignment="Center" | |||||
VerticalAlignment="Center" | |||||
FontSize="24" | |||||
Foreground="Aqua" | |||||
Text="原料名称" /> | |||||
<TextBlock | |||||
Grid.Column="3" | |||||
HorizontalAlignment="Center" | |||||
VerticalAlignment="Center" | |||||
FontSize="24" | |||||
Foreground="Aqua" | |||||
Text="操作" /> | |||||
</Grid> | </Grid> | ||||
<Grid Grid.Row="2"> | <Grid Grid.Row="2"> | ||||
<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Visible" > | |||||
<ItemsControl ItemsSource="{Binding RawMaterialInfo}" Foreground="Aqua"> | |||||
<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Visible"> | |||||
<ItemsControl Foreground="Aqua" ItemsSource="{Binding RawMaterialInfo}"> | |||||
<ItemsControl.ItemTemplate> | <ItemsControl.ItemTemplate> | ||||
<DataTemplate> | <DataTemplate> | ||||
<Grid Name="gr" > | |||||
<Grid Name="gr"> | |||||
<Grid.ColumnDefinitions> | <Grid.ColumnDefinitions> | ||||
<ColumnDefinition /> | <ColumnDefinition /> | ||||
<ColumnDefinition /> | <ColumnDefinition /> | ||||
@@ -69,28 +97,33 @@ | |||||
</Grid.ColumnDefinitions> | </Grid.ColumnDefinitions> | ||||
<Grid Grid.Column="0" Margin="5"> | <Grid Grid.Column="0" Margin="5"> | ||||
<TextBlock | <TextBlock | ||||
FontSize="16" | |||||
HorizontalAlignment="Center" | HorizontalAlignment="Center" | ||||
VerticalAlignment="Center" | VerticalAlignment="Center" | ||||
Text="{Binding RawMaterialCount}" /> | |||||
FontSize="16" | |||||
Text="{Binding RawMaterialCount}" /> | |||||
</Grid> | </Grid> | ||||
<Grid Grid.Column="1" Margin="5"> | <Grid Grid.Column="1" Margin="5"> | ||||
<TextBox | <TextBox | ||||
FontSize="16" | |||||
HorizontalAlignment="Center" | HorizontalAlignment="Center" | ||||
VerticalAlignment="Center" | |||||
Text="{Binding RawMaterialName}" /> | |||||
VerticalAlignment="Center" | |||||
HorizontalContentAlignment="Center" | |||||
VerticalContentAlignment="Center" | |||||
Width="200" | |||||
FontSize="16" | |||||
Text="{Binding RawMaterialName}" /> | |||||
</Grid> | </Grid> | ||||
<Grid Grid.Column="2"> | <Grid Grid.Column="2"> | ||||
<TextBox | <TextBox | ||||
Width="200" | Width="200" | ||||
FontSize="16" | |||||
HorizontalAlignment="Center" | HorizontalAlignment="Center" | ||||
VerticalAlignment="Center" | |||||
Text="{Binding RawMaterialChineseName}" /> | |||||
VerticalAlignment="Center" | |||||
HorizontalContentAlignment="Center" | |||||
VerticalContentAlignment="Center" | |||||
FontSize="16" | |||||
Text="{Binding RawMaterialChineseName}" /> | |||||
</Grid> | </Grid> | ||||
<Grid Grid.Column="3"> | <Grid Grid.Column="3"> | ||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> | |||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal"> | |||||
<pry:IcoButton | <pry:IcoButton | ||||
Margin="3,4,4,0" | Margin="3,4,4,0" | ||||
HorizontalAlignment="Center" | HorizontalAlignment="Center" | ||||
@@ -107,7 +140,7 @@ | |||||
</StackPanel> | </StackPanel> | ||||
</Grid> | </Grid> | ||||
</Grid> | </Grid> | ||||
<DataTemplate.Triggers> | <DataTemplate.Triggers> | ||||
<Trigger Property="IsMouseOver" Value="true"> | <Trigger Property="IsMouseOver" Value="true"> | ||||
<Setter TargetName="gr" Property="Background" Value="#112AB2E7" /> | <Setter TargetName="gr" Property="Background" Value="#112AB2E7" /> | ||||
@@ -1,14 +1,16 @@ | |||||
<UserControl x:Class="BPASmartClient.JXJFoodBigStation.View.DeviceManageView" | |||||
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:BPASmartClient.JXJFoodBigStation.View" | |||||
xmlns:vm="clr-namespace:BPASmartClient.JXJFoodBigStation.ViewModel" | |||||
mc:Ignorable="d" | |||||
d:DesignHeight="450" d:DesignWidth="800"> | |||||
<UserControl | |||||
x:Class="BPASmartClient.JXJFoodBigStation.View.DeviceManageView" | |||||
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:local="clr-namespace:BPASmartClient.JXJFoodBigStation.View" | |||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |||||
xmlns:vm="clr-namespace:BPASmartClient.JXJFoodBigStation.ViewModel" | |||||
d:DesignHeight="450" | |||||
d:DesignWidth="800" | |||||
mc:Ignorable="d"> | |||||
<UserControl.DataContext> | <UserControl.DataContext> | ||||
<vm:DeviceManageViewModel/> | |||||
<vm:DeviceManageViewModel /> | |||||
</UserControl.DataContext> | </UserControl.DataContext> | ||||
<Grid Margin="-5,0,5,0"> | <Grid Margin="-5,0,5,0"> | ||||
@@ -43,10 +45,10 @@ | |||||
ClipToBounds="True" | ClipToBounds="True" | ||||
CornerRadius="0"> | CornerRadius="0"> | ||||
<Border.Background> | <Border.Background> | ||||
<ImageBrush Stretch="Fill" ImageSource="/BPASmartClient.CustomResource;component/Image/蓝色背景.png" /> | |||||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/蓝色背景.png" Stretch="Fill" /> | |||||
</Border.Background> | </Border.Background> | ||||
<Grid Margin="20 0"> | |||||
<Grid Margin="20,0"> | |||||
<!--<Grid.RowDefinitions> | <!--<Grid.RowDefinitions> | ||||
<RowDefinition /> | <RowDefinition /> | ||||
@@ -16,56 +16,67 @@ | |||||
<vm:HardwareStatusViewModel /> | <vm:HardwareStatusViewModel /> | ||||
</UserControl.DataContext> | </UserControl.DataContext> | ||||
<UserControl.Resources> | <UserControl.Resources> | ||||
<PathGeometry x:Key="move" Figures="M 0,0 L 0,20"/> | |||||
<Storyboard x:Key="Open" > | |||||
<DoubleAnimationUsingPath Duration="0:0:1" PathGeometry="{StaticResource move}" RepeatBehavior="Forever" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(Y)" Source="Y"></DoubleAnimationUsingPath> | |||||
<PathGeometry x:Key="move" Figures="M 0,0 L 0,20" /> | |||||
<Storyboard x:Key="Open"> | |||||
<DoubleAnimationUsingPath | |||||
PathGeometry="{StaticResource move}" | |||||
RepeatBehavior="Forever" | |||||
Source="Y" | |||||
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(Y)" | |||||
Duration="0:0:1" /> | |||||
</Storyboard> | </Storyboard> | ||||
<SolidColorBrush x:Key="ListBox.Static.Background" Color="#FFFFFFFF"/> | |||||
<SolidColorBrush x:Key="ListBox.Static.Border" Color="#FFABADB3"/> | |||||
<SolidColorBrush x:Key="ListBox.Disabled.Background" Color="#FFFFFFFF"/> | |||||
<SolidColorBrush x:Key="ListBox.Disabled.Border" Color="#FFD9D9D9"/> | |||||
<SolidColorBrush x:Key="ListBox.Static.Background" Color="#FFFFFFFF" /> | |||||
<SolidColorBrush x:Key="ListBox.Static.Border" Color="#FFABADB3" /> | |||||
<SolidColorBrush x:Key="ListBox.Disabled.Background" Color="#FFFFFFFF" /> | |||||
<SolidColorBrush x:Key="ListBox.Disabled.Border" Color="#FFD9D9D9" /> | |||||
<Style x:Key="ListViewStyle1" TargetType="{x:Type ListView}"> | <Style x:Key="ListViewStyle1" TargetType="{x:Type ListView}"> | ||||
<Setter Property="Background" Value="{StaticResource ListBox.Static.Background}"/> | |||||
<Setter Property="BorderBrush" Value="{StaticResource ListBox.Static.Border}"/> | |||||
<Setter Property="BorderThickness" Value="1"/> | |||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/> | |||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/> | |||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/> | |||||
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/> | |||||
<Setter Property="ScrollViewer.PanningMode" Value="Both"/> | |||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/> | |||||
<Setter Property="VerticalContentAlignment" Value="Center"/> | |||||
<Setter Property="Background" Value="{StaticResource ListBox.Static.Background}" /> | |||||
<Setter Property="BorderBrush" Value="{StaticResource ListBox.Static.Border}" /> | |||||
<Setter Property="BorderThickness" Value="1" /> | |||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" /> | |||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" /> | |||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" /> | |||||
<Setter Property="ScrollViewer.CanContentScroll" Value="true" /> | |||||
<Setter Property="ScrollViewer.PanningMode" Value="Both" /> | |||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False" /> | |||||
<Setter Property="VerticalContentAlignment" Value="Center" /> | |||||
<Setter Property="Template"> | <Setter Property="Template"> | ||||
<Setter.Value> | <Setter.Value> | ||||
<ControlTemplate TargetType="{x:Type ListView}"> | <ControlTemplate TargetType="{x:Type ListView}"> | ||||
<Border x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="1" SnapsToDevicePixels="true"> | |||||
<ScrollViewer Focusable="false" Padding="{TemplateBinding Padding}"> | |||||
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> | |||||
<Border | |||||
x:Name="Bd" | |||||
Padding="1" | |||||
Background="{TemplateBinding Background}" | |||||
BorderBrush="{TemplateBinding BorderBrush}" | |||||
BorderThickness="{TemplateBinding BorderThickness}" | |||||
SnapsToDevicePixels="true"> | |||||
<ScrollViewer Padding="{TemplateBinding Padding}" Focusable="false"> | |||||
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> | |||||
</ScrollViewer> | </ScrollViewer> | ||||
</Border> | </Border> | ||||
<ControlTemplate.Triggers> | <ControlTemplate.Triggers> | ||||
<Trigger Property="IsEnabled" Value="false"> | <Trigger Property="IsEnabled" Value="false"> | ||||
<Setter Property="Background" TargetName="Bd" Value="{StaticResource ListBox.Disabled.Background}"/> | |||||
<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource ListBox.Disabled.Border}"/> | |||||
<Setter TargetName="Bd" Property="Background" Value="{StaticResource ListBox.Disabled.Background}" /> | |||||
<Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource ListBox.Disabled.Border}" /> | |||||
</Trigger> | </Trigger> | ||||
<MultiTrigger> | <MultiTrigger> | ||||
<MultiTrigger.Conditions> | <MultiTrigger.Conditions> | ||||
<Condition Property="IsGrouping" Value="true"/> | |||||
<Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/> | |||||
<Condition Property="IsGrouping" Value="true" /> | |||||
<Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" /> | |||||
</MultiTrigger.Conditions> | </MultiTrigger.Conditions> | ||||
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/> | |||||
<Setter Property="ScrollViewer.CanContentScroll" Value="false" /> | |||||
</MultiTrigger> | </MultiTrigger> | ||||
</ControlTemplate.Triggers> | </ControlTemplate.Triggers> | ||||
</ControlTemplate> | </ControlTemplate> | ||||
</Setter.Value> | </Setter.Value> | ||||
</Setter> | </Setter> | ||||
</Style> | </Style> | ||||
</UserControl.Resources> | </UserControl.Resources> | ||||
<!--<UserControl.Triggers> | <!--<UserControl.Triggers> | ||||
<EventTrigger RoutedEvent="Loaded"> | <EventTrigger RoutedEvent="Loaded"> | ||||
<BeginStoryboard Storyboard="{StaticResource Open}"></BeginStoryboard> | <BeginStoryboard Storyboard="{StaticResource Open}"></BeginStoryboard> | ||||
</EventTrigger> | </EventTrigger> | ||||
</UserControl.Triggers>--> | </UserControl.Triggers>--> | ||||
<!--<Grid> | <!--<Grid> | ||||
@@ -360,14 +371,15 @@ | |||||
<!--#region 顶部料仓--> | <!--#region 顶部料仓--> | ||||
<Grid Name="TopGrid"> | <Grid Name="TopGrid"> | ||||
<ListView Style="{DynamicResource ListViewStyle1}" | |||||
<ListView | |||||
x:Name="FListView" | x:Name="FListView" | ||||
Height="{Binding ElementName=TopGrid, Path=ActualHeight}" | Height="{Binding ElementName=TopGrid, Path=ActualHeight}" | ||||
VerticalAlignment="Center" | VerticalAlignment="Center" | ||||
Background="Transparent" | Background="Transparent" | ||||
BorderThickness="0" | BorderThickness="0" | ||||
ItemsSource="{Binding TopDeviceCurrentStatuses}" | ItemsSource="{Binding TopDeviceCurrentStatuses}" | ||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"> | |||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled" | |||||
Style="{DynamicResource ListViewStyle1}"> | |||||
<ListView.ItemsPanel> | <ListView.ItemsPanel> | ||||
<ItemsPanelTemplate> | <ItemsPanelTemplate> | ||||
<!--<WrapPanel Orientation="Horizontal" IsItemsHost="True"/>--> | <!--<WrapPanel Orientation="Horizontal" IsItemsHost="True"/>--> | ||||
@@ -395,7 +407,7 @@ | |||||
VerticalAlignment="Bottom" | VerticalAlignment="Bottom" | ||||
FontSize="25" | FontSize="25" | ||||
Text="{Binding DeviceName}"> | Text="{Binding DeviceName}"> | ||||
</TextBox>--> | </TextBox>--> | ||||
<TextBlock | <TextBlock | ||||
Margin="0,0,0,35" | Margin="0,0,0,35" | ||||
@@ -403,28 +415,31 @@ | |||||
VerticalAlignment="Bottom" | VerticalAlignment="Bottom" | ||||
FontSize="25" | FontSize="25" | ||||
Foreground="#ffccd61f" | Foreground="#ffccd61f" | ||||
Text="{Binding DeviceName}" | |||||
/> | |||||
Text="{Binding DeviceName}" /> | |||||
<StackPanel | <StackPanel | ||||
Grid.RowSpan="2" | Grid.RowSpan="2" | ||||
Panel.ZIndex="1" | |||||
Margin="55,100,0,0" | Margin="55,100,0,0" | ||||
HorizontalAlignment="Center"> | |||||
HorizontalAlignment="Center" | |||||
Panel.ZIndex="1"> | |||||
<Path x:Name="path" Tag="{Binding DeviceName}" Visibility="Hidden" Data="M -15,8 L 17,17 C 17,17 19,18 17,19 L 17,19 L -15,28 C -15,28 -17,28.2 -16,26 L -16,26 L -5,18 L -16,10 C -16,10 -17,8.5 -15,8 Z"> | |||||
<Path | |||||
x:Name="path" | |||||
Data="M -15,8 L 17,17 C 17,17 19,18 17,19 L 17,19 L -15,28 C -15,28 -17,28.2 -16,26 L -16,26 L -5,18 L -16,10 C -16,10 -17,8.5 -15,8 Z" | |||||
Tag="{Binding DeviceName}" | |||||
Visibility="Hidden"> | |||||
<Path.RenderTransform> | <Path.RenderTransform> | ||||
<TransformGroup> | <TransformGroup> | ||||
<RotateTransform Angle="90"/> | |||||
<TranslateTransform Y="0"/> | |||||
<RotateTransform Angle="90" /> | |||||
<TranslateTransform Y="0" /> | |||||
</TransformGroup> | </TransformGroup> | ||||
</Path.RenderTransform> | </Path.RenderTransform> | ||||
<Path.Fill> | <Path.Fill> | ||||
<LinearGradientBrush> | <LinearGradientBrush> | ||||
<LinearGradientBrush.RelativeTransform> | <LinearGradientBrush.RelativeTransform> | ||||
<RotateTransform Angle="-15"/> | |||||
<RotateTransform Angle="-15" /> | |||||
</LinearGradientBrush.RelativeTransform> | </LinearGradientBrush.RelativeTransform> | ||||
<GradientStop Color="LightGreen" Offset="0"/> | |||||
<GradientStop Color="LightSeaGreen" Offset="0.6"/> | |||||
<GradientStop Offset="0" Color="LightGreen" /> | |||||
<GradientStop Offset="0.6" Color="LightSeaGreen" /> | |||||
</LinearGradientBrush> | </LinearGradientBrush> | ||||
</Path.Fill> | </Path.Fill> | ||||
</Path> | </Path> | ||||
@@ -446,9 +461,9 @@ | |||||
FontSize="20" | FontSize="20" | ||||
Foreground="#FF0084FF" | Foreground="#FF0084FF" | ||||
Text=" kg" /> | Text=" kg" /> | ||||
</StackPanel> | </StackPanel> | ||||
<StackPanel | <StackPanel | ||||
Grid.Row="1" | Grid.Row="1" | ||||
@@ -484,7 +499,7 @@ | |||||
<!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="2"> | <!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="2"> | ||||
<pry:IcoButton | <pry:IcoButton | ||||
Width="80" | Width="80" | ||||
Height="{Binding ElementName=gr, Path=ActualHeight}" | Height="{Binding ElementName=gr, Path=ActualHeight}" | ||||
Margin="5,0,10,0" | Margin="5,0,10,0" | ||||
@@ -495,7 +510,7 @@ | |||||
Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}" | Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}" | ||||
CommandParameter="{Binding DeviceName}" | CommandParameter="{Binding DeviceName}" | ||||
Tag="{Binding DeviceName}" | Tag="{Binding DeviceName}" | ||||
Content="启动" | Content="启动" | ||||
EnterBackground="#222AB2E7" | EnterBackground="#222AB2E7" | ||||
Foreground="#FF2AB2E7" | Foreground="#FF2AB2E7" | ||||
@@ -503,7 +518,7 @@ | |||||
Style="{StaticResource IcoButtonStyle}" | Style="{StaticResource IcoButtonStyle}" | ||||
/> | /> | ||||
<pry:IcoButton | <pry:IcoButton | ||||
Width="80" | Width="80" | ||||
Height="{Binding ElementName=gr, Path=ActualHeight}" | Height="{Binding ElementName=gr, Path=ActualHeight}" | ||||
HorizontalAlignment="Center" | HorizontalAlignment="Center" | ||||
@@ -513,7 +528,7 @@ | |||||
Command="{Binding DataContext.StopCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}" | Command="{Binding DataContext.StopCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}" | ||||
CommandParameter="{Binding DeviceName}" | CommandParameter="{Binding DeviceName}" | ||||
Tag="{Binding DeviceName}" | Tag="{Binding DeviceName}" | ||||
Content="停止" | Content="停止" | ||||
EnterBackground="#22F53F62" | EnterBackground="#22F53F62" | ||||
Foreground="#FFF53F62" | Foreground="#FFF53F62" | ||||
@@ -529,7 +544,10 @@ | |||||
</Grid> | </Grid> | ||||
<!--#endregion--> | <!--#endregion--> | ||||
<Grid x:Name="gr" Grid.Row="1" Margin="0,50,0,0"> | |||||
<Grid | |||||
x:Name="gr" | |||||
Grid.Row="1" | |||||
Margin="0,50,0,0"> | |||||
<pry:ConveyorBelt | <pry:ConveyorBelt | ||||
Grid.Row="1" | Grid.Row="1" | ||||
Width="{Binding ElementName=gr, Path=ActualWidth}" | Width="{Binding ElementName=gr, Path=ActualWidth}" | ||||
@@ -540,19 +558,19 @@ | |||||
StrokeBrush="#00BEFA" | StrokeBrush="#00BEFA" | ||||
StrokeDashArray="1.5 1.5" | StrokeDashArray="1.5 1.5" | ||||
StrokeFillBrush="#00BEFA" | StrokeFillBrush="#00BEFA" | ||||
StrokeThickness="2" /> | |||||
StrokeThickness="2" /> | |||||
</Grid> | </Grid> | ||||
<!--#region 底部料仓--> | <!--#region 底部料仓--> | ||||
<Grid Grid.Row="2"> | <Grid Grid.Row="2"> | ||||
<ListView | <ListView | ||||
Style="{DynamicResource ListViewStyle1}" | |||||
x:Name="buttonListView" | x:Name="buttonListView" | ||||
VerticalAlignment="Top" | VerticalAlignment="Top" | ||||
Background="Transparent" | Background="Transparent" | ||||
BorderThickness="0" | BorderThickness="0" | ||||
ItemsSource="{Binding BottomDeviceCurrentStatuses}" | ItemsSource="{Binding BottomDeviceCurrentStatuses}" | ||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"> | |||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled" | |||||
Style="{DynamicResource ListViewStyle1}"> | |||||
<ListView.ItemsPanel> | <ListView.ItemsPanel> | ||||
<ItemsPanelTemplate> | <ItemsPanelTemplate> | ||||
<UniformGrid | <UniformGrid | ||||
@@ -568,8 +586,8 @@ | |||||
<Border Margin="5" Background="Transparent"> | <Border Margin="5" Background="Transparent"> | ||||
<Grid Height="220"> | <Grid Height="220"> | ||||
<Grid.RowDefinitions> | <Grid.RowDefinitions> | ||||
<RowDefinition/> | |||||
<RowDefinition/> | |||||
<RowDefinition /> | |||||
<RowDefinition /> | |||||
<!--<RowDefinition Height="0.1*"/>--> | <!--<RowDefinition Height="0.1*"/>--> | ||||
</Grid.RowDefinitions> | </Grid.RowDefinitions> | ||||
@@ -582,24 +600,28 @@ | |||||
Text="{Binding DeviceName}" /> | Text="{Binding DeviceName}" /> | ||||
<StackPanel | <StackPanel | ||||
Grid.RowSpan="2" | Grid.RowSpan="2" | ||||
Panel.ZIndex="1" | |||||
Margin="55,100,0,0" | Margin="55,100,0,0" | ||||
HorizontalAlignment="Center"> | |||||
HorizontalAlignment="Center" | |||||
Panel.ZIndex="1"> | |||||
<Path x:Name="path1" Tag="{Binding DeviceName}" Visibility="Collapsed" Data="M -15,8 L 17,17 C 17,17 19,18 17,19 L 17,19 L -15,28 C -15,28 -17,28.2 -16,26 L -16,26 L -5,18 L -16,10 C -16,10 -17,8.5 -15,8 Z"> | |||||
<Path | |||||
x:Name="path1" | |||||
Data="M -15,8 L 17,17 C 17,17 19,18 17,19 L 17,19 L -15,28 C -15,28 -17,28.2 -16,26 L -16,26 L -5,18 L -16,10 C -16,10 -17,8.5 -15,8 Z" | |||||
Tag="{Binding DeviceName}" | |||||
Visibility="Collapsed"> | |||||
<Path.RenderTransform> | <Path.RenderTransform> | ||||
<TransformGroup> | <TransformGroup> | ||||
<RotateTransform Angle="90"/> | |||||
<TranslateTransform Y="0"/> | |||||
<RotateTransform Angle="90" /> | |||||
<TranslateTransform Y="0" /> | |||||
</TransformGroup> | </TransformGroup> | ||||
</Path.RenderTransform> | </Path.RenderTransform> | ||||
<Path.Fill> | <Path.Fill> | ||||
<LinearGradientBrush> | <LinearGradientBrush> | ||||
<LinearGradientBrush.RelativeTransform> | <LinearGradientBrush.RelativeTransform> | ||||
<RotateTransform Angle="-15"/> | |||||
<RotateTransform Angle="-15" /> | |||||
</LinearGradientBrush.RelativeTransform> | </LinearGradientBrush.RelativeTransform> | ||||
<GradientStop Color="LightGreen" Offset="0"/> | |||||
<GradientStop Color="LightSeaGreen" Offset="0.5"/> | |||||
<GradientStop Offset="0" Color="LightGreen" /> | |||||
<GradientStop Offset="0.5" Color="LightSeaGreen" /> | |||||
</LinearGradientBrush> | </LinearGradientBrush> | ||||
</Path.Fill> | </Path.Fill> | ||||
</Path> | </Path> | ||||
@@ -651,7 +673,7 @@ | |||||
Stretch="Fill" /> | Stretch="Fill" /> | ||||
<!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="2"> | <!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="2"> | ||||
<pry:IcoButton | <pry:IcoButton | ||||
Width="80" | Width="80" | ||||
Height="{Binding ElementName=gr, Path=ActualHeight}" | Height="{Binding ElementName=gr, Path=ActualHeight}" | ||||
Margin="5,0,10,0" | Margin="5,0,10,0" | ||||
@@ -662,7 +684,7 @@ | |||||
Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}" | Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}" | ||||
CommandParameter="{Binding DeviceName}" | CommandParameter="{Binding DeviceName}" | ||||
Tag="{Binding DeviceName}" | Tag="{Binding DeviceName}" | ||||
Content="启动" | Content="启动" | ||||
EnterBackground="#222AB2E7" | EnterBackground="#222AB2E7" | ||||
Foreground="#FF2AB2E7" | Foreground="#FF2AB2E7" | ||||
@@ -670,7 +692,7 @@ | |||||
Style="{StaticResource IcoButtonStyle}" | Style="{StaticResource IcoButtonStyle}" | ||||
/> | /> | ||||
<pry:IcoButton | <pry:IcoButton | ||||
Width="80" | Width="80" | ||||
Height="{Binding ElementName=gr, Path=ActualHeight}" | Height="{Binding ElementName=gr, Path=ActualHeight}" | ||||
HorizontalAlignment="Center" | HorizontalAlignment="Center" | ||||
@@ -680,7 +702,7 @@ | |||||
Command="{Binding DataContext.StopCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}" | Command="{Binding DataContext.StopCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}" | ||||
CommandParameter="{Binding DeviceName}" | CommandParameter="{Binding DeviceName}" | ||||
Tag="{Binding DeviceName}" | Tag="{Binding DeviceName}" | ||||
Content="停止" | Content="停止" | ||||
EnterBackground="#22F53F62" | EnterBackground="#22F53F62" | ||||
Foreground="#FFF53F62" | Foreground="#FFF53F62" | ||||
@@ -40,6 +40,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel | |||||
{ | { | ||||
RawMaterialCount = Json<BomMaterial>.Data.RawMaterials.Count +1 , | RawMaterialCount = Json<BomMaterial>.Data.RawMaterials.Count +1 , | ||||
}); | }); | ||||
MessageNotify.GetInstance.ShowUserLog("新增一条物料数据。"); | |||||
}); | }); | ||||
SaveMaterials = new RelayCommand(() => | SaveMaterials = new RelayCommand(() => | ||||
{ | { | ||||
@@ -61,6 +62,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel | |||||
{ | { | ||||
RawMaterialInfo.Remove(res); | RawMaterialInfo.Remove(res); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"删除成功"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"删除成功"); | ||||
MessageNotify.GetInstance.ShowUserLog($"删除一条物料数据,物料为:【{res.RawMaterialName}】:{res.RawMaterialChineseName}。"); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -1,4 +1,5 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPASmartClient.CustomResource.Pages.Model; | |||||
using BPASmartClient.Helper; | |||||
using Microsoft.Toolkit.Mvvm.ComponentModel; | using Microsoft.Toolkit.Mvvm.ComponentModel; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
using System; | using System; | ||||
@@ -41,6 +42,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel | |||||
return; | return; | ||||
} | } | ||||
ActionManage.GetInstance.Send("UpdateDeviceName", DeviceName); | ActionManage.GetInstance.Send("UpdateDeviceName", DeviceName); | ||||
MessageNotify.GetInstance.ShowUserLog($"修改了设备名称为【{DeviceName}】。"); | |||||
ActionManage.GetInstance.Send("ChangeDeviceNameViewClose"); | ActionManage.GetInstance.Send("ChangeDeviceNameViewClose"); | ||||
}); | }); | ||||
} | } | ||||
@@ -30,6 +30,8 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel | |||||
{ | { | ||||
byte loc = Convert.ToByte(o); | byte loc = Convert.ToByte(o); | ||||
GVL_BigStation.AGVPutTray = GVL_BigStation.AGVPutTray.SetBitValue(loc, true); | GVL_BigStation.AGVPutTray = GVL_BigStation.AGVPutTray.SetBitValue(loc, true); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"操作成功"); | |||||
MessageNotify.GetInstance.ShowUserLog($"手动点击AGV到达工位{loc}。"); | |||||
} | } | ||||
}); | }); | ||||
TrayLeave = new RelayCommand<object>((o) => | TrayLeave = new RelayCommand<object>((o) => | ||||
@@ -38,11 +40,15 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel | |||||
{ | { | ||||
byte loc = Convert.ToByte(o); | byte loc = Convert.ToByte(o); | ||||
GVL_BigStation.AGVPutTray = GVL_BigStation.AGVPutTray.SetBitValue(loc, false); | GVL_BigStation.AGVPutTray = GVL_BigStation.AGVPutTray.SetBitValue(loc, false); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"操作成功"); | |||||
MessageNotify.GetInstance.ShowUserLog($"手动点击AGV离开工位{loc}。"); | |||||
} | } | ||||
}); | }); | ||||
ClearTrayInPlace = new RelayCommand(() => | ClearTrayInPlace = new RelayCommand(() => | ||||
{ | { | ||||
GVL_BigStation.AGVPutTray = 0; | GVL_BigStation.AGVPutTray = 0; | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"操作成功"); | |||||
MessageNotify.GetInstance.ShowUserLog($"手动点击清除AGV到位信号按钮。"); | |||||
}); | }); | ||||
ClearAllRecipe = new RelayCommand(() => | ClearAllRecipe = new RelayCommand(() => | ||||
{ | { | ||||
@@ -52,7 +58,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel | |||||
} | } | ||||
Json<RemoteRecipe>.Data.Recipes.Clear(); | Json<RemoteRecipe>.Data.Recipes.Clear(); | ||||
GVL_BigStation.SiemensSendRecipeStatus = 0; | GVL_BigStation.SiemensSendRecipeStatus = 0; | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"清楚所有配方完成"); | |||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"清除所有配方完成"); | |||||
MessageNotify.GetInstance.ShowUserLog($"手动清除所有西门子配方。"); | MessageNotify.GetInstance.ShowUserLog($"手动清除所有西门子配方。"); | ||||
}); | }); | ||||
CancelRecipeCommand = new RelayCommand(() => | CancelRecipeCommand = new RelayCommand(() => | ||||
@@ -75,13 +75,17 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel | |||||
{ | { | ||||
if (IsWashingBarrel) | if (IsWashingBarrel) | ||||
{ | { | ||||
Json<LocalRecipe>.Data.Recipes.Add(new RecipeData { RecipeCode = recipeCode,RecipeName = RecipeName, TrayCode = TrayCode, IsWashingBarrel = IsWashingBarrel, OrderType="洗桶",RecipeCategory=RecipeCategory}); | |||||
var newRecipeData = new RecipeData { RecipeCode = recipeCode, RecipeName = RecipeName, TrayCode = TrayCode, IsWashingBarrel = IsWashingBarrel, OrderType = "洗桶", RecipeCategory = RecipeCategory }; | |||||
Json<LocalRecipe>.Data.Recipes.Add(newRecipeData); | |||||
Json<LocalRecipe>.Data.SelectedRecipes.Add(newRecipeData); | |||||
if (RawMaterialsInfo.Count > 0) | if (RawMaterialsInfo.Count > 0) | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Info, App.MainWindow, "提示", $"订单类型为洗桶,不保存原料信息"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Info, App.MainWindow, "提示", $"订单类型为洗桶,不保存原料信息"); | ||||
} | } | ||||
else | else | ||||
{ | { | ||||
Json<LocalRecipe>.Data.Recipes.Add(new RecipeData { RecipeCode = recipeCode, RawMaterial = RawMaterialsInfo, RecipeName = RecipeName, TrayCode = TrayCode, IsWashingBarrel = IsWashingBarrel, OrderType = "配料", RecipeCategory = RecipeCategory }); | |||||
var newRecipeData = new RecipeData { RecipeCode = recipeCode, RawMaterial = RawMaterialsInfo, RecipeName = RecipeName, TrayCode = TrayCode, IsWashingBarrel = IsWashingBarrel, OrderType = "配料", RecipeCategory = RecipeCategory }; | |||||
Json<LocalRecipe>.Data.Recipes.Add(newRecipeData); | |||||
Json<LocalRecipe>.Data.SelectedRecipes.Add(newRecipeData) ; | |||||
} | } | ||||
Json<LocalRecipe>.Save(); | Json<LocalRecipe>.Save(); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"配方保存完成"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"配方保存完成"); | ||||
@@ -38,7 +38,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel | |||||
var res = Json<LocalRecipe>.Data.Recipes.FirstOrDefault(p => p.RecipeCode == num); | var res = Json<LocalRecipe>.Data.Recipes.FirstOrDefault(p => p.RecipeCode == num); | ||||
ActionManage.GetInstance.Send("RecipeInfo", res); | ActionManage.GetInstance.Send("RecipeInfo", res); | ||||
nrv.Show(); | nrv.Show(); | ||||
MessageNotify.GetInstance.ShowUserLog($"查看配方——{res.RecipeName}"); | |||||
MessageNotify.GetInstance.ShowUserLog($"编辑配方,配方名称:【{res.RecipeName}】"); | |||||
} | } | ||||
}); | }); | ||||
NewRecipe = new RelayCommand(() => | NewRecipe = new RelayCommand(() => | ||||
@@ -114,7 +114,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel | |||||
Json<LocalRecipe>.Data.Recipes.Clear(); | Json<LocalRecipe>.Data.Recipes.Clear(); | ||||
Json<LocalRecipe>.Save(); | Json<LocalRecipe>.Save(); | ||||
Json<LocalRecipe>.Data.SelectedRecipes.Clear(); | |||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"本地配方已全部删除!"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"本地配方已全部删除!"); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动清除所有配方。"); | MessageNotify.GetInstance.ShowUserLog($"手动清除所有配方。"); | ||||
}); | }); | ||||
@@ -131,7 +131,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel | |||||
Recipes.Remove(res); | Recipes.Remove(res); | ||||
Json<LocalRecipe>.Save(); | Json<LocalRecipe>.Save(); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"配方删除完成"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"配方删除完成"); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动删除【{res.RecipeName}】配方:【{recipeCode}】,"); | |||||
MessageNotify.GetInstance.ShowUserLog($"手动删除【{res.RecipeName}】配方,编号:【{recipeCode}】,"); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -66,7 +66,8 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel | |||||
{ | { | ||||
res.RecipesSource = RecipeSource.本地; | res.RecipesSource = RecipeSource.本地; | ||||
Json<RemoteRecipe>.Data.Recipes.Add(res); | Json<RemoteRecipe>.Data.Recipes.Add(res); | ||||
MessageNotify.GetInstance.ShowRunLog($"手动下发配方:{recipeName}完成"); | |||||
MessageNotify.GetInstance.ShowRunLog($"接收手动下发配方:【{recipeName}】"); | |||||
MessageNotify.GetInstance.ShowUserLog($"手动下发配方:【{recipeName}】完成"); | |||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"配方下发完成"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"配方下发完成"); | ||||
} | } | ||||
else | else | ||||
@@ -97,7 +97,9 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel | |||||
/// </summary> | /// </summary> | ||||
public RelayCommand ConfirmCommand { get; set; } | public RelayCommand ConfirmCommand { get; set; } | ||||
/// <summary> | |||||
/// 一个配方数据的包装类。 | |||||
/// </summary> | |||||
internal class RecipeDataWithCheck:ObservableObject | internal class RecipeDataWithCheck:ObservableObject | ||||
{ | { | ||||
public RecipeData Recipe { get; set; } | public RecipeData Recipe { get; set; } | ||||
@@ -1116,7 +1116,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model | |||||
string address = "DB5.DBX" + (index / 8) + "." + (index % 8 - 1); | string address = "DB5.DBX" + (index / 8) + "." + (index % 8 - 1); | ||||
if (index == 8) address = "DB5.DBX0.7"; | if (index == 8) address = "DB5.DBX0.7"; | ||||
HKDevice.HK_PLC_S7.Write<bool>(address, true); | HKDevice.HK_PLC_S7.Write<bool>(address, true); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:{address},值:true"); | |||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:{address},值:true。"); | |||||
} | } | ||||
} | } | ||||
else if (o.ToString().Contains("阻挡气缸")) | else if (o.ToString().Contains("阻挡气缸")) | ||||
@@ -1141,43 +1141,48 @@ namespace BPASmartClient.JXJFoodSmallStation.Model | |||||
if (index == 14) address = "DB5.DBX3.4"; | if (index == 14) address = "DB5.DBX3.4"; | ||||
if (index == 15) address = "DB5.DBX3.5"; | if (index == 15) address = "DB5.DBX3.5"; | ||||
HKDevice.HK_PLC_S7.Write<bool>(address, true); | HKDevice.HK_PLC_S7.Write<bool>(address, true); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:{address},值:true。"); | |||||
} | } | ||||
} | } | ||||
else if (o.ToString().Contains("进料桶顶升气缸")) | else if (o.ToString().Contains("进料桶顶升气缸")) | ||||
{ | { | ||||
HKDevice.HK_PLC_S7.Write("DB5.DBX3.6", false);//默认顶升 | HKDevice.HK_PLC_S7.Write("DB5.DBX3.6", false);//默认顶升 | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX3.6,值:false"); | |||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX3.6,值:false。"); | |||||
} | } | ||||
else if (o.ToString().Contains("出料桶顶升气缸1")) | else if (o.ToString().Contains("出料桶顶升气缸1")) | ||||
{ | { | ||||
HKDevice.HK_PLC_S7.Write("DB5.DBX3.7", true); | HKDevice.HK_PLC_S7.Write("DB5.DBX3.7", true); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX3.7,值:true"); | |||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX3.7,值:true。"); | |||||
} | } | ||||
else if (o.ToString().Contains("出料桶顶升气缸2")) | else if (o.ToString().Contains("出料桶顶升气缸2")) | ||||
{ | { | ||||
HKDevice.HK_PLC_S7.Write("DB5.DBX4.0", true); | HKDevice.HK_PLC_S7.Write("DB5.DBX4.0", true); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX4.0,值:true"); | |||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX4.0,值:true。"); | |||||
} | } | ||||
else if (o.ToString().Contains("出料桶顶升气缸3")) | else if (o.ToString().Contains("出料桶顶升气缸3")) | ||||
{ | { | ||||
HKDevice.HK_PLC_S7.Write("DB5.DBX4.1", true); | HKDevice.HK_PLC_S7.Write("DB5.DBX4.1", true); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX4.1,值:true"); | |||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX4.1,值:true。"); | |||||
} | } | ||||
else if (o.ToString().Contains("托盘气缸1_1")) | else if (o.ToString().Contains("托盘气缸1_1")) | ||||
{ | { | ||||
HKDevice.HK_PLC_S7.Write("DB5.DBX4.2", false);//默认伸出 | HKDevice.HK_PLC_S7.Write("DB5.DBX4.2", false);//默认伸出 | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX4.2,值:false。"); | |||||
} | } | ||||
else if (o.ToString().Contains("托盘气缸1_2")) | else if (o.ToString().Contains("托盘气缸1_2")) | ||||
{ | { | ||||
HKDevice.HK_PLC_S7.Write("DB5.DBX4.3", false); | HKDevice.HK_PLC_S7.Write("DB5.DBX4.3", false); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX4.3,值:false。"); | |||||
} | } | ||||
else if (o.ToString().Contains("托盘气缸2_1")) | else if (o.ToString().Contains("托盘气缸2_1")) | ||||
{ | { | ||||
HKDevice.HK_PLC_S7.Write("DB5.DBX4.4", false); | HKDevice.HK_PLC_S7.Write("DB5.DBX4.4", false); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX4.4,值:false。"); | |||||
} | } | ||||
else if (o.ToString().Contains("托盘气缸2_2")) | else if (o.ToString().Contains("托盘气缸2_2")) | ||||
{ | { | ||||
HKDevice.HK_PLC_S7.Write("DB5.DBX4.5", false); | HKDevice.HK_PLC_S7.Write("DB5.DBX4.5", false); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX4.5,值:false。"); | |||||
} | } | ||||
} | } | ||||
}), "ManualOpen", true);//根据下发的配方ID将 托盘的位置信息添加到配方中 | }), "ManualOpen", true);//根据下发的配方ID将 托盘的位置信息添加到配方中 | ||||
@@ -1193,7 +1198,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model | |||||
string address = "DB5.DBX" + (index / 8) + "." + (index % 8 - 1); | string address = "DB5.DBX" + (index / 8) + "." + (index % 8 - 1); | ||||
if (index == 8) address = "DB5.DBX0.7"; | if (index == 8) address = "DB5.DBX0.7"; | ||||
HKDevice.HK_PLC_S7.Write<bool>(address, false); | HKDevice.HK_PLC_S7.Write<bool>(address, false); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:{address},值:false"); | |||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:{address},值:false。"); | |||||
} | } | ||||
} | } | ||||
else if (o.ToString().Contains("阻挡气缸")) | else if (o.ToString().Contains("阻挡气缸")) | ||||
@@ -1218,57 +1223,62 @@ namespace BPASmartClient.JXJFoodSmallStation.Model | |||||
if (index == 14) address = "DB5.DBX3.4"; | if (index == 14) address = "DB5.DBX3.4"; | ||||
if (index == 15) address = "DB5.DBX3.5"; | if (index == 15) address = "DB5.DBX3.5"; | ||||
HKDevice.HK_PLC_S7.Write<bool>(address, false); | HKDevice.HK_PLC_S7.Write<bool>(address, false); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:{address},值:false。"); | |||||
} | } | ||||
} | } | ||||
else if (o.ToString().Contains("进料桶顶升气缸")) | else if (o.ToString().Contains("进料桶顶升气缸")) | ||||
{ | { | ||||
HKDevice.HK_PLC_S7.Write("DB5.DBX3.6", true); | HKDevice.HK_PLC_S7.Write("DB5.DBX3.6", true); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX3.6,值:true"); | |||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX3.6,值:true。"); | |||||
} | } | ||||
else if (o.ToString().Contains("出料桶顶升气缸1")) | else if (o.ToString().Contains("出料桶顶升气缸1")) | ||||
{ | { | ||||
HKDevice.HK_PLC_S7.Write("DB5.DBX3.7", false); | HKDevice.HK_PLC_S7.Write("DB5.DBX3.7", false); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX3.7,值:false"); | |||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX3.7,值:false。"); | |||||
} | } | ||||
else if (o.ToString().Contains("出料桶顶升气缸2")) | else if (o.ToString().Contains("出料桶顶升气缸2")) | ||||
{ | { | ||||
HKDevice.HK_PLC_S7.Write("DB5.DBX4.0", false); | HKDevice.HK_PLC_S7.Write("DB5.DBX4.0", false); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX4.0,值:false"); | |||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX4.0,值:false。"); | |||||
} | } | ||||
else if (o.ToString().Contains("出料桶顶升气缸3")) | else if (o.ToString().Contains("出料桶顶升气缸3")) | ||||
{ | { | ||||
HKDevice.HK_PLC_S7.Write("DB5.DBX4.1", false); | HKDevice.HK_PLC_S7.Write("DB5.DBX4.1", false); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX4.1,值:false"); | |||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX4.1,值:false。"); | |||||
} | } | ||||
else if (o.ToString().Contains("托盘气缸1_1")) | else if (o.ToString().Contains("托盘气缸1_1")) | ||||
{ | { | ||||
HKDevice.HK_PLC_S7.Write("DB5.DBX4.2", true); | HKDevice.HK_PLC_S7.Write("DB5.DBX4.2", true); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX4.2,值:true。"); | |||||
} | } | ||||
else if (o.ToString().Contains("托盘气缸1_2")) | else if (o.ToString().Contains("托盘气缸1_2")) | ||||
{ | { | ||||
HKDevice.HK_PLC_S7.Write("DB5.DBX4.3", true); | HKDevice.HK_PLC_S7.Write("DB5.DBX4.3", true); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX4.3,值:true。"); | |||||
} | } | ||||
else if (o.ToString().Contains("托盘气缸2_1")) | else if (o.ToString().Contains("托盘气缸2_1")) | ||||
{ | { | ||||
HKDevice.HK_PLC_S7.Write("DB5.DBX4.4", true); | HKDevice.HK_PLC_S7.Write("DB5.DBX4.4", true); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX4.4,值:true。"); | |||||
} | } | ||||
else if (o.ToString().Contains("托盘气缸2_2")) | else if (o.ToString().Contains("托盘气缸2_2")) | ||||
{ | { | ||||
HKDevice.HK_PLC_S7.Write("DB5.DBX4.5", true); | HKDevice.HK_PLC_S7.Write("DB5.DBX4.5", true); | ||||
MessageNotify.GetInstance.ShowUserLog($"手动操作气缸,地址:DB5.DBX4.5,值:true。"); | |||||
} | } | ||||
} | } | ||||
}), "ManualClose", true);//根据下发的配方ID将 托盘的位置信息添加到配方中 | }), "ManualClose", true);//根据下发的配方ID将 托盘的位置信息添加到配方中 | ||||
//手动控制电机轴 DB5.DBX4.6~DB5.DBX5.2 | //手动控制电机轴 DB5.DBX4.6~DB5.DBX5.2 | ||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX4.6", true); }), "StartAxisLoadCommand", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX4.6", false); }), "StopAxisLoadCommand", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX4.7", true); }), "StartAxisMidCommand", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX4.7", false); }), "StopAxisMidCommand", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX5.0", true); }), "StartAxisUnLoadCommand", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX5.0", false); }), "StopAxisUnLoadCommand", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX5.1", true); }), "StartAxis1Command", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX5.1", false); }), "StopAxis1Command", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX5.2", true); }), "StartAxis2Command", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX5.2", false); }), "StopAxis2Command", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX4.6", true); MessageNotify.GetInstance.ShowUserLog($"手动控制电机轴,地址:DB5.DBX4.6,值:true。"); }), "StartAxisLoadCommand", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX4.6", false); MessageNotify.GetInstance.ShowUserLog($"手动控制电机轴,地址:DB5.DBX4.6,值:false。"); }), "StopAxisLoadCommand", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX4.7", true); MessageNotify.GetInstance.ShowUserLog($"手动控制电机轴,地址:DB5.DBX4.7,值:true。"); }), "StartAxisMidCommand", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX4.7", false); MessageNotify.GetInstance.ShowUserLog($"手动控制电机轴,地址:DB5.DBX4.7,值:false。"); }), "StopAxisMidCommand", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX5.0", true); MessageNotify.GetInstance.ShowUserLog($"手动控制电机轴,地址:DB5.DBX5.0,值:true。"); }), "StartAxisUnLoadCommand", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX5.0", false); MessageNotify.GetInstance.ShowUserLog($"手动控制电机轴,地址:DB5.DBX5.0,值:false。"); }), "StopAxisUnLoadCommand", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX5.1", true); MessageNotify.GetInstance.ShowUserLog($"手动控制电机轴,地址:DB5.DBX5.1,值:true。"); }), "StartAxis1Command", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX5.1", false); MessageNotify.GetInstance.ShowUserLog($"手动控制电机轴,地址:DB5.DBX5.1,值:false。"); }), "StopAxis1Command", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX5.2", true); MessageNotify.GetInstance.ShowUserLog($"手动控制电机轴,地址:DB5.DBX5.2,值:true。"); }), "StartAxis2Command", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB5.DBX5.2", false); MessageNotify.GetInstance.ShowUserLog($"手动控制电机轴,地址:DB5.DBX5.2,值:false。"); }), "StopAxis2Command", true); | |||||
//西门子配方处理 | //西门子配方处理 | ||||
ActionManage.GetInstance.Register(new Action<object>((res) => | ActionManage.GetInstance.Register(new Action<object>((res) => | ||||
@@ -1382,15 +1392,15 @@ namespace BPASmartClient.JXJFoodSmallStation.Model | |||||
}), "LocalSimulationRecipeIssue", true); | }), "LocalSimulationRecipeIssue", true); | ||||
//手动控制系统模式 | //手动控制系统模式 | ||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB44.DBX0.0", true); }), "SystemStart", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB44.DBX0.0", false); }), "SystemStop", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB44.DBX0.2", true); }), "SystemPause", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB44.DBX0.2", false); }), "SystemReset", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB44.DBX0.1", false); }), "SystemAutoMode", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB44.DBX0.1", true); }), "SystemDebugMode", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB44.DBX0.0", true); MessageNotify.GetInstance.ShowUserLog($"手动控制系统启动,地址:DB44.DBX0.0,值:true。"); }), "SystemStart", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB44.DBX0.0", false); MessageNotify.GetInstance.ShowUserLog($"手动控制系统停止,地址:DB44.DBX0.0,值:false。"); }), "SystemStop", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB44.DBX0.2", true); MessageNotify.GetInstance.ShowUserLog($"手动控制系统暂停,地址:DB44.DBX0.2,值:true。"); }), "SystemPause", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB44.DBX0.2", false); MessageNotify.GetInstance.ShowUserLog($"手动控制系统复位,地址:DB44.DBX0.2,值:false。"); }), "SystemReset", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB44.DBX0.1", false); MessageNotify.GetInstance.ShowUserLog($"手动切换为自动模式,地址:DB44.DBX0.1,值:false。"); }), "SystemAutoMode", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB44.DBX0.1", true); MessageNotify.GetInstance.ShowUserLog($"手动切换为手动模式,地址:DB44.DBX0.1,值:true。"); }), "SystemDebugMode", true); | |||||
//流程控制 | //流程控制 | ||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB44.DBX0.3", true); }), "ManualSystemReset", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB44.DBX0.4", true); }), "CLearRecipeInfo", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB44.DBX0.3", true);}), "ManualSystemReset", true); | |||||
ActionManage.GetInstance.Register(new Action(() => { HKDevice.HK_PLC_S7.Write<bool>("DB44.DBX0.4", true);}), "CLearRecipeInfo", true); | |||||
ActionManage.GetInstance.Register(new Action(() => | ActionManage.GetInstance.Register(new Action(() => | ||||
{ | { | ||||
Json<RemoteRecipeDataColl>.Data.Recipes.Clear(); | Json<RemoteRecipeDataColl>.Data.Recipes.Clear(); | ||||
@@ -91,7 +91,7 @@ | |||||
Foreground="#FF0084FF" | Foreground="#FF0084FF" | ||||
Text=" 号仓" /> | Text=" 号仓" /> | ||||
</StackPanel> | </StackPanel> | ||||
<StackPanel | <StackPanel | ||||
Grid.Row="1" | Grid.Row="1" | ||||
Margin="0,70,0,0" | Margin="0,70,0,0" | ||||
@@ -65,99 +65,115 @@ | |||||
Background="#ff0C255F"> | Background="#ff0C255F"> | ||||
<Grid.ColumnDefinitions> | <Grid.ColumnDefinitions> | ||||
<ColumnDefinition Width="1*"/> | |||||
<ColumnDefinition Width="3*"/> | |||||
<ColumnDefinition Width="4*"/> | |||||
<ColumnDefinition Width="2*"/> | |||||
<ColumnDefinition Width="2*"/> | |||||
<ColumnDefinition Width="2*"/> | |||||
<ColumnDefinition Width="1*" /> | |||||
<ColumnDefinition Width="3*" /> | |||||
<ColumnDefinition Width="4*" /> | |||||
<ColumnDefinition Width="2*" /> | |||||
<ColumnDefinition Width="2*" /> | |||||
<ColumnDefinition Width="2*" /> | |||||
</Grid.ColumnDefinitions> | </Grid.ColumnDefinitions> | ||||
<Grid Grid.Column="0"> | <Grid Grid.Column="0"> | ||||
<TextBlock Text="序号" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"/> | |||||
<TextBlock | |||||
HorizontalAlignment="Center" | |||||
VerticalAlignment="Center" | |||||
Foreground="Aqua" | |||||
Text="序号" /> | |||||
<Border BorderThickness="1,0,1,0" Cursor="SizeWE" /> | <Border BorderThickness="1,0,1,0" Cursor="SizeWE" /> | ||||
</Grid> | </Grid> | ||||
<TextBlock Grid.Column="1" Text="地址" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" /> | |||||
<TextBlock | |||||
Grid.Column="1" | |||||
HorizontalAlignment="Center" | |||||
VerticalAlignment="Center" | |||||
Foreground="Aqua" | |||||
Text="地址" /> | |||||
<Grid Grid.Column="2"> | <Grid Grid.Column="2"> | ||||
<TextBlock Text="描述" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" /> | |||||
<TextBlock | |||||
HorizontalAlignment="Center" | |||||
VerticalAlignment="Center" | |||||
Foreground="Aqua" | |||||
Text="描述" /> | |||||
<Border BorderThickness="1,0,1,0" Cursor="SizeWE" /> | <Border BorderThickness="1,0,1,0" Cursor="SizeWE" /> | ||||
</Grid> | </Grid> | ||||
<TextBlock Grid.Column="3" Text="当前值" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" /> | |||||
<TextBlock | |||||
Grid.Column="3" | |||||
HorizontalAlignment="Center" | |||||
VerticalAlignment="Center" | |||||
Foreground="Aqua" | |||||
Text="当前值" /> | |||||
<Grid Grid.Column="4"> | <Grid Grid.Column="4"> | ||||
<TextBlock Text="设定值" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" /> | |||||
<Border BorderThickness="1,0,1,0" Cursor="SizeWE" /> | |||||
<TextBlock | |||||
HorizontalAlignment="Center" | |||||
VerticalAlignment="Center" | |||||
Foreground="Aqua" | |||||
Text="设定值" /> | |||||
<Border BorderThickness="1,0,1,0" Cursor="SizeWE" /> | |||||
</Grid> | </Grid> | ||||
<TextBlock Grid.Column="5" Text="功能操作" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" /> | |||||
<TextBlock | |||||
Grid.Column="5" | |||||
HorizontalAlignment="Center" | |||||
VerticalAlignment="Center" | |||||
Foreground="Aqua" | |||||
Text="功能操作" /> | |||||
<Border Grid.ColumnSpan="10" BorderThickness="1,0,1,0" /> | <Border Grid.ColumnSpan="10" BorderThickness="1,0,1,0" /> | ||||
</Grid> | </Grid> | ||||
<Grid Grid.Row="1"> | <Grid Grid.Row="1"> | ||||
<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" > | |||||
<ItemsControl ItemsSource="{Binding PlcInfo}" Foreground="Aqua"> | |||||
<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"> | |||||
<ItemsControl Foreground="Aqua" ItemsSource="{Binding PlcInfo}"> | |||||
<ItemsControl.ItemTemplate> | <ItemsControl.ItemTemplate> | ||||
<DataTemplate> | <DataTemplate> | ||||
<Grid Name="gr" > | |||||
<Grid Name="gr"> | |||||
<Grid.ColumnDefinitions> | <Grid.ColumnDefinitions> | ||||
<ColumnDefinition Width="1*"/> | |||||
<ColumnDefinition Width="3*"/> | |||||
<ColumnDefinition Width="4*"/> | |||||
<ColumnDefinition Width="2*"/> | |||||
<ColumnDefinition Width="2*"/> | |||||
<ColumnDefinition Width="2*"/> | |||||
<ColumnDefinition Width="1*" /> | |||||
<ColumnDefinition Width="3*" /> | |||||
<ColumnDefinition Width="4*" /> | |||||
<ColumnDefinition Width="2*" /> | |||||
<ColumnDefinition Width="2*" /> | |||||
<ColumnDefinition Width="2*" /> | |||||
</Grid.ColumnDefinitions> | </Grid.ColumnDefinitions> | ||||
<Grid Grid.Column="0"> | <Grid Grid.Column="0"> | ||||
<TextBlock | <TextBlock | ||||
HorizontalAlignment="Center" | HorizontalAlignment="Center" | ||||
VerticalAlignment="Center" | VerticalAlignment="Center" | ||||
Text="{Binding SerialNum}" /> | Text="{Binding SerialNum}" /> | ||||
<Border | |||||
BorderThickness="1,0,1,0" | |||||
Cursor="SizeWE" /> | |||||
<Border BorderThickness="1,0,1,0" Cursor="SizeWE" /> | |||||
</Grid> | </Grid> | ||||
<TextBlock | <TextBlock | ||||
Grid.Column="1" | Grid.Column="1" | ||||
HorizontalAlignment="Center" | HorizontalAlignment="Center" | ||||
VerticalAlignment="Center" | |||||
Text="{Binding Address }" /> | |||||
VerticalAlignment="Center" | |||||
Text="{Binding Address}" /> | |||||
<Grid Grid.Column="2"> | <Grid Grid.Column="2"> | ||||
<TextBlock | <TextBlock | ||||
HorizontalAlignment="Center" | HorizontalAlignment="Center" | ||||
VerticalAlignment="Center" | VerticalAlignment="Center" | ||||
Text="{Binding Describe}" /> | Text="{Binding Describe}" /> | ||||
<Border | |||||
BorderThickness="1,0,1,0" | |||||
Cursor="SizeWE" /> | |||||
<Border BorderThickness="1,0,1,0" Cursor="SizeWE" /> | |||||
</Grid> | </Grid> | ||||
<TextBlock | <TextBlock | ||||
HorizontalAlignment="Center" | |||||
VerticalAlignment="Center" | |||||
Grid.Column="3" | Grid.Column="3" | ||||
HorizontalAlignment="Center" | |||||
VerticalAlignment="Center" | |||||
Text="{Binding NowValue}" /> | Text="{Binding NowValue}" /> | ||||
<Grid Grid.Column="4"> | <Grid Grid.Column="4"> | ||||
<TextBox | |||||
Text="{Binding SetValue}" /> | |||||
<Border | |||||
BorderThickness="1,0,1,0" | |||||
Cursor="SizeWE" /> | |||||
<TextBox Text="{Binding SetValue}" /> | |||||
<Border BorderThickness="1,0,1,0" Cursor="SizeWE" /> | |||||
</Grid> | </Grid> | ||||
<Grid Grid.Column="5"> | <Grid Grid.Column="5"> | ||||
<pry:IcoButton | |||||
Command="{Binding DataContext.SetParCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}" | |||||
CommandParameter="{Binding Address}" | |||||
<pry:IcoButton | |||||
Grid.Column="0" | Grid.Column="0" | ||||
Margin="40,5,40,5" | Margin="40,5,40,5" | ||||
Command="{Binding DataContext.SetParCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}" | |||||
CommandParameter="{Binding Address}" | |||||
Content="设置" | Content="设置" | ||||
FontSize="20" | FontSize="20" | ||||
Foreground="Aqua" | Foreground="Aqua" | ||||
Style="{StaticResource IcoButtonStyle}" /> | |||||
<Border | |||||
BorderThickness="1,0,1,0" | |||||
Cursor="SizeWE" /> | |||||
Style="{StaticResource IcoButtonStyle}" /> | |||||
<Border BorderThickness="1,0,1,0" Cursor="SizeWE" /> | |||||
</Grid> | </Grid> | ||||
<Border | |||||
Grid.ColumnSpan="10" | |||||
BorderThickness="1,0,1,1" /> | |||||
<Border Grid.ColumnSpan="10" BorderThickness="1,0,1,1" /> | |||||
</Grid> | </Grid> | ||||
<DataTemplate.Triggers> | <DataTemplate.Triggers> | ||||
@@ -141,7 +141,7 @@ | |||||
</Grid.RowDefinitions> | </Grid.RowDefinitions> | ||||
<Grid Grid.Row="0"> | <Grid Grid.Row="0"> | ||||
<Grid.ColumnDefinitions> | <Grid.ColumnDefinitions> | ||||
<ColumnDefinition Width="2*" /> | |||||
<ColumnDefinition Width="2.5*" /> | |||||
<ColumnDefinition Width="2*" /> | <ColumnDefinition Width="2*" /> | ||||
<ColumnDefinition Width="2*" /> | <ColumnDefinition Width="2*" /> | ||||
<ColumnDefinition Width="2*" /> | <ColumnDefinition Width="2*" /> | ||||
@@ -189,7 +189,7 @@ | |||||
<DataTemplate> | <DataTemplate> | ||||
<Grid x:Name="grb" Height="25"> | <Grid x:Name="grb" Height="25"> | ||||
<Grid.ColumnDefinitions> | <Grid.ColumnDefinitions> | ||||
<ColumnDefinition Width="2*" /> | |||||
<ColumnDefinition Width="2.5*" /> | |||||
<ColumnDefinition Width="2*" /> | <ColumnDefinition Width="2*" /> | ||||
<ColumnDefinition Width="2*" /> | <ColumnDefinition Width="2*" /> | ||||
<ColumnDefinition Width="2*" /> | <ColumnDefinition Width="2*" /> | ||||
@@ -30,6 +30,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
{ | { | ||||
Count = Json<DevicePar>.Data.BomMaterial.Count +1 , | Count = Json<DevicePar>.Data.BomMaterial.Count +1 , | ||||
}); | }); | ||||
MessageNotify.GetInstance.ShowUserLog("新增一条物料数据。"); | |||||
}); | }); | ||||
SaveMaterials = new RelayCommand(() => | SaveMaterials = new RelayCommand(() => | ||||
{ | { | ||||
@@ -48,14 +49,15 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
{ | { | ||||
Json<DevicePar>.Data.BomMaterial.Add(new BomMaterial() { Count = Json<DevicePar>.Data.BomMaterial.Count + 1, MaterialCode = item.Key, MaterialName = item.Value }); | Json<DevicePar>.Data.BomMaterial.Add(new BomMaterial() { Count = Json<DevicePar>.Data.BomMaterial.Count + 1, MaterialCode = item.Key, MaterialName = item.Value }); | ||||
} | } | ||||
MessageNotify.GetInstance.ShowUserLog("西门子物料数据拉取了本地数据。"); | |||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"读取程序的Bom清单"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"读取程序的Bom清单"); | ||||
}); | }); | ||||
DeleteAllMaterial = new RelayCommand(() => | DeleteAllMaterial = new RelayCommand(() => | ||||
{ | { | ||||
if (MessageNotify.GetInstance.ShowDialog("请确认是否删除所有原料数据!") == true) | |||||
if (MessageNotify.GetInstance.ShowDialog("请确认,是否删除所有原料数据!") == true) | |||||
{ | { | ||||
Json<DevicePar>.Data.BomMaterial.Clear(); | Json<DevicePar>.Data.BomMaterial.Clear(); | ||||
MessageNotify.GetInstance.ShowUserLog($"西门子物料清单删除完成"); | |||||
MessageNotify.GetInstance.ShowUserLog($"手动点击西门子物料清单全部清除。"); | |||||
} | } | ||||
}); | }); | ||||
RemoveCommand = new RelayCommand<int>((Count) => | RemoveCommand = new RelayCommand<int>((Count) => | ||||
@@ -65,10 +67,11 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
var res = RawMaterialInfo.FirstOrDefault(p => p.Count == cnt); | var res = RawMaterialInfo.FirstOrDefault(p => p.Count == cnt); | ||||
if (res != null) | if (res != null) | ||||
{ | { | ||||
if (MessageNotify.GetInstance.ShowDialog($"请确认是否删除[{res.MaterialCode}],[{res.MaterialName}]!") == true) | |||||
if (MessageNotify.GetInstance.ShowDialog($"请确认是否删除物料编码:【{res.MaterialCode}】,物料名称:【{res.MaterialName}】的信息?") == true) | |||||
{ | { | ||||
RawMaterialInfo.Remove(res); | RawMaterialInfo.Remove(res); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"删除成功"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"删除成功"); | ||||
MessageNotify.GetInstance.ShowUserLog($"删除一条物料数据,物料编码:【{res.MaterialCode}】,物料名称:{res.MaterialName}。"); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -48,6 +48,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
Json<LocaPar>.Data.Recipes.ElementAt(i).RawMaterials.ElementAt(m).RawMaterialName = DeviceName; | Json<LocaPar>.Data.Recipes.ElementAt(i).RawMaterials.ElementAt(m).RawMaterialName = DeviceName; | ||||
} | } | ||||
} | } | ||||
MessageNotify.GetInstance.ShowUserLog($"修改设备名称为【{DeviceName}】"); | |||||
ActionManage.GetInstance.Send("ChangeDeviceNameViewClose"); | ActionManage.GetInstance.Send("ChangeDeviceNameViewClose"); | ||||
} | } | ||||
} | } | ||||
@@ -11,6 +11,7 @@ using Microsoft.Toolkit.Mvvm.Input; | |||||
using BPASmartClient.CustomResource.UserControls.MessageShow; | using BPASmartClient.CustomResource.UserControls.MessageShow; | ||||
using BPASmartClient.CustomResource.UserControls; | using BPASmartClient.CustomResource.UserControls; | ||||
using System.Diagnostics; | using System.Diagnostics; | ||||
using BPASmartClient.CustomResource.Pages.Model; | |||||
namespace BPASmartClient.JXJFoodSmallStation.ViewModel | namespace BPASmartClient.JXJFoodSmallStation.ViewModel | ||||
{ | { | ||||
@@ -23,10 +24,13 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
{ | { | ||||
var res = deviceParModels.FirstOrDefault(p => p.MaterialName == o?.ToString()); | var res = deviceParModels.FirstOrDefault(p => p.MaterialName == o?.ToString()); | ||||
if (res != null) deviceParModels.Remove(res); | if (res != null) deviceParModels.Remove(res); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"{o.ToString()}:原料删除成功!"); | |||||
MessageNotify.GetInstance.ShowUserLog($"删除一条味魔方原料参数设置。原料名称:{o.ToString()}"); | |||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"原料:【{o.ToString()}】删除成功!"); | |||||
}); | }); | ||||
AddCommand = new RelayCommand(() => { deviceParModels.Add(new DeviceParMode()); }); | |||||
AddCommand = new RelayCommand(() => { deviceParModels.Add(new DeviceParMode()); | |||||
MessageNotify.GetInstance.ShowUserLog($"新增一条味魔方原料参数设置。"); | |||||
}); | |||||
SaveCommand = new RelayCommand(() => | SaveCommand = new RelayCommand(() => | ||||
{ | { | ||||
if (deviceParModels == null || deviceParModels.Count <= 0) | if (deviceParModels == null || deviceParModels.Count <= 0) | ||||
@@ -55,6 +59,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
}); | }); | ||||
Json<DevicePar>.Save(); | Json<DevicePar>.Save(); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"原料参数保存成功!"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"原料参数保存成功!"); | ||||
MessageNotify.GetInstance.ShowUserLog("保存味魔法原料参数设置。"); | |||||
}); | }); | ||||
} | } | ||||
@@ -222,6 +222,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
Open = new RelayCommand<object>((o) => | Open = new RelayCommand<object>((o) => | ||||
{ | { | ||||
ActionManage.GetInstance.Send("ManualOpen", o); | ActionManage.GetInstance.Send("ManualOpen", o); | ||||
}); | }); | ||||
Close = new RelayCommand<object>((o) => | Close = new RelayCommand<object>((o) => | ||||
{ | { | ||||
@@ -201,6 +201,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
Json<LocalRecipeDataColl>.Data.Recipes.ElementAt(index).RawMaterial = RawMaterials; | Json<LocalRecipeDataColl>.Data.Recipes.ElementAt(index).RawMaterial = RawMaterials; | ||||
Json<LocalRecipeDataColl>.Data.Recipes.ElementAt(index).WindSend = WindSendRawMaterials; | Json<LocalRecipeDataColl>.Data.Recipes.ElementAt(index).WindSend = WindSendRawMaterials; | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"修改配方完成!"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"修改配方完成!"); | ||||
MessageNotify.GetInstance.ShowUserLog($"修改配方名称:【{RecipeName}】,配方编号:【{RecipeCode}】。"); | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
@@ -229,15 +230,19 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
}); | }); | ||||
} | } | ||||
} | } | ||||
Json<LocalRecipeDataColl>.Data.Recipes.Add(new RemoteRecipeData() | |||||
var newRemoteRecipeData = new RemoteRecipeData() | |||||
{ | { | ||||
RecipeName = RecipeName, | RecipeName = RecipeName, | ||||
RecipeCode = RecipeCode, | RecipeCode = RecipeCode, | ||||
TrayCode = TrayNum, | TrayCode = TrayNum, | ||||
RawMaterial = RawMaterials, | RawMaterial = RawMaterials, | ||||
WindSend = WindSendRawMaterials, | WindSend = WindSendRawMaterials, | ||||
}); | |||||
}; | |||||
Json<LocalRecipeDataColl>.Data.Recipes.Add(newRemoteRecipeData); | |||||
//新增一条配方应该默认显示出来。 | |||||
Json<LocalRecipeDataColl>.Data.SelectedRecipes.Add(newRemoteRecipeData); | |||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"自定义配方添加完成!"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"自定义配方添加完成!"); | ||||
MessageNotify.GetInstance.ShowUserLog($"添加一个自定义配方,配方名称:【{RecipeName}】,配方编号:【{RecipeCode}】。"); | |||||
} | } | ||||
ActionManage.GetInstance.Send("CloseNewRemoteRecipeView"); | ActionManage.GetInstance.Send("CloseNewRemoteRecipeView"); | ||||
}); | }); | ||||
@@ -11,6 +11,8 @@ using BPASmartClient.JXJFoodSmallStation.Model; | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
using BPASmartClient.JXJFoodSmallStation.Model.RawMaterial; | using BPASmartClient.JXJFoodSmallStation.Model.RawMaterial; | ||||
using System.Windows.Controls; | |||||
using Renci.SshNet.Messages; | |||||
namespace BPASmartClient.JXJFoodSmallStation.ViewModel | namespace BPASmartClient.JXJFoodSmallStation.ViewModel | ||||
{ | { | ||||
@@ -42,6 +44,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
{ | { | ||||
RawMaterialId = guid | RawMaterialId = guid | ||||
}); | }); | ||||
MessageNotify.GetInstance.ShowUserLog($"添加一条原料:{guid}"); | |||||
} | } | ||||
else goto p; | else goto p; | ||||
}); | }); | ||||
@@ -51,7 +54,11 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
if (obj is string rm) | if (obj is string rm) | ||||
{ | { | ||||
var res = RawMaterials.FirstOrDefault(p => p.RawMaterialId == rm); | var res = RawMaterials.FirstOrDefault(p => p.RawMaterialId == rm); | ||||
if (res != null) Global.DeviceRawMaterials.Remove(res); | |||||
if (res != null) | |||||
{ | |||||
Global.DeviceRawMaterials.Remove(res); | |||||
MessageNotify.GetInstance.ShowUserLog($"删除一条原料,原料名称:【{res.RawMaterialName}】"); | |||||
} | |||||
} | } | ||||
}); | }); | ||||
@@ -98,6 +105,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
{ | { | ||||
Json<LocaPar>.Data.Recipes.ElementAt(res).RawMaterials.Add(item); | Json<LocaPar>.Data.Recipes.ElementAt(res).RawMaterials.Add(item); | ||||
} | } | ||||
MessageNotify.GetInstance.ShowUserLog($"修改了一条配方,配方编号:【{RecipeCode}】"); | |||||
} | } | ||||
} | } | ||||
ActionManage.GetInstance.Send("CloseNewRecipeView"); | ActionManage.GetInstance.Send("CloseNewRecipeView"); | ||||
@@ -160,6 +168,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
RecipCode = sb.ToString(), | RecipCode = sb.ToString(), | ||||
RecipeName = RecipeName, | RecipeName = RecipeName, | ||||
}); | }); | ||||
MessageNotify.GetInstance.ShowUserLog($"新增了一条配方,配方名称:【{RecipeName}】,配方编号:【{RecipeCode}】"); | |||||
} | } | ||||
public string RecipeCode { get { return _mRecipeCode; } set { _mRecipeCode = value; OnPropertyChanged(); } } | public string RecipeCode { get { return _mRecipeCode; } set { _mRecipeCode = value; OnPropertyChanged(); } } | ||||
@@ -95,7 +95,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
{ | { | ||||
ActionManage.GetInstance.Send("LocalSimulationRecipeIssue", res); | ActionManage.GetInstance.Send("LocalSimulationRecipeIssue", res); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"{res.RecipeName}配方下发成功!"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"{res.RecipeName}配方下发成功!"); | ||||
MessageNotify.GetInstance.ShowUserLog($"下发本地模拟配方——{res.RecipeName}"); | |||||
MessageNotify.GetInstance.ShowUserLog($"下发本地模拟配方,配方名称:【{res.RecipeName}】"); | |||||
} | } | ||||
GVL_SmallStation.GetInstance.LatestIssueRecipe=DateTime.Now; | GVL_SmallStation.GetInstance.LatestIssueRecipe=DateTime.Now; | ||||
} | } | ||||
@@ -144,13 +144,18 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
var res = Array.FindIndex(Json<LocalRecipeDataColl>.Data.Recipes.ToArray(), p => p.RecipeCode == recipeCode); | var res = Array.FindIndex(Json<LocalRecipeDataColl>.Data.Recipes.ToArray(), p => p.RecipeCode == recipeCode); | ||||
if (res < 0) | if (res < 0) | ||||
{ | { | ||||
Json<LocalRecipeDataColl>.Data.Recipes.Add(new RemoteRecipeData() | |||||
var newRemoteRecipedata = new RemoteRecipeData() | |||||
{ | { | ||||
RecipeName = recipeName, | RecipeName = recipeName, | ||||
RecipeCode = recipeCode, | RecipeCode = recipeCode, | ||||
TrayCode = trayCode, | TrayCode = trayCode, | ||||
RawMaterial = RawMaterials, | RawMaterial = RawMaterials, | ||||
}); | |||||
}; | |||||
Json<LocalRecipeDataColl>.Data.Recipes.Add(newRemoteRecipedata); | |||||
//新增了配方之后应该默认显示出来。 | |||||
Json<LocalRecipeDataColl>.Data.SelectedRecipes.Add(newRemoteRecipedata); | |||||
MessageNotify.GetInstance.ShowUserLog("新增一条本地模拟配方。"); | |||||
} | } | ||||
}); | }); | ||||
@@ -159,6 +164,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
if (MessageNotify.GetInstance.ShowDialog("请确认,是否清除所有本地配方?", DialogType.Warning)) | if (MessageNotify.GetInstance.ShowDialog("请确认,是否清除所有本地配方?", DialogType.Warning)) | ||||
{ | { | ||||
Json<LocalRecipeDataColl>.Data.Recipes.Clear(); | Json<LocalRecipeDataColl>.Data.Recipes.Clear(); | ||||
Json<LocalRecipeDataColl>.Data.SelectedRecipes.Clear(); | |||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"本地配方清空成功。"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"本地配方清空成功。"); | ||||
MessageNotify.GetInstance.ShowUserLog("手动清除所有本地配方"); | MessageNotify.GetInstance.ShowUserLog("手动清除所有本地配方"); | ||||
} | } | ||||
@@ -181,6 +187,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
} | } | ||||
//不保存会导致下次打开本地配方下发页面,会重新读取之前存储的文件。 | //不保存会导致下次打开本地配方下发页面,会重新读取之前存储的文件。 | ||||
Json<LocalRecipeDataColl>.Save(); | Json<LocalRecipeDataColl>.Save(); | ||||
MessageNotify.GetInstance.ShowUserLog("筛选了一次配方。"); | |||||
}); | }); | ||||
} | } | ||||
@@ -29,6 +29,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
{ | { | ||||
var res = RawMaterialInfo.FirstOrDefault(p => p.RawMaterialLocation == pos); | var res = RawMaterialInfo.FirstOrDefault(p => p.RawMaterialLocation == pos); | ||||
if (res != null) RawMaterialInfo.Remove(res); | if (res != null) RawMaterialInfo.Remove(res); | ||||
MessageNotify.GetInstance.ShowUserLog($"删除一条料仓物料配置信息,原料料仓位置:【{res.RawMaterialLocation}】,原料编号:【{res.RawMaterialName}】"); | |||||
} | } | ||||
}); | }); | ||||
SaveRawMaterialPara = new RelayCommand(() => | SaveRawMaterialPara = new RelayCommand(() => | ||||
@@ -45,6 +46,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
UpdateRawMaterial = new RelayCommand(() => | UpdateRawMaterial = new RelayCommand(() => | ||||
{ | { | ||||
RawMaterialInfo.Add(new RawMaterialStockBin() { RawMaterialCount = (short)(RawMaterialInfo.Count + 1)}); | RawMaterialInfo.Add(new RawMaterialStockBin() { RawMaterialCount = (short)(RawMaterialInfo.Count + 1)}); | ||||
MessageNotify.GetInstance.ShowUserLog($"新增一条料仓物料配置信息。"); | |||||
}); | }); | ||||
} | } | ||||
public ObservableCollection<RawMaterialStockBin> RawMaterialInfo { get; set; } = new ObservableCollection<RawMaterialStockBin>(); | public ObservableCollection<RawMaterialStockBin> RawMaterialInfo { get; set; } = new ObservableCollection<RawMaterialStockBin>(); | ||||
@@ -14,6 +14,7 @@ using System.Diagnostics; | |||||
using BPASmartClient.JXJFoodSmallStation.Model.WindSend; | using BPASmartClient.JXJFoodSmallStation.Model.WindSend; | ||||
using BPASmartClient.JXJFoodSmallStation.Model.Par; | using BPASmartClient.JXJFoodSmallStation.Model.Par; | ||||
using BPASmartClient.JXJFoodSmallStation.Model.HK_PLC; | using BPASmartClient.JXJFoodSmallStation.Model.HK_PLC; | ||||
using BPASmartClient.CustomResource.Pages.Model; | |||||
namespace BPASmartClient.JXJFoodSmallStation.ViewModel | namespace BPASmartClient.JXJFoodSmallStation.ViewModel | ||||
{ | { | ||||
@@ -46,7 +47,8 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
Json<DevicePar>.Data.deviceConnectPar.Axis1Speed = Axis1Speed; | Json<DevicePar>.Data.deviceConnectPar.Axis1Speed = Axis1Speed; | ||||
Json<DevicePar>.Data.deviceConnectPar.Axis2Speed = Axis2Speed; | Json<DevicePar>.Data.deviceConnectPar.Axis2Speed = Axis2Speed; | ||||
Json<DevicePar>.Save(); | Json<DevicePar>.Save(); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"参数保存成功!"); | |||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统设置参数保存成功!"); | |||||
MessageNotify.GetInstance.ShowUserLog("保存系统设置参数。"); | |||||
}); | }); | ||||
SetParCommand = new RelayCommand(() => | SetParCommand = new RelayCommand(() => | ||||
{ | { | ||||
@@ -61,7 +63,8 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
//ActionManage.GetInstance.Send("AxisUnLoadSpeedSet", AxisUnLoadSpeed); | //ActionManage.GetInstance.Send("AxisUnLoadSpeedSet", AxisUnLoadSpeed); | ||||
//ActionManage.GetInstance.Send("Axis1SpeedSet", Axis1Speed); | //ActionManage.GetInstance.Send("Axis1SpeedSet", Axis1Speed); | ||||
//ActionManage.GetInstance.Send("Axis2SpeedSet", Axis2Speed); | //ActionManage.GetInstance.Send("Axis2SpeedSet", Axis2Speed); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"参数设置成功!"); | |||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"电机参数设置成功!"); | |||||
MessageNotify.GetInstance.ShowUserLog("电机设置参数下发成功。"); | |||||
}); | }); | ||||
} | } | ||||
@@ -13,6 +13,7 @@ using BPASmartClient.CustomResource.UserControls; | |||||
using System.Diagnostics; | using System.Diagnostics; | ||||
using BPASmartClient.JXJFoodSmallStation.Model.WindSend; | using BPASmartClient.JXJFoodSmallStation.Model.WindSend; | ||||
using System.Threading; | using System.Threading; | ||||
using BPASmartClient.CustomResource.Pages.Model; | |||||
namespace BPASmartClient.JXJFoodSmallStation.ViewModel | namespace BPASmartClient.JXJFoodSmallStation.ViewModel | ||||
{ | { | ||||
@@ -34,6 +35,8 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel | |||||
SaveRawMaterialPara = new RelayCommand(() => | SaveRawMaterialPara = new RelayCommand(() => | ||||
{ | { | ||||
Json<DevicePar>.Save(); | Json<DevicePar>.Save(); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"风送料仓原料信息参数保存成功!"); | |||||
MessageNotify.GetInstance.ShowUserLog("风送料仓原料信息参数保存成功。"); | |||||
}); | }); | ||||
} | } | ||||