Browse Source

程序优化

master
pry 1 year ago
parent
commit
98ba49489d
15 changed files with 1173 additions and 512 deletions
  1. +26
    -25
      BPASmartClient.CustomResource/Pages/View/MainView.xaml
  2. +113
    -0
      BPASmartClient.JXJFoodSmallStation/Resource/MyStyle.xaml
  3. +170
    -43
      BPASmartClient.JXJFoodSmallStation/View/BomOfMaterialView.xaml
  4. +15
    -114
      BPASmartClient.JXJFoodSmallStation/View/DeviceMaterialParView.xaml
  5. +2
    -2
      BPASmartClient.JXJFoodSmallStation/View/ManualControlView.xaml
  6. +1
    -1
      BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml
  7. +147
    -49
      BPASmartClient.JXJFoodSmallStation/View/PlcVarMonitorView.xaml
  8. +131
    -44
      BPASmartClient.JXJFoodSmallStation/View/ProcessMonitorView.xaml
  9. +125
    -37
      BPASmartClient.JXJFoodSmallStation/View/RecipeInfosView.xaml
  10. +15
    -9
      BPASmartClient.JXJFoodSmallStation/View/RecipeReceiveView.xaml
  11. +3
    -3
      BPASmartClient.JXJFoodSmallStation/View/SiemensRecipeReceiveView.xaml
  12. +119
    -86
      BPASmartClient.JXJFoodSmallStation/View/StockBinRawMaterialView.xaml
  13. +110
    -36
      BPASmartClient.JXJFoodSmallStation/View/SystemParView.xaml
  14. +125
    -43
      BPASmartClient.JXJFoodSmallStation/View/WindSendParView.xaml
  15. +71
    -20
      BPASmartClient.JXJFoodSmallStation/ViewModel/ManualControlViewModel.cs

+ 26
- 25
BPASmartClient.CustomResource/Pages/View/MainView.xaml View File

@@ -21,7 +21,7 @@
</Window.DataContext>

<Window.Resources>

<!--#region 静态资源-->
<ImageBrush x:Key="leftImage" ImageSource="../../Image/leftImage.png" />
@@ -376,33 +376,33 @@
<ControlTemplate TargetType="ToggleButton">
<Grid Cursor="Hand">
<Border
x:Name="bd1"
Width="25"
Height="13"
Margin="0,-10,-5,0"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Panel.ZIndex="100"
Background="#2600CAFF"
CornerRadius="3"
Cursor="Hand"
Visibility="Collapsed">
x:Name="bd1"
Width="25"
Height="13"
Margin="0,-10,-5,0"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Panel.ZIndex="100"
Background="#2600CAFF"
CornerRadius="3"
Cursor="Hand"
Visibility="Collapsed">
<TextBlock
HorizontalAlignment="Center"
FontSize="8"
Foreground="#FF00E6F7"
Text="{Binding ListNum, Mode=TwoWay}" />
HorizontalAlignment="Center"
FontSize="8"
Foreground="#FF00E6F7"
Text="{Binding ListNum, Mode=TwoWay}" />
<!-- -->
</Border>
<Image
x:Name="image1"
Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Panel.ZIndex="0"
RenderOptions.BitmapScalingMode="HighQuality"
SnapsToDevicePixels="True"
Source="/BPASmartClient.CustomResource;component/Image/告警/无告警.png"
UseLayoutRounding="True" />
x:Name="image1"
Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Panel.ZIndex="0"
RenderOptions.BitmapScalingMode="HighQuality"
SnapsToDevicePixels="True"
Source="/BPASmartClient.CustomResource;component/Image/告警/无告警.png"
UseLayoutRounding="True" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
@@ -581,12 +581,13 @@
</Grid.RowDefinitions>
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<ToggleButton
Margin="0,0,8,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Cursor="Hand"
IsChecked="{Binding IsAlarm}"
Style="{DynamicResource StatusBtnStyle告警}"
ToolTip="心跳检测报警" Margin="0,0,8,0"/>
ToolTip="心跳检测报警" />
<CheckBox
Margin="5,0,8,0"
Content="开机启动"


+ 113
- 0
BPASmartClient.JXJFoodSmallStation/Resource/MyStyle.xaml View File

@@ -0,0 +1,113 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:con="clr-namespace:BPASmartClient.JXJFoodSmallStation.Converter">

<SolidColorBrush x:Key="tabColor" Color="#FF2AB2E7" />
<!--<SolidColorBrush x:Key="bordColor" Color="#33ffffff" />-->
<SolidColorBrush x:Key="bordColor" Color="#552AB2E7" />
<con:DataTableRedundantConverter x:Key="tabConvert" />


<Style x:Key="RowRadioButtonStyle" TargetType="{x:Type RadioButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RadioButton}">
<Border
x:Name="NvaBor"
Background="Transparent"
BorderBrush="#FF2AB2E7"
BorderThickness="0">
<ContentControl
Margin="10,4"
HorizontalAlignment="Center"
VerticalAlignment="Center"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
Content="{TemplateBinding Content}"
FontSize="16" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="NvaBor" Property="Background" Value="#22ffffff" />
<Setter TargetName="NvaBor" Property="BorderThickness" Value="0" />
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsChecked" Value="false" />
<Condition Property="IsMouseOver" Value="True" />
</MultiTrigger.Conditions>
<MultiTrigger.Setters>
<Setter TargetName="NvaBor" Property="Background" Value="#22ffffff" />
</MultiTrigger.Setters>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<Style x:Key="InputTextboxStyle" TargetType="TextBox">
<Setter Property="Margin" Value="5,0,0,0" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="Width" Value="150" />
<Setter Property="Height" Value="40" />
<Setter Property="CaretBrush" Value="{StaticResource TitleBorderColor}" />
<Setter Property="Foreground" Value="{StaticResource TitleBorderColor}" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>

<Style x:Key="ControlButtonStyle" TargetType="Button">
<Setter Property="Margin" Value="0" />
<Setter Property="FontSize" Value="18" />
<Setter Property="Foreground" Value="#FFF53F62" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="FontFamily" Value="楷体" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border
Name="TitleBarBr"
BorderBrush="#00c2f4"
BorderThickness="0"
CornerRadius="0"
Opacity="0.8">

<ContentPresenter
Margin="{TemplateBinding Margin}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
<Border.Background>
<ImageBrush
ImageSource="/BPASmartClient.CustomResource;component/Image/组合边框1.1.png"
Opacity="0.8"
Stretch="Fill" />
</Border.Background>

</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="TitleBarBr" Property="Opacity" Value="1" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<Style x:Key="TitleTextblockStyle" TargetType="TextBlock">
<Setter Property="FontSize" Value="16" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Foreground" Value="{StaticResource tabColor}" />
<Setter Property="FontFamily" Value="楷体" />
<Setter Property="FontWeight" Value="SemiBold" />
</Style>


