Commit 1409ed60 authored by 潘栩锋's avatar 潘栩锋 🚴

修改 称重 444_v3.1

parent 63b19b39
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
xmlns:local="clr-namespace:FLY.Weight.UI.Client"> xmlns:local="clr-namespace:FLY.Weight.UI.Client">
<SolidColorBrush x:Key="Color_g1#0" Color="#FFe04f4f"/> <SolidColorBrush x:Key="Color_g1#0" Color="#FFe04f4f"/>
<SolidColorBrush x:Key="Color_g2#0" Color="#FFfab051"/> <SolidColorBrush x:Key="Color_g2#0" Color="#FFfab051"/>
<SolidColorBrush x:Key="Color_g3#0" Color="#FF10ad79"/> <SolidColorBrush x:Key="Color_g3#0" Color="#FF10ad79"/>
<SolidColorBrush x:Key="Color_g4#0" Color="#FF1079ad"/> <SolidColorBrush x:Key="Color_g4#0" Color="#FF1079ad"/>
......
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:flyctrllib="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary" xmlns:flyctrllib="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary"
xmlns:local="clr-namespace:FLY.Weight.UI.Client" xmlns:local="clr-namespace:FLY.Weight.UI.Client" xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
mc:Ignorable="d" mc:Ignorable="d"
Title="Window_Frequency" WindowStartupLocation="CenterScreen" d:DesignWidth="334.492" d:DesignHeight="318.246" > Title="Window_Frequency" WindowStartupLocation="CenterScreen" d:DesignWidth="334.492" d:DesignHeight="318.246"
Background="WhiteSmoke">
<Window.Resources> <Window.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
...@@ -14,10 +15,10 @@ ...@@ -14,10 +15,10 @@
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</Window.Resources> </Window.Resources>
<StackPanel Orientation="Vertical" Margin="5,20"> <StackPanel Margin="{StaticResource ControlMargin}">
<Grid Height="15"/>
<StackPanel Orientation="Vertical" Margin="5"> <StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader}" Text="频率设置" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="44" /> <TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="频率设置" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="44" />
</StackPanel> </StackPanel>
<Grid > <Grid >
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
...@@ -26,23 +27,29 @@ ...@@ -26,23 +27,29 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Grid.Column="1"> <StackPanel Orientation="Horizontal" Grid.Column="1">
<StackPanel Orientation="Vertical" Margin="5"> <StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="手动频率" /> <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="手动频率" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding FrequencySet, StringFormat={}{0:F1}}"/> <TextBox Style="{StaticResource Styles.Text.FieldContent.Input}" Text="{Binding FrequencySet, StringFormat={}{0:F1}}"/>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="Hz" /> <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="Hz" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_minus_Click" Margin="5"> <Button Style="{StaticResource Styles.Button.Icon.Large}" Foreground="{StaticResource Brushes.Validation}"
<Path Data="{StaticResource Geometry_minus-circle}" Fill="{StaticResource Color_theme_activity}" Stretch="Fill" Height="80" Width="80" /> Click="button_minus_Click">
<Grid>
<Ellipse Fill="White" Margin="3"/>
<iconPacks:PackIconMaterial Kind="MinusCircle" />
</Grid>
</Button> </Button>
<Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_plus_Click" Margin="5"> <Button Style="{StaticResource Styles.Button.Icon.Large}"
<Path Data="{StaticResource Geometry_plus-circle}" Fill="{StaticResource Color_theme_activity}" Stretch="Fill" Height="80" Width="80" /> Click="button_plus_Click">
<Grid>
<Ellipse Fill="White" Margin="3"/>
<iconPacks:PackIconMaterial Kind="PlusCircle" />
</Grid>
</Button> </Button>
</StackPanel> </StackPanel>
</Grid> </Grid>
<Button Style="{StaticResource Styles.Button.Apply}" Click="button_ok_Click" />
<Button Style="{StaticResource ButtonStyle2}" Content="确定" Width="auto" Margin="5" Click="button_ok_Click" />
</StackPanel> </StackPanel>
</flyctrllib:WindowBigClose> </flyctrllib:WindowBigClose>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
xmlns:control="clr-namespace:FLY.Weight.UI.Client.Control" xmlns:control="clr-namespace:FLY.Weight.UI.Client.Control"
xmlns:flyctrllib="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary" xmlns:flyctrllib="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary"
mc:Ignorable="d" mc:Ignorable="d"
Title="Window_RatioSet" WindowStartupLocation="CenterScreen" d:DesignWidth="538.195" Loaded="WindowBigClose_Loaded" d:DesignHeight="525.559"> Title="Window_RatioSet" WindowStartupLocation="CenterScreen" Loaded="WindowBigClose_Loaded" >
<Window.Resources> <Window.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
...@@ -16,12 +16,12 @@ ...@@ -16,12 +16,12 @@
</ResourceDictionary> </ResourceDictionary>
</Window.Resources> </Window.Resources>
<StackPanel Name="root_grid" Orientation="Vertical" Margin="5,20" > <StackPanel Name="root_grid" Margin="5,20" >
<StackPanel.DataContext> <StackPanel.DataContext>
<StaticResource ResourceKey="unittests_weighters"/> <StaticResource ResourceKey="unittests_weighters"/>
</StackPanel.DataContext> </StackPanel.DataContext>
<StackPanel Orientation="Vertical" Margin="5"> <StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader}" Text="流量设置" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="44" /> <TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="流量设置" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="44" />
</StackPanel> </StackPanel>
<Grid > <Grid >
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
<Border Background="{Binding Color}" Margin="3" > <Border Background="{Binding Color}" Margin="3" >
<Border BorderThickness="1" BorderBrush="White" Margin="3" MinWidth="160"> <Border BorderThickness="1" BorderBrush="White" Margin="3" MinWidth="160">
<StackPanel Orientation="Horizontal" Margin="20,3" HorizontalAlignment="Center" VerticalAlignment="Center"> <StackPanel Orientation="Horizontal" Margin="20,3" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding ScrewPSet, StringFormat={}{0:F1}}" Background="Transparent" Foreground="White"/> <TextBox Style="{StaticResource Styles.Text.FieldContent.Input}" Text="{Binding ScrewPSet, StringFormat={}{0:F1}}" Background="Transparent" Foreground="White"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="%" Foreground="White" /> <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="%" Foreground="White" />
</StackPanel> </StackPanel>
</Border> </Border>
</Border> </Border>
...@@ -55,19 +55,19 @@ ...@@ -55,19 +55,19 @@
</DataTemplate> </DataTemplate>
</ItemsControl.ItemTemplate> </ItemsControl.ItemTemplate>
</ItemsControl> </ItemsControl>
<StackPanel Orientation="Vertical" Grid.Column="1"> <StackPanel Grid.Column="1">
<control:PieChart x:Name="piechart" Width="200" Height="200" Margin="10" <control:PieChart x:Name="piechart" Width="200" Height="200" Margin="10"
ItemValueBinding="ScrewPSet" ItemColorBinding="Color" ItemValueBinding="ScrewPSet" ItemColorBinding="Color"
ItemsSource="{Binding Items}" ItemsSource="{Binding Items}"
/> />
<StackPanel Orientation="Vertical" Margin="5"> <StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="总流量" /> <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="总流量" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding Accessory.TotalFlowSetting, StringFormat={}{0:F1}}"/> <TextBox Style="{StaticResource Styles.Text.FieldContent.Input}" Text="{Binding Accessory.TotalFlowSetting, StringFormat={}{0:F1}}"/>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="kg/h" /> <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="kg/h" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<Button Style="{StaticResource ButtonStyle2}" Content="当前->设置" FontSize="30" Width="auto" Margin="5" Click="button_autoset_Click" /> <Button Style="{StaticResource Styles.Button2}" Content="当前->设置" FontSize="30" Width="auto" Click="button_autoset_Click" />
</StackPanel> </StackPanel>
</Grid> </Grid>
......
...@@ -1040,6 +1040,43 @@ namespace FLY.Weight.Common ...@@ -1040,6 +1040,43 @@ namespace FLY.Weight.Common
[Description("6#配料偏差大")] [Description("6#配料偏差大")]
[IsError()] [IsError()]
public bool IsErrorOfDosing_6 { get; set; } public bool IsErrorOfDosing_6 { get; set; }
/// <summary>
/// 1#配料报警偏差大比例
/// </summary>
[Description("1#配料报警偏差大比例")]
public float DosingLargeDeviationPSet_1 { get; set; }
/// <summary>
/// 2#配料报警偏差大比例
/// </summary>
[Description("2#配料报警偏差大比例")]
public float DosingLargeDeviationPSet_2 { get; set; }
/// <summary>
/// 3#配料报警偏差大比例
/// </summary>
[Description("3#配料报警偏差大比例")]
public float DosingLargeDeviationPSet_3 { get; set; }
/// <summary>
/// 4#配料报警偏差大比例
/// </summary>
[Description("4#配料报警偏差大比例")]
public float DosingLargeDeviationPSet_4 { get; set; }
/// <summary>
/// 5#配料报警偏差大比例
/// </summary>
[Description("5#配料报警偏差大比例")]
public float DosingLargeDeviationPSet_5 { get; set; }
/// <summary>
/// 6#配料报警偏差大比例
/// </summary>
[Description("6#配料报警偏差大比例")]
public float DosingLargeDeviationPSet_6 { get; set; }
#endregion #endregion
...@@ -1077,6 +1114,8 @@ namespace FLY.Weight.Common ...@@ -1077,6 +1114,8 @@ namespace FLY.Weight.Common
Misc.BindingOperations.SetBinding(this, $"{nameof(ingredient.StableTime)}_{no}", ingredient, nameof(ingredient.StableTime), Misc.BindingOperations.BindingMode.TwoWay); Misc.BindingOperations.SetBinding(this, $"{nameof(ingredient.StableTime)}_{no}", ingredient, nameof(ingredient.StableTime), Misc.BindingOperations.BindingMode.TwoWay);
Misc.BindingOperations.SetBinding(this, $"{nameof(ingredient.BinAlarmSet)}_{no}", ingredient, nameof(ingredient.BinAlarmSet), Misc.BindingOperations.BindingMode.TwoWay); Misc.BindingOperations.SetBinding(this, $"{nameof(ingredient.BinAlarmSet)}_{no}", ingredient, nameof(ingredient.BinAlarmSet), Misc.BindingOperations.BindingMode.TwoWay);
Misc.BindingOperations.SetBinding(this, $"{nameof(ingredient.DosingLargeDeviationPSet)}_{no}", ingredient, nameof(ingredient.DosingLargeDeviationPSet), Misc.BindingOperations.BindingMode.TwoWay);
Ingredients.Add(ingredient); Ingredients.Add(ingredient);
} }
} }
...@@ -1189,6 +1228,11 @@ namespace FLY.Weight.Common ...@@ -1189,6 +1228,11 @@ namespace FLY.Weight.Common
/// </summary> /// </summary>
public float BinAlarmSet { get; set; } public float BinAlarmSet { get; set; }
/// <summary>
/// 配料报警偏差大比例
/// </summary>
public float DosingLargeDeviationPSet { get; set; }
public IngredientCell() public IngredientCell()
{ {
......
...@@ -3224,6 +3224,114 @@ ...@@ -3224,6 +3224,114 @@
"OwnerName": "Items[2]", "OwnerName": "Items[2]",
"PropertyName": "IsErrorOfDosing_4" "PropertyName": "IsErrorOfDosing_4"
}, },
{
"DeviceIndex": 0,
"Mode": "4",
"Addr": 22288,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[0]",
"PropertyName": "DosingLargeDeviationPSet_1"
},
{
"DeviceIndex": 1,
"Mode": "4",
"Addr": 22288,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[1]",
"PropertyName": "DosingLargeDeviationPSet_1"
},
{
"DeviceIndex": 2,
"Mode": "4",
"Addr": 22288,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[2]",
"PropertyName": "DosingLargeDeviationPSet_1"
},
{
"DeviceIndex": 0,
"Mode": "4",
"Addr": 22298,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[0]",
"PropertyName": "DosingLargeDeviationPSet_2"
},
{
"DeviceIndex": 1,
"Mode": "4",
"Addr": 22298,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[1]",
"PropertyName": "DosingLargeDeviationPSet_2"
},
{
"DeviceIndex": 2,
"Mode": "4",
"Addr": 22298,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[2]",
"PropertyName": "DosingLargeDeviationPSet_2"
},
{
"DeviceIndex": 0,
"Mode": "4",
"Addr": 22308,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[0]",
"PropertyName": "DosingLargeDeviationPSet_3"
},
{
"DeviceIndex": 1,
"Mode": "4",
"Addr": 22308,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[1]",
"PropertyName": "DosingLargeDeviationPSet_3"
},
{
"DeviceIndex": 2,
"Mode": "4",
"Addr": 22308,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[2]",
"PropertyName": "DosingLargeDeviationPSet_3"
},
{
"DeviceIndex": 0,
"Mode": "4",
"Addr": 22318,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[0]",
"PropertyName": "DosingLargeDeviationPSet_4"
},
{
"DeviceIndex": 1,
"Mode": "4",
"Addr": 22318,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[1]",
"PropertyName": "DosingLargeDeviationPSet_4"
},
{
"DeviceIndex": 2,
"Mode": "4",
"Addr": 22318,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[2]",
"PropertyName": "DosingLargeDeviationPSet_4"
},
{ {
"DeviceIndex": 0, "DeviceIndex": 0,
"Mode": "4", "Mode": "4",
......
...@@ -3224,6 +3224,114 @@ ...@@ -3224,6 +3224,114 @@
"OwnerName": "Items[2]", "OwnerName": "Items[2]",
"PropertyName": "IsErrorOfDosing_4" "PropertyName": "IsErrorOfDosing_4"
}, },
{
"DeviceIndex": 0,
"Mode": "4",
"Addr": 22288,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[0]",
"PropertyName": "DosingLargeDeviationPSet_1"
},
{
"DeviceIndex": 1,
"Mode": "4",
"Addr": 22288,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[1]",
"PropertyName": "DosingLargeDeviationPSet_1"
},
{
"DeviceIndex": 2,
"Mode": "4",
"Addr": 22288,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[2]",
"PropertyName": "DosingLargeDeviationPSet_1"
},
{
"DeviceIndex": 0,
"Mode": "4",
"Addr": 22298,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[0]",
"PropertyName": "DosingLargeDeviationPSet_2"
},
{
"DeviceIndex": 1,
"Mode": "4",
"Addr": 22298,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[1]",
"PropertyName": "DosingLargeDeviationPSet_2"
},
{
"DeviceIndex": 2,
"Mode": "4",
"Addr": 22298,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[2]",
"PropertyName": "DosingLargeDeviationPSet_2"
},
{
"DeviceIndex": 0,
"Mode": "4",
"Addr": 22308,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[0]",
"PropertyName": "DosingLargeDeviationPSet_3"
},
{
"DeviceIndex": 1,
"Mode": "4",
"Addr": 22308,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[1]",
"PropertyName": "DosingLargeDeviationPSet_3"
},
{
"DeviceIndex": 2,
"Mode": "4",
"Addr": 22308,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[2]",
"PropertyName": "DosingLargeDeviationPSet_3"
},
{
"DeviceIndex": 0,
"Mode": "4",
"Addr": 22318,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[0]",
"PropertyName": "DosingLargeDeviationPSet_4"
},
{
"DeviceIndex": 1,
"Mode": "4",
"Addr": 22318,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[1]",
"PropertyName": "DosingLargeDeviationPSet_4"
},
{
"DeviceIndex": 2,
"Mode": "4",
"Addr": 22318,
"Type": "float",
"Scale": 1.0,
"OwnerName": "Items[2]",
"PropertyName": "DosingLargeDeviationPSet_4"
},
{ {
"DeviceIndex": 0, "DeviceIndex": 0,
"Mode": "4", "Mode": "4",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment