@@ -213,6 +213,14 @@ | |||
<None Remove="Image\背景矢量\左下.png" /> | |||
<None Remove="Image\背景矢量\矢量智能对象.png" /> | |||
<None Remove="Image\背景边框4.png" /> | |||
<None Remove="Image\荧光\29.png" /> | |||
<None Remove="Image\荧光\发光.png" /> | |||
<None Remove="Image\荧光\向下箭头.png" /> | |||
<None Remove="Image\荧光\底座.png" /> | |||
<None Remove="Image\荧光\矩形发光.png" /> | |||
<None Remove="Image\荧光\立体三角.png" /> | |||
<None Remove="Image\荧光\蓝色提示框.png" /> | |||
<None Remove="Image\荧光\返回.png" /> | |||
<None Remove="Image\营销额.png" /> | |||
<None Remove="Image\蓝色背景.png" /> | |||
<None Remove="Image\蓝边框.png" /> | |||
@@ -356,6 +364,14 @@ | |||
<Resource Include="Image\背景3.jpg" /> | |||
<Resource Include="Image\背景框.png" /> | |||
<Resource Include="Image\背景边框4.png" /> | |||
<Resource Include="Image\荧光\29.png" /> | |||
<Resource Include="Image\荧光\发光.png" /> | |||
<Resource Include="Image\荧光\向下箭头.png" /> | |||
<Resource Include="Image\荧光\底座.png" /> | |||
<Resource Include="Image\荧光\矩形发光.png" /> | |||
<Resource Include="Image\荧光\立体三角.png" /> | |||
<Resource Include="Image\荧光\蓝色提示框.png" /> | |||
<Resource Include="Image\荧光\返回.png" /> | |||
<Resource Include="Image\蓝色背景.png" /> | |||
<Resource Include="Image\蓝边框.png" /> | |||
<Resource Include="Image\调味品.jpeg" /> | |||
@@ -0,0 +1,28 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Globalization; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using System.Windows; | |||
using System.Windows.Data; | |||
namespace BPASmartClient.CustomResource.Converters | |||
{ | |||
public class BoolToVisibilityConvert : IValueConverter | |||
{ | |||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | |||
{ | |||
if (value != null && value is bool tempBool) | |||
{ | |||
return tempBool ? Visibility.Visible : Visibility.Hidden; | |||
} | |||
return default; | |||
} | |||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | |||
{ | |||
throw new NotImplementedException(); | |||
} | |||
} | |||
} |
@@ -25,6 +25,7 @@ | |||
<con:VisibleTypeConverter x:Key="VisibleTypeConverter" /> | |||
<con:StatusConverter x:Key="StatusConverter" /> | |||
<con:StringToIconConverter x:Key="StringToIconConverter" /> | |||
<con:BoolToVisibilityConvert x:Key="BoolToVisibilityConvert" /> | |||
</ResourceDictionary> | |||
<ResourceDictionary> | |||
@@ -3,6 +3,7 @@ using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using System.Windows; | |||
using Microsoft.Toolkit.Mvvm.ComponentModel; | |||
namespace BPASmartClient.DosingSystem | |||
@@ -42,8 +43,8 @@ namespace BPASmartClient.DosingSystem | |||
/// <summary> | |||
/// 仓盖是否被打开 | |||
/// </summary> | |||
public string IsOpen { get { return _mIsOpen; } set { _mIsOpen = value; OnPropertyChanged(); } } | |||
private string _mIsOpen; | |||
public bool IsOpen { get { return _mIsOpen; } set { _mIsOpen = value; OnPropertyChanged(); } } | |||
private bool _mIsOpen; | |||
/// <summary> | |||
/// 料仓时候有报警 | |||
@@ -51,5 +52,7 @@ namespace BPASmartClient.DosingSystem | |||
public bool IsFault { get { return _mIsFault; } set { _mIsFault = value; OnPropertyChanged(); } } | |||
private bool _mIsFault; | |||
} | |||
} |
@@ -18,9 +18,9 @@ | |||
<Grid> | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="0.5*" /> | |||
<RowDefinition Height="0.6*" /> | |||
<RowDefinition /> | |||
<RowDefinition Height="0.5*" /> | |||
<RowDefinition Height="0.6*" /> | |||
</Grid.RowDefinitions> | |||
<!--#region 顶部料仓--> | |||
@@ -50,19 +50,20 @@ | |||
<Grid.RowDefinitions> | |||
<RowDefinition /> | |||
<RowDefinition /> | |||
<RowDefinition Height="0.6*" /> | |||
</Grid.RowDefinitions> | |||
<TextBlock | |||
<!--<TextBlock | |||
Margin="0,0,0,35" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Bottom" | |||
FontSize="25" | |||
Foreground="#ffccd61f" | |||
Text="{Binding DeviceName}" /> | |||
Text="{Binding DeviceName}" />--> | |||
<StackPanel | |||
Grid.Row="1" | |||
Margin="0,25,0,0" | |||
Margin="0,2,0,0" | |||
HorizontalAlignment="Center" | |||
Orientation="Horizontal"> | |||
<TextBlock | |||
@@ -76,10 +77,9 @@ | |||
Text=" kg" /> | |||
</StackPanel> | |||
<StackPanel | |||
Grid.Row="1" | |||
Margin="0,70,0,0" | |||
Margin="0,28,0,0" | |||
HorizontalAlignment="Center" | |||
Orientation="Horizontal"> | |||
<TextBlock | |||
@@ -93,6 +93,88 @@ | |||
Text=" 号仓" /> | |||
</StackPanel> | |||
<TextBlock | |||
Grid.Row="1" | |||
Margin="0,50,0,0" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
FontSize="20" | |||
Foreground="#FF0084FF" | |||
Text="{Binding DeviceName}" /> | |||
<StackPanel Grid.Row="2" Orientation="Horizontal"> | |||
<StackPanel> | |||
<ToggleButton | |||
Width="80" | |||
Height="30" | |||
Margin="5,0,5,0" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
Background="Transparent" | |||
FontSize="20" | |||
IsChecked="{Binding IsOpen}" | |||
Style="{StaticResource SwitchToggleButtonStyle}" /> | |||
<TextBlock | |||
Margin="0,5,0,0" | |||
HorizontalAlignment="Center" | |||
Foreground="#00c2f4" | |||
Text="仓盖控制" /> | |||
</StackPanel> | |||
<StackPanel> | |||
<ToggleButton | |||
Width="80" | |||
Height="30" | |||
Margin="5,0,5,0" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
Background="Transparent" | |||
FontSize="20" | |||
IsChecked="{Binding IsLayOff}" | |||
Style="{StaticResource SwitchToggleButtonStyle}" /> | |||
<TextBlock | |||
Margin="0,5,0,0" | |||
HorizontalAlignment="Center" | |||
Foreground="#00c2f4" | |||
Text="出料控制" /> | |||
</StackPanel> | |||
</StackPanel> | |||
<Image | |||
Margin="20,30,20,0" | |||
Source="/BPASmartClient.CustomResource;component/Image/荧光/矩形发光.png" | |||
Stretch="Fill" | |||
Visibility="{Binding IsOpen, Converter={StaticResource BoolToVisibilityConvert}}" /> | |||
<Grid Height="45" Margin="20,-30,20,0"> | |||
<Grid.Background> | |||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/荧光/蓝色提示框.png" /> | |||
</Grid.Background> | |||
<!--<TextBox | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
FontSize="20" | |||
Foreground="#00c2f4" | |||
Text="{Binding DeviceName}" />--> | |||
<TextBox | |||
Name="outName" | |||
Width="160" | |||
Height="45" | |||
Margin="-3,-2,0,0" | |||
FontSize="20" | |||
Style="{StaticResource TextBoxStyle}" | |||
Text="{Binding RecipeName}" /> | |||
</Grid> | |||
<!--<Image Height="45" Stretch="Fill" Margin="20 -30 20 0" Source="/BPASmartClient.CustomResource;component/Image/荧光/蓝色提示框.png" />--> | |||
<Image Source="/BPASmartClient.CustomResource;component/Image/荧光/29.png" Visibility="{Binding IsLayOff, Converter={StaticResource BoolToVisibilityConvert}}" /> | |||
<Image | |||
Grid.RowSpan="2" | |||
Source="/BPASmartClient.CustomResource;component/Image/光柱.png" | |||
@@ -53,7 +53,7 @@ | |||
<!--#region 操作按钮--> | |||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal"> | |||
<pry:IcoButton | |||
<!--<pry:IcoButton | |||
Grid.Column="3" | |||
Width="140" | |||
Margin="10" | |||
@@ -63,8 +63,36 @@ | |||
FontSize="16" | |||
Foreground="Aqua" | |||
IcoText="" | |||
Style="{StaticResource IcoButtonStyle}" /> | |||
<pry:IcoButton | |||
Style="{StaticResource IcoButtonStyle}" />--> | |||
<Button | |||
Width="140" | |||
Height="30" | |||
Margin="10 0" | |||
Command="{Binding NewMaterital}" | |||
Content="新建原料" | |||
FontSize="16" | |||
Style="{StaticResource ImageButtonStyle}" /> | |||
<Button | |||
Width="140" | |||
Height="30" | |||
Margin="10 0" | |||
Command="{Binding NewRecipe}" | |||
Content="新建配方" | |||
FontSize="16" | |||
Style="{StaticResource ImageButtonStyle}" /> | |||
<Button | |||
Width="140" | |||
Height="30" | |||
Margin="10 0" | |||
Command="{Binding SaveRecipe}" | |||
Content="保存配方" | |||
FontSize="16" | |||
Style="{StaticResource ImageButtonStyle}" /> | |||
<!--<pry:IcoButton | |||
Grid.Column="3" | |||
Width="140" | |||
Margin="10" | |||
@@ -74,9 +102,9 @@ | |||
FontSize="16" | |||
Foreground="Aqua" | |||
IcoText="" | |||
Style="{StaticResource IcoButtonStyle}" /> | |||
Style="{StaticResource IcoButtonStyle}" />--> | |||
<pry:IcoButton | |||
<!--<pry:IcoButton | |||
Grid.Column="3" | |||
Width="140" | |||
Margin="10" | |||
@@ -87,7 +115,7 @@ | |||
Foreground="Aqua" | |||
IcoText="" | |||
IsEnabled="True" | |||
Style="{StaticResource IcoButtonStyle}" /> | |||
Style="{StaticResource IcoButtonStyle}" />--> | |||
</StackPanel> | |||
<!--#endregion--> | |||
@@ -47,6 +47,10 @@ | |||
</Setter.Value> | |||
</Setter> | |||
</Style> | |||
<Style x:Key="textBoxStyle" TargetType="TextBox"> | |||
<Setter Property="Background" Value="Transparent" /> | |||
</Style> | |||
</UserControl.Resources> | |||
<UserControl.DataContext> | |||
@@ -85,17 +89,37 @@ | |||
<Grid> | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="0.8*" /> | |||
<RowDefinition Height="0.1*" /> | |||
<RowDefinition Height="0.2*" /> | |||
</Grid.RowDefinitions> | |||
<define:MaterialStock | |||
Grid.Row="0" | |||
Margin="35,0,35,0" | |||
IsFaultState="{Binding IsFault}" | |||
IsLayOffState="{Binding IsLayOff}" | |||
IsOpenState="{Binding IsOpen}" | |||
IsRunning="{Binding RunStatus}" /> | |||
<Grid Grid.Row="1" VerticalAlignment="Bottom"> | |||
<StackPanel | |||
Grid.Row="1" | |||
Margin="0,0,0,0" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
Orientation="Horizontal"> | |||
<TextBlock Foreground="#00c2f4" Text="配料重量:" /> | |||
<TextBox | |||
Grid.Row="0" | |||
Width="80" | |||
Padding="2" | |||
Background="Transparent" | |||
BorderBrush="#00c2f4" | |||
CaretBrush="#00c2f4" | |||
Foreground="#00c2f4" | |||
Text="{Binding Weight}" /> | |||
</StackPanel> | |||
<Grid Grid.Row="2" VerticalAlignment="Bottom"> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition /> | |||
<ColumnDefinition /> | |||