</ResourceDictionary>

+ 170
- 43
BPASmartClient.JXJFoodSmallStation/View/BomOfMaterialView.xaml View File

@@ -1,19 +1,32 @@
<UserControl x:Class="BPASmartClient.JXJFoodSmallStation.View.BomOfMaterialView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:con="clr-namespace:BPASmartClient.JXJFoodSmallStation.Converter"
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.JXJFoodSmallStation.ViewModel"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920">
<UserControl
x:Class="BPASmartClient.JXJFoodSmallStation.View.BomOfMaterialView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:con="clr-namespace:BPASmartClient.JXJFoodSmallStation.Converter"
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.JXJFoodSmallStation.ViewModel"
d:DesignHeight="1080"
d:DesignWidth="1920"
mc:Ignorable="d">
<UserControl.DataContext>
<vm:BomOfMaterialViewModel />
</UserControl.DataContext>

<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/BPASmartClient.JXJFoodSmallStation;component/Resource/MyStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>

<!--<UserControl.Resources>
<SolidColorBrush x:Key="tabColor" Color="#FF2AB2E7" />
<!--<SolidColorBrush x:Key="bordColor" Color="#33ffffff" />-->
-->
<!--<SolidColorBrush x:Key="bordColor" Color="#33ffffff" />-->
<!--
<SolidColorBrush x:Key="bordColor" Color="#332AB2E7" />
<con:DataTableRedundantConverter x:Key="tabConvert" />

@@ -117,108 +130,222 @@
<Setter Property="FontWeight" Value="SemiBold" />
</Style>

</UserControl.Resources>
</UserControl.Resources>-->
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="60" />
<RowDefinition Height="40" />
<RowDefinition Height="50" />
<RowDefinition />
</Grid.RowDefinitions>
<!--#region 表格标题栏设置-->
<Grid>
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<StackPanel
Margin="0,0,10,0"
HorizontalAlignment="Right"
Orientation="Horizontal">
<Button
Width="200"
Height="50"
Margin="5"
Command="{Binding GetBomMaterialData}"
Content="拉取本地数据"
FontSize="28"
Foreground="Aqua"
Foreground="DeepSkyBlue"
Style="{StaticResource ImageButtonStyle}" />
<Button
Width="200"
Height="50"
Margin="5"
Command="{Binding DeleteAllMaterial}"
Content="删除所有数据"
FontSize="28"
Foreground="Aqua"
Foreground="DeepSkyBlue"
Style="{StaticResource ImageButtonStyle}" />
<Button
Width="200"
Height="50"
Margin="5"
Command="{Binding AddMaterial}"
Content="新增数据"
FontSize="28"
Foreground="Aqua"
Foreground="DeepSkyBlue"
Style="{StaticResource ImageButtonStyle}" />
<Button
Width="200"
Height="50"
Margin="5"
Command="{Binding SaveMaterials}"
Content="保存参数"
FontSize="28"
Foreground="Aqua"
Foreground="DeepSkyBlue"
Style="{StaticResource ImageButtonStyle}" />
</StackPanel>
</Grid>
<Grid
Grid.Row="1"
Margin="0,10,0,0"
Margin="0,10,17,0"
Background="#ff0C255F">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<TextBlock Text="序号" FontSize="24" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"/>
<!--<Border BorderThickness="1,1,1,1" Cursor="SizeWE"

<TextBlock
Grid.Column="0"
FontSize="24"
Style="{StaticResource TitleTextblockStyle}"
Text="序号" />

<TextBlock
Grid.Column="1"
FontSize="24"
Style="{StaticResource TitleTextblockStyle}"
Text="原料编号" />

<TextBlock
Grid.Column="2"
FontSize="24"
Style="{StaticResource TitleTextblockStyle}"
Text="原料名称" />

<TextBlock
Grid.Column="3"
FontSize="24"
Style="{StaticResource TitleTextblockStyle}"
Text="操作" />

<Border
Grid.Column="0"
Grid.ColumnSpan="4"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,1,1,1" />
<Border
Grid.Column="1"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0" />
<Border
Grid.Column="3"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0" />



<!--<Grid Grid.Column="0">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="24"
Foreground="Aqua"
Text="序号" />
-->
<!--<Border BorderThickness="1,1,1,1" Cursor="SizeWE"
BorderBrush="{StaticResource bordColor}" />-->
<!--
</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.Row="2">
<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Visible" >
<ItemsControl ItemsSource="{Binding RawMaterialInfo}" Foreground="Aqua">
<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Visible">
<ItemsControl Foreground="DeepSkyBlue" ItemsSource="{Binding RawMaterialInfo}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Name="gr" >
<Grid Name="gr">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" Margin="5">

<TextBlock
Grid.Column="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Text="{Binding Count}" />

<TextBox
Grid.Column="1"
Style="{StaticResource InputTextboxStyle}"
Text="{Binding MaterialCode}" />

<TextBox
Grid.Column="2"
Style="{StaticResource InputTextboxStyle}"
Text="{Binding MaterialName}" />

<Button
Grid.Column="3"
Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
CommandParameter="{Binding RawMaterialLocation}"
Content="删除"
FontSize="16"
Style="{StaticResource ControlButtonStyle}" />

<Border
Grid.Column="0"
Grid.ColumnSpan="4"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,1" />
<Border
Grid.Column="1"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0" />
<Border
Grid.Column="3"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0" />


<!--<Grid Grid.Column="0" Margin="5">
<TextBlock
FontSize="16"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Text="{Binding Count}" />
</Grid>
<Grid Grid.Column="1" Margin="5">
<TextBox
Width="50"
FontSize="16"
HorizontalAlignment="Center"
VerticalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Text="{Binding MaterialCode}" />
</Grid>
<Grid Grid.Column="2" Margin="5">
<TextBox
Width="200"
FontSize="16"
HorizontalAlignment="Center"
VerticalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Text="{Binding MaterialName}" />
</Grid>
<Grid Grid.Column="3" Margin="5">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<pry:IcoButton
Margin="3,4,4,0"
HorizontalAlignment="Center"
@@ -233,9 +360,9 @@
IcoText="&#xe68e;"
Style="{StaticResource IcoButtonStyle}" />
</StackPanel>
</Grid>
</Grid>-->
</Grid>
<DataTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="gr" Property="Background" Value="#112AB2E7" />


+ 15
- 114
BPASmartClient.JXJFoodSmallStation/View/DeviceMaterialParView.xaml View File

@@ -16,111 +16,11 @@
</UserControl.DataContext>

<UserControl.Resources>
<SolidColorBrush x:Key="tabColor" Color="#FF2AB2E7" />
<!--<SolidColorBrush x:Key="bordColor" Color="#33ffffff" />-->
<SolidColorBrush x:Key="bordColor" Color="#332AB2E7" />
<con:DataTableRedundantConverter x:Key="tabConvert" />

