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

修改 称重 444_v3.1

parent 63b19b39
......@@ -3,6 +3,8 @@
xmlns:local="clr-namespace:FLY.Weight.UI.Client">
<SolidColorBrush x:Key="Color_g1#0" Color="#FFe04f4f"/>
<SolidColorBrush x:Key="Color_g2#0" Color="#FFfab051"/>
<SolidColorBrush x:Key="Color_g3#0" Color="#FF10ad79"/>
<SolidColorBrush x:Key="Color_g4#0" Color="#FF1079ad"/>
......
......@@ -4,9 +4,10 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:flyctrllib="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary"
xmlns:local="clr-namespace:FLY.Weight.UI.Client"
mc:Ignorable="d"
Title="Window_Frequency" WindowStartupLocation="CenterScreen" d:DesignWidth="334.492" d:DesignHeight="318.246" >
xmlns:local="clr-namespace:FLY.Weight.UI.Client" xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
mc:Ignorable="d"
Title="Window_Frequency" WindowStartupLocation="CenterScreen" d:DesignWidth="334.492" d:DesignHeight="318.246"
Background="WhiteSmoke">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
......@@ -14,10 +15,10 @@
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<StackPanel Orientation="Vertical" Margin="5,20">
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader}" Text="频率设置" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="44" />
<StackPanel Margin="{StaticResource ControlMargin}">
<Grid Height="15"/>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="频率设置" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="44" />
</StackPanel>
<Grid >
<Grid.ColumnDefinitions>
......@@ -26,23 +27,29 @@
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Grid.Column="1">
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="手动频率" />
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="手动频率" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding FrequencySet, StringFormat={}{0:F1}}"/>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="Hz" />
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input}" Text="{Binding FrequencySet, StringFormat={}{0:F1}}"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="Hz" />
</StackPanel>
</StackPanel>
<Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_minus_Click" Margin="5">
<Path Data="{StaticResource Geometry_minus-circle}" Fill="{StaticResource Color_theme_activity}" Stretch="Fill" Height="80" Width="80" />
<Button Style="{StaticResource Styles.Button.Icon.Large}" Foreground="{StaticResource Brushes.Validation}"
Click="button_minus_Click">
<Grid>
<Ellipse Fill="White" Margin="3"/>
<iconPacks:PackIconMaterial Kind="MinusCircle" />
</Grid>
</Button>
<Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_plus_Click" Margin="5">
<Path Data="{StaticResource Geometry_plus-circle}" Fill="{StaticResource Color_theme_activity}" Stretch="Fill" Height="80" Width="80" />
<Button Style="{StaticResource Styles.Button.Icon.Large}"
Click="button_plus_Click">
<Grid>
<Ellipse Fill="White" Margin="3"/>
<iconPacks:PackIconMaterial Kind="PlusCircle" />
</Grid>
</Button>
</StackPanel>
</Grid>
<Button Style="{StaticResource ButtonStyle2}" Content="确定" Width="auto" Margin="5" Click="button_ok_Click" />
<Button Style="{StaticResource Styles.Button.Apply}" Click="button_ok_Click" />
</StackPanel>
</flyctrllib:WindowBigClose>
......@@ -7,7 +7,7 @@
xmlns:control="clr-namespace:FLY.Weight.UI.Client.Control"
xmlns:flyctrllib="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary"
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>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
......@@ -16,12 +16,12 @@
</ResourceDictionary>
</Window.Resources>
<StackPanel Name="root_grid" Orientation="Vertical" Margin="5,20" >
<StackPanel Name="root_grid" Margin="5,20" >
<StackPanel.DataContext>
<StaticResource ResourceKey="unittests_weighters"/>
</StackPanel.DataContext>
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader}" Text="流量设置" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="44" />
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="流量设置" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="44" />
</StackPanel>
<Grid >
<Grid.ColumnDefinitions>
......@@ -45,8 +45,8 @@
<Border Background="{Binding Color}" Margin="3" >
<Border BorderThickness="1" BorderBrush="White" Margin="3" MinWidth="160">
<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"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="%" Foreground="White" />
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input}" Text="{Binding ScrewPSet, StringFormat={}{0:F1}}" Background="Transparent" Foreground="White"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="%" Foreground="White" />
</StackPanel>
</Border>
</Border>
......@@ -55,19 +55,19 @@
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<StackPanel Orientation="Vertical" Grid.Column="1">
<StackPanel Grid.Column="1">
<control:PieChart x:Name="piechart" Width="200" Height="200" Margin="10"
ItemValueBinding="ScrewPSet" ItemColorBinding="Color"
ItemsSource="{Binding Items}"
/>
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="总流量" />
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="总流量" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding Accessory.TotalFlowSetting, StringFormat={}{0:F1}}"/>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="kg/h" />
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input}" Text="{Binding Accessory.TotalFlowSetting, StringFormat={}{0:F1}}"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="kg/h" />
</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>
</Grid>
......
......@@ -1040,6 +1040,43 @@ namespace FLY.Weight.Common
[Description("6#配料偏差大")]
[IsError()]
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
......@@ -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.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);
}
}
......@@ -1189,6 +1228,11 @@ namespace FLY.Weight.Common
/// </summary>
public float BinAlarmSet { get; set; }
/// <summary>
/// 配料报警偏差大比例
/// </summary>
public float DosingLargeDeviationPSet { get; set; }
public IngredientCell()
{
......
......@@ -3224,6 +3224,114 @@
"OwnerName": "Items[2]",
"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,
"Mode": "4",
......
......@@ -3224,6 +3224,114 @@
"OwnerName": "Items[2]",
"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,
"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