<Style x:Key="RowRadioButtonStyle" TargetType="{x:Type RadioButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RadioButton}">
<Border
x:Name="NvaBor"
Background="Transparent"
BorderBrush="#FF2AB2E7"
BorderThickness="0">
<ContentControl
Margin="10,4"
HorizontalAlignment="Center"
VerticalAlignment="Center"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
Content="{TemplateBinding Content}"
FontSize="16" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="NvaBor" Property="Background" Value="#22ffffff" />
<Setter TargetName="NvaBor" Property="BorderThickness" Value="0" />
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsChecked" Value="false" />
<Condition Property="IsMouseOver" Value="True" />
</MultiTrigger.Conditions>
<MultiTrigger.Setters>
<Setter TargetName="NvaBor" Property="Background" Value="#22ffffff" />
</MultiTrigger.Setters>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<Style x:Key="InputTextboxStyle" TargetType="TextBox">
<Setter Property="Margin" Value="5,0,0,0" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="Width" Value="150" />
<Setter Property="Height" Value="40" />
<Setter Property="CaretBrush" Value="{StaticResource TitleBorderColor}" />
<Setter Property="Foreground" Value="{StaticResource TitleBorderColor}" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>

<Style x:Key="ControlButtonStyle" TargetType="Button">
<Setter Property="Margin" Value="0" />
<Setter Property="FontSize" Value="18" />
<Setter Property="Foreground" Value="#FFF53F62" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="FontFamily" Value="楷体" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border
Name="TitleBarBr"
BorderBrush="#00c2f4"
BorderThickness="0"
CornerRadius="0"
Opacity="0.8">

<ContentPresenter
Margin="{TemplateBinding Margin}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
<Border.Background>
<ImageBrush
ImageSource="/BPASmartClient.CustomResource;component/Image/组合边框1.1.png"
Opacity="0.8"
Stretch="Fill" />
</Border.Background>

</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="TitleBarBr" Property="Opacity" Value="1" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<Style x:Key="TitleTextblockStyle" TargetType="TextBlock">
<Setter Property="FontSize" Value="16" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Foreground" Value="{StaticResource tabColor}" />
<Setter Property="FontFamily" Value="楷体" />
<Setter Property="FontWeight" Value="SemiBold" />
</Style>

<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/BPASmartClient.JXJFoodSmallStation;component/Resource/MyStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>

<Grid Margin="10">
@@ -342,9 +242,9 @@
Foreground="{Binding IsRedundant, Converter={StaticResource tabConvert}}"
Style="{StaticResource InputTextboxStyle}"
Text="{Binding StirringSpeed}" />
<Grid Grid.Column="9">
<TextBox
<TextBox
Foreground="Red"
Style="{StaticResource InputTextboxStyle}"
Text="{Binding ErrorRange}" />
@@ -354,13 +254,14 @@
Cursor="SizeWE" />
</Grid>

<Button Grid.Column="10"
Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
CommandParameter="{Binding MaterialName}"
Content="删除"
FontSize="16"
Style="{StaticResource ControlButtonStyle}" />
<Button
Grid.Column="10"
Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
CommandParameter="{Binding MaterialName}"
Content="删除"
FontSize="16"
Style="{StaticResource ControlButtonStyle}" />

<Border
Grid.ColumnSpan="11"
BorderBrush="{StaticResource bordColor}"


+ 2
- 2
BPASmartClient.JXJFoodSmallStation/View/ManualControlView.xaml View File

@@ -132,7 +132,7 @@
Content="Auto模式"
FontSize="20"
Foreground="Aqua"
IsChecked="False" />
IsChecked="{Binding AutoModeStatus}" />
<RadioButton
Grid.Row="1"
Grid.Column="1"
@@ -143,7 +143,7 @@
Content="Debug模式"
FontSize="20"
Foreground="Aqua"
IsChecked="false" />
IsChecked="{Binding ManualMode}" />
</Grid>

<Grid Grid.Column="3">


+ 1
- 1
BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml View File

@@ -11,7 +11,7 @@
Height="645"
AllowsTransparency="True"
Background="{x:Null}"
Topmost="false"
Topmost="True"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
mc:Ignorable="d">


+ 147
- 49
BPASmartClient.JXJFoodSmallStation/View/PlcVarMonitorView.xaml View File

@@ -1,92 +1,190 @@
<UserControl x:Class="BPASmartClient.JXJFoodSmallStation.View.PlcVarMonitorView"
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:vm="clr-namespace:BPASmartClient.JXJFoodSmallStation.ViewModel"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920">
<UserControl
x:Class="BPASmartClient.JXJFoodSmallStation.View.PlcVarMonitorView"
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:vm="clr-namespace:BPASmartClient.JXJFoodSmallStation.ViewModel"
d:DesignHeight="1080"
d:DesignWidth="1920"
mc:Ignorable="d">
<UserControl.DataContext>
<vm:PlcVarMonitorViewModel />
</UserControl.DataContext>
<Border BorderThickness="0" BorderBrush="{StaticResource bordColor}">
<Border BorderBrush="{StaticResource bordColor}" BorderThickness="0">
<Grid Margin="0,10">
<Grid.RowDefinitions>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition Height="60" />
<RowDefinition />
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"></ColumnDefinition>
<ColumnDefinition Width="8*"></ColumnDefinition>
<ColumnDefinition Width="4*"></ColumnDefinition>
<ColumnDefinition Width="4*"></ColumnDefinition>
<ColumnDefinition Width="8*"></ColumnDefinition>
<ColumnDefinition Width="5*"></ColumnDefinition>
<ColumnDefinition Width="17"></ColumnDefinition>
<ColumnDefinition Width="3*" />
<ColumnDefinition Width="8*" />
<ColumnDefinition Width="4*" />
<ColumnDefinition Width="4*" />
<ColumnDefinition Width="8*" />
<ColumnDefinition Width="5*" />
<ColumnDefinition Width="17" />
</Grid.ColumnDefinitions>
<Grid>
<TextBlock Text="序号" FontSize="32" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1,1,0,0" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="32"
Foreground="Aqua"
Text="序号" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,1,0,0"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="1">
<TextBlock Text="名称" FontSize="32" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1,1,0,0" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="32"
Foreground="Aqua"
Text="名称" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,1,0,0"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="2">
<TextBlock Text="地址" FontSize="32" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1,1,0,0" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="32"
Foreground="Aqua"
Text="地址" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,1,0,0"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="3">
<TextBlock Text="类型" FontSize="32" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1,1,0,0" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="32"
Foreground="Aqua"
Text="类型" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,1,0,0"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="4">
<TextBlock Text="描述" FontSize="32" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1,1,0,0" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="32"
Foreground="Aqua"
Text="描述" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,1,0,0"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="5">
<TextBlock Text="当前值" FontSize="32" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1,1,0,0" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="32"
Foreground="Aqua"
Text="当前值" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,1,0,0"
Cursor="SizeWE" />
</Grid>
</Grid>
<Grid Grid.Row="1">
<ScrollViewer>
<ItemsControl ItemsSource="{Binding plcInfos}" Foreground="Aqua">
<ItemsControl Foreground="Aqua" ItemsSource="{Binding plcInfos}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Name="gr">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"></ColumnDefinition>
<ColumnDefinition Width="8*"></ColumnDefinition>
<ColumnDefinition Width="4*"></ColumnDefinition>
<ColumnDefinition Width="4*"></ColumnDefinition>
<ColumnDefinition Width="8*"></ColumnDefinition>
<ColumnDefinition Width="5*"></ColumnDefinition>
<ColumnDefinition Width="3*" />
<ColumnDefinition Width="8*" />
<ColumnDefinition Width="4*" />
<ColumnDefinition Width="4*" />
<ColumnDefinition Width="8*" />
<ColumnDefinition Width="5*" />
</Grid.ColumnDefinitions>
<Grid>
<TextBlock Text="{Binding Count}" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="Aqua"
Text="{Binding Count}" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="1">
<TextBlock Text="{Binding Name}" FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="16"
Foreground="Aqua"
Text="{Binding Name}" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="2">
<TextBlock Text="{Binding Address}" FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="16"
Foreground="Aqua"
Text="{Binding Address}" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="3">
<TextBlock Text="{Binding Type}" FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="16"
Foreground="Aqua"
Text="{Binding Type}" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="4">
<TextBlock Text="{Binding Describe}" FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="16"
Foreground="Aqua"
Text="{Binding Describe}" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="5">
<TextBlock Text="{Binding Value}" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="Aqua"
Text="{Binding Value}" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1"
Cursor="SizeWE" />
</Grid>
</Grid>
<DataTemplate.Triggers>


+ 131
- 44
BPASmartClient.JXJFoodSmallStation/View/ProcessMonitorView.xaml View File

@@ -1,83 +1,170 @@
<UserControl x:Class="BPASmartClient.JXJFoodSmallStation.View.ProcessMonitorView"
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.JXJFoodSmallStation.View"
xmlns:vm="clr-namespace:BPASmartClient.JXJFoodSmallStation.ViewModel"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920">
<UserControl
x:Class="BPASmartClient.JXJFoodSmallStation.View.ProcessMonitorView"
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.JXJFoodSmallStation.View"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:BPASmartClient.JXJFoodSmallStation.ViewModel"
d:DesignHeight="1080"
d:DesignWidth="1920"
mc:Ignorable="d">
<UserControl.DataContext>
<vm:ProcessMonitorViewModel />
</UserControl.DataContext>
<Border BorderThickness="0" BorderBrush="{StaticResource bordColor}">
<Border BorderBrush="{StaticResource bordColor}" BorderThickness="0">
<Grid Margin="0,10">
<Grid.RowDefinitions>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition Height="60" />
<RowDefinition />
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"></ColumnDefinition>
<ColumnDefinition Width="4*"></ColumnDefinition>
<ColumnDefinition Width="4*"></ColumnDefinition>
<ColumnDefinition Width="12*"></ColumnDefinition>
<ColumnDefinition Width="6*"></ColumnDefinition>
<ColumnDefinition Width="17"></ColumnDefinition>
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="4*" />
<ColumnDefinition Width="4*" />
<ColumnDefinition Width="12*" />
<ColumnDefinition Width="6*" />
<ColumnDefinition Width="17" />
</Grid.ColumnDefinitions>
<Grid>
<TextBlock Text="序号" FontSize="32" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1,1,0,0" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="32"
Foreground="Aqua"
Text="序号" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,1,0,0"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="1">
<TextBlock Text="名称" FontSize="32" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1,1,0,0" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="32"
Foreground="Aqua"
Text="名称" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,1,0,0"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="2">
<TextBlock Text="类型" FontSize="32" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1,1,0,0" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="32"
Foreground="Aqua"
Text="类型" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,1,0,0"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="3">
<TextBlock Text="描述" FontSize="32" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1,1,0,0" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="32"
Foreground="Aqua"
Text="描述" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,1,0,0"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="4">
<TextBlock Text="当前值" FontSize="32" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1,1,0,0" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="32"
Foreground="Aqua"
Text="当前值" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,1,0,0"
Cursor="SizeWE" />
</Grid>
</Grid>
<Grid Grid.Row="1">
<ScrollViewer>
<ItemsControl ItemsSource="{Binding plcInfos}" Foreground="Aqua">
<ItemsControl Foreground="Aqua" ItemsSource="{Binding plcInfos}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"></ColumnDefinition>
<ColumnDefinition Width="4*"></ColumnDefinition>
<ColumnDefinition Width="4*"></ColumnDefinition>
<ColumnDefinition Width="12*"></ColumnDefinition>
<ColumnDefinition Width="6*"></ColumnDefinition>
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="4*" />
<ColumnDefinition Width="4*" />
<ColumnDefinition Width="12*" />
<ColumnDefinition Width="6*" />
</Grid.ColumnDefinitions>
<Grid>
<TextBlock Margin="5" Text="{Binding Count}" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
Margin="5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="Aqua"
Text="{Binding Count}" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="1">
<TextBlock Margin="5" Text="{Binding Name}" FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
Margin="5"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="16"
Foreground="Aqua"
Text="{Binding Name}" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="2">
<TextBlock Margin="5" Text="{Binding Type}" FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
Margin="5"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="16"
Foreground="Aqua"
Text="{Binding Type}" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="3">
<TextBlock Margin="5" Text="{Binding Describe}" FontSize="14" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
Margin="5"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Foreground="Aqua"
Text="{Binding Describe}" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="4">
<TextBlock Margin="5" Text="{Binding Value}" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"></TextBlock>
<Border BorderThickness="1" Cursor="SizeWE" BorderBrush="{StaticResource bordColor}"></Border>
<TextBlock
Margin="5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="Aqua"
Text="{Binding Value}" />
<Border
BorderBrush="{StaticResource bordColor}"
BorderThickness="1"
Cursor="SizeWE" />
</Grid>
</Grid>
</DataTemplate>


+ 125
- 37
BPASmartClient.JXJFoodSmallStation/View/RecipeInfosView.xaml View File

@@ -52,9 +52,10 @@
</ResourceDictionary>
</Window.Resources>

<Border Name="br"
<Border
Name="br"
BorderBrush="#0CADF5"
BorderThickness="1" >
BorderThickness="1">
<Border.Background>
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
</Border.Background>
@@ -69,63 +70,150 @@
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<WrapPanel>
<TextBlock Margin="10,10" Background="Transparent" FontSize="16" Foreground="#FF2AB2E7" Text="配方名称:" />
<TextBlock Margin="10,10" Background="Transparent" FontSize="16" Foreground="#FF2AB2E7" Text="{Binding RecipeName}" />
<TextBlock
Margin="10,10"
Background="Transparent"
FontSize="16"
Foreground="#FF2AB2E7"
Text="配方名称:" />
<TextBlock
Margin="10,10"
Background="Transparent"
FontSize="16"
Foreground="#FF2AB2E7"
Text="{Binding RecipeName}" />
</WrapPanel>
<WrapPanel Grid.Column="1">
<TextBlock Margin="10,10" Background="Transparent" FontSize="16" Foreground="#FF2AB2E7" Text="配方编号:" />
<TextBlock Margin="10,10" Background="Transparent" FontSize="16" Foreground="#FF2AB2E7" Text="{Binding RecipeCode}" />
<TextBlock
Margin="10,10"
Background="Transparent"
FontSize="16"
Foreground="#FF2AB2E7"
Text="配方编号:" />
<TextBlock
Margin="10,10"
Background="Transparent"
FontSize="16"
Foreground="#FF2AB2E7"
Text="{Binding RecipeCode}" />
</WrapPanel>

<WrapPanel Grid.Row="1">
<TextBlock Margin="10,0,0,0" Background="Transparent" FontSize="16" Foreground="#FF2AB2E7" Text="托盘编号:" />
<TextBlock Grid.Row="1" Margin="10,10" Background="Transparent" FontSize="16" Foreground="#FF2AB2E7" Text="{Binding TrayCode}" />
<TextBlock
Margin="10,0,0,0"
Background="Transparent"
FontSize="16"
Foreground="#FF2AB2E7"
Text="托盘编号:" />
<TextBlock
Grid.Row="1"
Margin="10,10"
Background="Transparent"
FontSize="16"
Foreground="#FF2AB2E7"
Text="{Binding TrayCode}" />

</WrapPanel>
<Button Grid.Column="1" Grid.Row="1" Width="100" Command="{Binding ReturnPage}" HorizontalAlignment="Left" Margin="10,0,0,0">返回</Button>
<Button
Grid.Row="1"
Grid.Column="1"
Width="100"
Margin="10,0,0,0"
HorizontalAlignment="Left"
Command="{Binding ReturnPage}">
返回
</Button>
</Grid>
<Grid Grid.Row="3">
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="20"></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition Height="20" />
<RowDefinition />
</Grid.RowDefinitions>
<Grid Grid.Row="0" >
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<TextBlock FontSize="16" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Top">原料名称</TextBlock>
<TextBlock FontSize="16" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Top">原料位置</TextBlock>
<TextBlock FontSize="16" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Top">原料桶号</TextBlock>
<TextBlock FontSize="16" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Top">原料重量</TextBlock>
<TextBlock
Grid.Column="0"
HorizontalAlignment="Center"
VerticalAlignment="Top"
FontSize="16">
原料名称
</TextBlock>
<TextBlock
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
FontSize="16">
原料位置
</TextBlock>
<TextBlock
Grid.Column="2"
HorizontalAlignment="Center"
VerticalAlignment="Top"
FontSize="16">
原料桶号
</TextBlock>
<TextBlock
Grid.Column="3"
HorizontalAlignment="Center"
VerticalAlignment="Top"
FontSize="16">
原料重量
</TextBlock>
</Grid>
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Hidden" >
<ItemsControl ItemsSource="{Binding RawMaterialsInfo}" Width="548" >
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Hidden">
<ItemsControl Width="548" ItemsSource="{Binding RawMaterialsInfo}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid x:Name="grb" Height="25" >
<Grid x:Name="grb" Height="25">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RawMaterialName}"></TextBlock>
<TextBlock Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RawMaterialLocation}"></TextBlock>
<TextBlock Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RawMaterialBarrelNum}"></TextBlock>
<TextBlock Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RawMaterialWeight}"></TextBlock>
<TextBlock
Grid.Column="0"
HorizontalAlignment="Center"
VerticalAlignment="Top"
FontSize="20"
Foreground="#FF2AB2E7"
Text="{Binding RawMaterialName}" />
<TextBlock
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Top"
FontSize="20"
Foreground="#FF2AB2E7"
Text="{Binding RawMaterialLocation}" />
<TextBlock
Grid.Column="2"
HorizontalAlignment="Center"
VerticalAlignment="Top"
FontSize="20"
Foreground="#FF2AB2E7"
Text="{Binding RawMaterialBarrelNum}" />
<TextBlock
Grid.Column="3"
HorizontalAlignment="Center"
VerticalAlignment="Top"
FontSize="20"
Foreground="#FF2AB2E7"
Text="{Binding RawMaterialWeight}" />
</Grid>
<DataTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">


+ 15
- 9
BPASmartClient.JXJFoodSmallStation/View/RecipeReceiveView.xaml View File

@@ -45,34 +45,40 @@

<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="50" />
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<CheckBox
x:Name="NotUseSmallDosing"
Margin="0,0,10,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Content="不使用小料站配料"
FontFamily="楷体"
VerticalAlignment="Center"
FontSize="20"
Foreground="Aqua"
IsChecked="{Binding NotUseSmallDosing}" />
<CheckBox
x:Name="IsUseWindSend"
Margin="0,0,10,0"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Content="使用粉料仓配料"
FontFamily="楷体"
VerticalAlignment="Center"
FontSize="20"
Foreground="Aqua"
IsChecked="{Binding IsUseWindSendDosing}" />
<CheckBox
x:Name="IsUseStockBin"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Content="本地小料仓配方配料"
FontFamily="楷体"
VerticalAlignment="Center"
FontSize="20"
Foreground="Aqua"
IsChecked="{Binding IsUseLocalRecipe}"/>
<pry:IcoButton
IsChecked="{Binding IsUseLocalRecipe}" />
<pry:IcoButton
Width="140"
Margin="10"
HorizontalAlignment="Right"
@@ -82,7 +88,7 @@
Foreground="Aqua"
IcoText="&#xe626;"
Style="{StaticResource IcoButtonStyle}" />
<pry:IcoButton
<pry:IcoButton
Width="140"
Margin="10"
HorizontalAlignment="Right"
@@ -93,7 +99,7 @@
IcoText="&#xe626;"
Style="{StaticResource IcoButtonStyle}" />

<pry:IcoButton
<pry:IcoButton
Width="140"
Margin="10"
HorizontalAlignment="Right"


+ 3
- 3
BPASmartClient.JXJFoodSmallStation/View/SiemensRecipeReceiveView.xaml View File

@@ -45,10 +45,10 @@

<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="50" />
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<pry:IcoButton
Grid.Column="3"
Width="140"
@@ -115,7 +115,7 @@
Foreground="#dd000000"
Text="{Binding TrayCode}" />
</WrapPanel>
<Grid
Name="gr"
Grid.Row="2"


+ 119
- 86
BPASmartClient.JXJFoodSmallStation/View/StockBinRawMaterialView.xaml View File

@@ -1,43 +1,58 @@
<UserControl x:Class="BPASmartClient.JXJFoodSmallStation.View.StockBinRawMaterialView"
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.JXJFoodSmallStation.ViewModel"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920">
<UserControl
x:Class="BPASmartClient.JXJFoodSmallStation.View.StockBinRawMaterialView"
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.JXJFoodSmallStation.ViewModel"
d:DesignHeight="1080"
d:DesignWidth="1920"
mc:Ignorable="d">
<UserControl.DataContext>
<vm:StockBinRawMaterialViewModel />
</UserControl.DataContext>

<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/BPASmartClient.JXJFoodSmallStation;component/Resource/MyStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>

<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="60" />
<RowDefinition Height="40" />
<RowDefinition Height="50" />
<RowDefinition />
</Grid.RowDefinitions>
<!--#region 表格标题栏设置-->
<Grid>
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal">
<StackPanel
HorizontalAlignment="Right"
VerticalAlignment="Center"
Orientation="Horizontal">
<Button
Width="150"
Height="50"
Margin="5"
Command="{Binding UpdateRawMaterial}"
Content="新增数据"
FontSize="28"
Foreground="Aqua"
Style="{StaticResource ImageButtonStyle}" />
Foreground="DeepSkyBlue"
Style="{StaticResource ImageButtonStyle}" />
<Button
Width="150"
Height="50"
Margin="5"
Command="{Binding SaveRawMaterialPara}"
Content="保存参数"
FontSize="28"
Foreground="Aqua"
Style="{StaticResource ImageButtonStyle}"/>
Foreground="DeepSkyBlue"
Style="{StaticResource ImageButtonStyle}" />
</StackPanel>
</Grid>
<Grid
Grid.Row="1"
@@ -45,87 +60,105 @@
Background="#ff0C255F">

<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<TextBlock Text="序号" FontSize="24" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"/>
<Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
</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="0"
FontSize="24"
Style="{StaticResource TitleTextblockStyle}"
Text="序号" />

<TextBlock
Grid.Column="1"
FontSize="24"
Style="{StaticResource TitleTextblockStyle}"
Text="料仓位置" />

<TextBlock
Grid.Column="2"
FontSize="24"
Style="{StaticResource TitleTextblockStyle}"
Text="原料编号" />

<TextBlock
Grid.Column="3"
FontSize="24"
Style="{StaticResource TitleTextblockStyle}"
Text="编辑" />

<Border
Grid.Column="0"
Grid.ColumnSpan="4"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,1,1,1" />
<Border
Grid.Column="1"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0" />
<Border
Grid.Column="3"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0" />


</Grid>
<Grid Grid.Row="2">
<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" >
<ItemsControl ItemsSource="{Binding RawMaterialInfo}" Foreground="Aqua">
<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
<ItemsControl Foreground="DeepSkyBlue" ItemsSource="{Binding RawMaterialInfo}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Name="gr" >
<Grid Name="gr">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" Margin="5">
<TextBlock
FontSize="16"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding RawMaterialCount}" />
<Border
BorderThickness="1,0,1,0"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="1" Margin="5">
<TextBox
Width="50"
FontSize="16"
TextAlignment="Center"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding RawMaterialLocation}" />
<Border
BorderThickness="1,0,1,0"
Cursor="SizeWE" />

</Grid>
<Grid Grid.Column="2" Margin="5">
<TextBox
Width="50"
FontSize="16"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding RawMaterialName}" />
<Border
BorderThickness="1,0,1,0"
Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="3">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<pry:IcoButton
Margin="3,4,4,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Background="#11F53F62"
BorderThickness="0"
Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
CommandParameter="{Binding RawMaterialLocation}"
Content="删除"
EnterBackground="#22F53F62"
Foreground="#FFF53F62"
IcoText="&#xe68e;"
Style="{StaticResource IcoButtonStyle}" />
</StackPanel>
</Grid>

<TextBlock
Grid.Column="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Text="{Binding RawMaterialCount}" />

<TextBox
Grid.Column="1"
Style="{StaticResource InputTextboxStyle}"
Text="{Binding RawMaterialLocation}" />

<TextBox
Grid.Column="2"
Style="{StaticResource InputTextboxStyle}"
Text="{Binding RawMaterialName}" />

<Button
Grid.Column="3"
Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
CommandParameter="{Binding RawMaterialLocation}"
Content="删除"
FontSize="16"
Style="{StaticResource ControlButtonStyle}" />

<Border
Grid.Column="0"
Grid.ColumnSpan="4"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,1" />
<Border
Grid.Column="1"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0" />
<Border
Grid.Column="3"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0" />
</Grid>

<DataTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="gr" Property="Background" Value="#112AB2E7" />


+ 110
- 36
BPASmartClient.JXJFoodSmallStation/View/SystemParView.xaml View File

@@ -131,8 +131,8 @@
</Grid.RowDefinitions>

<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>

<Button
@@ -154,70 +154,144 @@
Content="下发参数"
FontSize="24"
Style="{StaticResource ImageButtonStyle}" />
<StackPanel Orientation="Vertical" HorizontalAlignment="Left" Grid.Row="1"
Margin="10,0,10,0" >
<StackPanel
Grid.Row="1"
Margin="10,0,10,0"
HorizontalAlignment="Left"
Orientation="Vertical">
<CheckBox
Margin="0,10,10,0"
VerticalAlignment="Center"
Content="西门子设备连接"
FontFamily="楷体"
VerticalAlignment="Center"
FontSize="20"
Foreground="Aqua"
IsChecked="{Binding SiemensConnect}" />
<CheckBox
Margin="0,10,10,0"
VerticalAlignment="Center"
Content="粉料仓设备连接"
FontFamily="楷体"
FontSize="20"
VerticalAlignment="Center"
Foreground="Aqua"
IsChecked="{Binding WindSendConnect}"/>
IsChecked="{Binding WindSendConnect}" />
<CheckBox
Margin="0,10,10,0"
VerticalAlignment="Center"
Content="小料站产线PLC设备连接"
FontFamily="楷体"
FontSize="20"
VerticalAlignment="Center"
Foreground="Aqua"
IsChecked="{Binding HKPlcConnect}"/>
IsChecked="{Binding HKPlcConnect}" />

</StackPanel>
<Grid Grid.Row="1" Grid.Column="1" VerticalAlignment="Top">
<Grid
Grid.Row="1"
Grid.Column="1"
VerticalAlignment="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="37*" ></ColumnDefinition>
<ColumnDefinition Width="163*"/>
<ColumnDefinition Width="37*" />
<ColumnDefinition Width="163*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<WrapPanel Grid.ColumnSpan="2" Margin="0,0,0,38">
<TextBlock Margin="10" FontSize="16" Foreground="Aqua" Text="调速电机速度(进桶侧)" />
<TextBox Width="50" Margin="10" FontSize="16" Text="{Binding AxisLoadSpeed}"/>
<TextBlock FontSize="16" Foreground="Aqua" Text="" />
<TextBlock
Margin="10"
FontSize="16"
Foreground="Aqua"
Text="调速电机速度(进桶侧)" />
<TextBox
Width="50"
Margin="10"
FontSize="16"
Text="{Binding AxisLoadSpeed}" />
<TextBlock
FontSize="16"
Foreground="Aqua"
Text="" />
</WrapPanel>
<WrapPanel Grid.ColumnSpan="2" Margin="0,42,0,75" Grid.RowSpan="2">
<TextBlock Margin="10" FontSize="16" Foreground="Aqua" Text="调速电机速度(过渡侧)" />
<TextBox Width="50" Margin="10" FontSize="16" Text="{Binding AxisMidSpeed}" />
<TextBlock FontSize="16" Foreground="Aqua" Text="" />
<WrapPanel
Grid.RowSpan="2"
Grid.ColumnSpan="2"
Margin="0,42,0,75">
<TextBlock
Margin="10"
FontSize="16"
Foreground="Aqua"
Text="调速电机速度(过渡侧)" />
<TextBox
Width="50"
Margin="10"
FontSize="16"
Text="{Binding AxisMidSpeed}" />
<TextBlock
FontSize="16"
Foreground="Aqua"
Text="" />
</WrapPanel>
<WrapPanel Grid.Row="1" Grid.ColumnSpan="2" Margin="0,5,0,33">
<TextBlock Margin="10" FontSize="16" Foreground="Aqua" Text="调速电机速度(出桶侧)" />
<TextBox Width="50" Margin="10" FontSize="16" Text="{Binding AxisUnLoadSpeed}" />
<TextBlock FontSize="16" Foreground="Aqua" Text="" />
<WrapPanel
Grid.Row="1"
Grid.ColumnSpan="2"
Margin="0,5,0,33">
<TextBlock
Margin="10"
FontSize="16"
Foreground="Aqua"
Text="调速电机速度(出桶侧)" />
<TextBox
Width="50"
Margin="10"
FontSize="16"
Text="{Binding AxisUnLoadSpeed}" />
<TextBlock
FontSize="16"
Foreground="Aqua"
Text="" />
</WrapPanel>
<WrapPanel Grid.Row="1" Grid.ColumnSpan="2" Margin="0,47,0,71" Grid.RowSpan="2">
<TextBlock Margin="10" FontSize="16" Foreground="Aqua" Text="伺服1速度(进桶侧)" />
<TextBox Width="50" Margin="10" FontSize="16" Text="{Binding Axis1Speed}" />
<TextBlock FontSize="16" Foreground="Aqua" Text="" />
<WrapPanel
Grid.Row="1"
Grid.RowSpan="2"
Grid.ColumnSpan="2"
Margin="0,47,0,71">
<TextBlock
Margin="10"
FontSize="16"
Foreground="Aqua"
Text="伺服1速度(进桶侧)" />
<TextBox
Width="50"
Margin="10"
FontSize="16"
Text="{Binding Axis1Speed}" />
<TextBlock
FontSize="16"
Foreground="Aqua"
Text="" />
</WrapPanel>
<WrapPanel Grid.Row="2" Grid.ColumnSpan="2" Margin="0,9,0,28" >
<TextBlock Margin="10" FontSize="16" Foreground="Aqua" Text="伺服2速度(出桶侧)" />
<TextBox Width="50" Margin="10" FontSize="16" Text="{Binding Axis2Speed}" />
<TextBlock FontSize="16" Foreground="Aqua" Text="" />
<WrapPanel
Grid.Row="2"
Grid.ColumnSpan="2"
Margin="0,9,0,28">
<TextBlock
Margin="10"
FontSize="16"
Foreground="Aqua"
Text="伺服2速度(出桶侧)" />
<TextBox
Width="50"
Margin="10"
FontSize="16"
Text="{Binding Axis2Speed}" />
<TextBlock
FontSize="16"
Foreground="Aqua"
Text="" />
</WrapPanel>
</Grid>
</Grid>


+ 125
- 43
BPASmartClient.JXJFoodSmallStation/View/WindSendParView.xaml View File

@@ -6,8 +6,8 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BPASmartClient.JXJFoodSmallStation.View"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:BPASmartClient.JXJFoodSmallStation.ViewModel"
xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
xmlns:vm="clr-namespace:BPASmartClient.JXJFoodSmallStation.ViewModel"
d:DesignHeight="1080"
d:DesignWidth="1920"
mc:Ignorable="d">
@@ -16,6 +16,14 @@
<vm:WindSendParViewModel />
</UserControl.DataContext>

<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/BPASmartClient.JXJFoodSmallStation;component/Resource/MyStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>

<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="60" />
@@ -24,7 +32,10 @@
</Grid.RowDefinitions>
<!--#region 表格标题栏设置-->
<Grid>
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal">
<StackPanel
HorizontalAlignment="Right"
VerticalAlignment="Center"
Orientation="Horizontal">
<!--<pry:IcoButton
Margin="10"
Command="{Binding UpdateRawMaterial}"
@@ -32,13 +43,22 @@
FontSize="28"
Foreground="Aqua"
Style="{StaticResource IcoButtonStyle}" />-->
<pry:IcoButton
<Button
Width="150"
Height="50"
Margin="5"
Command="{Binding SaveRawMaterialPara}"
Content="保存参数"
FontSize="28"
Foreground="DeepSkyBlue"
Style="{StaticResource ImageButtonStyle}" />
<!--<pry:IcoButton
Margin="10"
Command="{Binding SaveRawMaterialPara}"
Content="保存参数"
FontSize="28"
Foreground="Aqua"
Style="{StaticResource IcoButtonStyle}" />
Style="{StaticResource IcoButtonStyle}" />-->
</StackPanel>

</Grid>
@@ -48,79 +68,141 @@
Background="#ff0C255F">

<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<TextBlock Text="序号" FontSize="24" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"/>
<Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
</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="0"
FontSize="24"
Style="{StaticResource TitleTextblockStyle}"
Text="序号" />

<TextBlock
Grid.Column="1"
FontSize="24"
Style="{StaticResource TitleTextblockStyle}"
Text="料仓位置" />

<TextBlock
Grid.Column="2"
FontSize="24"
Style="{StaticResource TitleTextblockStyle}"
Text="原料编号" />

<TextBlock
Grid.Column="3"
FontSize="24"
Style="{StaticResource TitleTextblockStyle}"
Text="原料名称" />

<TextBlock Grid.Column="3" FontSize="24" Text="原料名称" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
<Border
Grid.Column="0"
Grid.ColumnSpan="4"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,1,1,1" />
<Border
Grid.Column="1"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0" />
<Border
Grid.Column="3"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0" />
</Grid>
<Grid Grid.Row="2">
<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" >
<ItemsControl ItemsSource="{Binding WindSendRawMaterial}" Foreground="Aqua">
<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
<ItemsControl Foreground="DeepSkyBlue" ItemsSource="{Binding WindSendRawMaterial}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Name="gr" >
<Grid Name="gr">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" Margin="5">

<TextBlock
Grid.Column="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Text="{Binding Location}" />

<TextBlock
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Text="{Binding Location}" />

<TextBox
Grid.Column="2"
Style="{StaticResource InputTextboxStyle}"
Text="{Binding RawMaterialName}" />

<TextBlock
Grid.Column="3"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Text="{Binding RawMaterialChineseName}" />

<Border
Grid.Column="0"
Grid.ColumnSpan="4"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,1" />
<Border
Grid.Column="1"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0" />
<Border
Grid.Column="3"
BorderBrush="{StaticResource bordColor}"
BorderThickness="1,0,1,0" />

<!--<Grid Grid.Column="0" Margin="5">
<TextBlock
FontSize="16"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding Location}" />
<Border
BorderThickness="1,0,1,0"
Cursor="SizeWE" />
FontSize="16"
Text="{Binding Location}" />
<Border BorderThickness="1,0,1,0" Cursor="SizeWE" />

</Grid>
<Grid Grid.Column="1" Margin="5">
<TextBlock
Width="50"
FontSize="16"
TextAlignment="Center"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding Location}" />
<Border
BorderThickness="1,0,1,0"
Cursor="SizeWE" />
FontSize="16"
Text="{Binding Location}"
TextAlignment="Center" />
<Border BorderThickness="1,0,1,0" Cursor="SizeWE" />

</Grid>
<Grid Grid.Column="2" Margin="5">
<TextBox
Name="name"
Width="50"
FontSize="16"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding RawMaterialName}"/>
<Border
BorderThickness="1,0,1,0"
Cursor="SizeWE" />
VerticalAlignment="Center"
FontSize="16"
Text="{Binding RawMaterialName}" />
<Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
</Grid>
<Grid Grid.Column="3" Margin="5">
<TextBlock
FontSize="16"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding RawMaterialChineseName}" />
<Border
BorderThickness="1,0,1,0"
Cursor="SizeWE" />
</Grid>
VerticalAlignment="Center"
FontSize="16"
Text="{Binding RawMaterialChineseName}" />
<Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
</Grid>-->
</Grid>
<DataTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">


+ 71
- 20
BPASmartClient.JXJFoodSmallStation/ViewModel/ManualControlViewModel.cs View File

@@ -22,19 +22,21 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
{
ThreadManage.GetInstance().StartLong(new Action(() =>
{
SystemMode = GVL_SmallStation.GetInstance.PlcSystemMode ? "手动" : "自动";
if (GVL_SmallStation.GetInstance.PlcSystemMode) ManualMode = true;
else AutoModeStatus = true;
PlcSystemMode = GVL_SmallStation.GetInstance.PlcSystemMode;
//SystemMode = GVL_SmallStation.GetInstance.PlcSystemMode ? "手动" : "自动";
//if (GVL_SmallStation.GetInstance.PlcSystemMode) ManualMode = true;
//else AutoModeStatus = true;
if (GVL_SmallStation.GetInstance.PlcSystemIsAutoRun)
{
if (GVL_SmallStation.GetInstance.PlcSystemIsPause)
{
SystemStatus = "暂停";
}
else
{
SystemStatus = "运行";
}
SystemStatus = GVL_SmallStation.GetInstance.PlcSystemIsPause ? "暂停" : "运行";
//if (GVL_SmallStation.GetInstance.PlcSystemIsPause)
//{
// SystemStatus = "暂停";
//}
//else
//{
// SystemStatus = "运行";
//}
}
else
{
@@ -288,11 +290,11 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
});
DebugMode = new RelayCommand(() =>
{
ActionManage.GetInstance.Send("SystemDebugMode");
// ActionManage.GetInstance.Send("SystemDebugMode");
});
AutoMode = new RelayCommand(() =>
{
ActionManage.GetInstance.Send("SystemAutoMode");
// ActionManage.GetInstance.Send("SystemAutoMode");
});
}

@@ -341,24 +343,73 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel
public RelayCommand SystemStopCommand { get; set; }
public RelayCommand SystemPauseCommand { get; set; }



public RelayCommand SystemResetCommand { get; set; }

public RelayCommand AutoMode { get; set; }
public RelayCommand DebugMode { get; set; }

/// <summary>
/// 系统模式改变
/// </summary>
public static bool PlcSystemMode
{
get { return _mPlcSystemMode; }
set
{
if (_mPlcSystemMode != value || string.IsNullOrEmpty(SystemMode))
{
_mPlcSystemMode = value;
SystemMode = value ? "手动" : "自动";
if (value) ManualMode = true;
else AutoModeStatus = true;
}

public bool AutoModeStatus { get { return _mAutoModeStatus; } set { _mAutoModeStatus = value; OnPropertyChanged(); } }
private bool _mAutoModeStatus;

public bool ManualMode { get { return _mManualMode; } set { _mManualMode = value; OnPropertyChanged(); } }
private bool _mManualMode;
}
}
private static bool _mPlcSystemMode;


/// <summary>
/// 自动模式
/// </summary>
public static bool AutoModeStatus
{
get { return _mAutoModeStatus; }
set
{
if (_mAutoModeStatus != value || (!_mAutoModeStatus && !_mManualMode))
{
if (value)
ProcessControl.GetInstance.HKDevice.HK_PLC_S7.Write<bool>("DB44.DBX0.1", false);
_mAutoModeStatus = value;
OnStaticPropertyChanged();
}
}
}
private static bool _mAutoModeStatus;

/// <summary>
/// 手动模式
/// </summary>
public static bool ManualMode
{
get { return _mManualMode; }
set
{
if (_mManualMode != value || (!_mAutoModeStatus && !_mManualMode))
{
if (value)
ProcessControl.GetInstance.HKDevice.HK_PLC_S7.Write<bool>("DB44.DBX0.1", true);
_mManualMode = value;
OnStaticPropertyChanged();
}
}
}
private static bool _mManualMode;
}



public class CylinderModel : ObservableObject
{
public bool LeftTog { get { return _mLeftTog; } set { _mLeftTog = value; OnPropertyChanged(); } }


Loading…
Cancel
Save