Commit eed14f80 authored by 潘栩锋's avatar 潘栩锋 🚴

1. bug 支持446

parent f504e6ba
......@@ -171,6 +171,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\DataGridStyle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UIModule\FlowGraph.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
......
......@@ -12,7 +12,16 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Converter/Dictionary_MyConv.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="DataGridCell" x:Key="DataGridCellStyle_Base">
<Setter Property="FontSize" Value="20"/>
</Style>
<Style TargetType="DataGridCell" x:Key="DataGridCellStyle_Percent" BasedOn="{StaticResource DataGridCellStyle_Base}">
<Setter Property="Background" Value="Gray"/>
<Setter Property="Foreground" Value="White"/>
</Style>
</ResourceDictionary>
</Page.Resources>
<Grid >
......@@ -114,13 +123,11 @@
</Grid>
</Button>
</Grid>
<DataGrid Grid.Row="1" x:Name="gridFlows" ItemsSource="{Binding Record}" AutoGenerateColumns="False" IsReadOnly="True" >
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="FontSize" Value="20"/>
</Style>
</DataGrid.CellStyle>
<DataGrid Grid.Row="1" x:Name="gridFlows" ItemsSource="{Binding Record}" AutoGenerateColumns="False" IsReadOnly="True"
CellStyle="{StaticResource DataGridCellStyle_Base}"
AlternationCount ="2"
AlternatingRowBackground="LightGray"
>
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Time,StringFormat={}{0:MM/dd HH:mm}}" IsReadOnly="True">
<DataGridTextColumn.Header>
......@@ -138,6 +145,7 @@
</DataGridTextColumn.Header>
</DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Grid>
......
......@@ -96,7 +96,7 @@ namespace FLY.Weight.UI.Client
// %
DataGridTextColumn dgtc2 = new DataGridTextColumn()
{
Binding = new Binding() { Path = new PropertyPath($"Items[{i}].PDisp"), StringFormat = "{0:F1}" }
Binding = new Binding() { Path = new PropertyPath($"Items[{i}].PDisp"), StringFormat = "{0:F2}" }
};
StackPanel sp2 = new StackPanel() { Orientation = Orientation.Horizontal };
sp2.Children.Add(
......@@ -113,6 +113,7 @@ namespace FLY.Weight.UI.Client
Margin = new Thickness(10, 0, 10, 0)
});
dgtc2.Header = sp2;
dgtc2.CellStyle = this.FindResource("DataGridCellStyle_Percent") as Style;
datagrid.Columns.Add(dgtc2);
}
......
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="DataGrid" x:Key="DataGridStyle01">
<!--网格线颜色-->
<Setter Property="Background" Value="#E6DBBB" />
<Setter Property="BorderBrush" Value="#d6c79b" />
<Setter Property="HorizontalGridLinesBrush">
<Setter.Value>
<SolidColorBrush Color="#d6c79b"/>
</Setter.Value>
</Setter>
<Setter Property="VerticalGridLinesBrush">
<Setter.Value>
<SolidColorBrush Color="#d6c79b"/>
</Setter.Value>
</Setter>
</Style>
<!--标题栏样式-->
<!--<Style TargetType="DataGridColumnHeader" >
<Setter Property="Width" Value="50"/>
<Setter Property="Height" Value="30"/>
<Setter Property="FontSize" Value="14" />
<Setter Property="Background" Value="White" />
<Setter Property="FontWeight" Value="Bold"/>
</Style>-->
<Style TargetType="DataGridColumnHeader">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="MinWidth" Value="0" />
<Setter Property="MinHeight" Value="28" />
<Setter Property="Foreground" Value="#323433" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="DataGridColumnHeader">
<Border x:Name="BackgroundBorder" BorderThickness="0,1,0,1"
BorderBrush="#e6dbba"
Width="Auto">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ContentPresenter Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Path x:Name="SortArrow" Visibility="Collapsed" Data="M0,0 L1,0 0.5,1 z" Stretch="Fill" Grid.Column="2" Width="8" Height="6" Fill="White" Margin="0,0,50,0"
VerticalAlignment="Center" RenderTransformOrigin="1,1" />
<Rectangle Width="1" Fill="#d6c79b" HorizontalAlignment="Right" Grid.ColumnSpan="1" />
<!--<TextBlock Background="Red">
<ContentPresenter></ContentPresenter></TextBlock>-->
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Height" Value="25"/>
</Style>
<!--行样式触发-->
<!--背景色改变必须先设置cellStyle 因为cellStyle会覆盖rowStyle样式-->
<Style TargetType="DataGridRow">
<Setter Property="Background" Value="#F2F2F2" />
<Setter Property="Height" Value="25"/>
<Setter Property="Foreground" Value="Black" />
<Style.Triggers>
<!--隔行换色-->
<Trigger Property="AlternationIndex" Value="0" >
<Setter Property="Background" Value="#e7e7e7" />
</Trigger>
<Trigger Property="AlternationIndex" Value="1" >
<Setter Property="Background" Value="#f2f2f2" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="LightGray"/>
<!--<Setter Property="Foreground" Value="White"/>-->
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Foreground" Value="Black"/>
</Trigger>
</Style.Triggers>
</Style>
<!--单元格样式触发-->
<Style TargetType="DataGridCell">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="DataGridCell">
<TextBlock TextAlignment="Center" VerticalAlignment="Center" >
<ContentPresenter />
</TextBlock>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<!--<Setter Property="Background" Value="White"/>
<Setter Property="BorderThickness" Value="0"/>-->
<Setter Property="Foreground" Value="Black"/>
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>
......@@ -122,7 +122,7 @@
</StackPanel>
<StackPanel Orientation="Vertical" Margin="10,0">
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" FontSize="26" Text="{Binding MixPDisp,StringFormat={}{0:F1}}" Foreground="White" Background="Transparent"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" FontSize="26" Text="{Binding MixPDisp,StringFormat={}{0:F2}}" Foreground="White" Background="Transparent"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="%" Foreground="White" />
</StackPanel>
......@@ -143,7 +143,7 @@
<StackPanel Orientation="Vertical" Grid.Column="1">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader}" Text="设置" />
<control:PieChart x:Name="picchart_set" Width="60" Height="60" Margin="10" HorizontalAlignment="Left"
ItemValueBinding="MixSet" ItemColorBinding="Color" ItemsSource="{Binding Ingredients}"
ItemValueBinding="MixPSet" ItemColorBinding="Color" ItemsSource="{Binding Ingredients}"
/>
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader}" Text="显示" />
......@@ -151,7 +151,7 @@
</StackPanel>
<control:PieChart x:Name="picchart_curr" Width="100" Height="100" Margin="10"
ItemValueBinding="MixDisp" ItemColorBinding="Color" ItemsSource="{Binding Ingredients}"
ItemValueBinding="MixPDisp" ItemColorBinding="Color" ItemsSource="{Binding Ingredients}"
/>
<StackPanel Margin="3" >
<Grid>
......
......@@ -27,12 +27,6 @@
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" DataContext="{Binding ElementName=grid_WeightSystem,Path=DataContext}">
<StackPanel Orientation="Vertical">
<CheckBox Content="A层 No.1料斗加料异常" IsChecked="{Binding Items[0].IsErrorOfAdd_1}"/>
<CheckBox Content="B层 No.2料斗加料异常" IsChecked="{Binding Items[1].IsErrorOfAdd_2}"/>
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
......
......@@ -139,6 +139,16 @@ namespace FLY.Weight.Common
/// </summary>
public float MixPSet_4 { get; set; }
/// <summary>
/// 5#比例设定
/// </summary>
public float MixPSet_5 { get; set; }
/// <summary>
/// 6#比例设定
/// </summary>
public float MixPSet_6 { get; set; }
/// <summary>
/// 1#比例显示
/// </summary>
......@@ -159,6 +169,16 @@ namespace FLY.Weight.Common
/// </summary>
public float MixPDisp_4 { get; set; }
/// <summary>
/// 5#比例显示
/// </summary>
public float MixPDisp_5 { get; set; }
/// <summary>
/// 6#比例显示
/// </summary>
public float MixPDisp_6 { get; set; }
/// <summary>
/// 1#重量设定
/// </summary>
......@@ -179,6 +199,16 @@ namespace FLY.Weight.Common
/// </summary>
public float MixSet_4 { get; set; }
/// <summary>
/// 5#重量设定
/// </summary>
public float MixSet_5 { get; set; }
/// <summary>
/// 6#重量设定
/// </summary>
public float MixSet_6 { get; set; }
/// <summary>
/// 1#重量显示
/// </summary>
......@@ -199,6 +229,16 @@ namespace FLY.Weight.Common
/// </summary>
public float MixDisp_4 { get; set; }
/// <summary>
/// 5#重量显示
/// </summary>
public float MixDisp_5 { get; set; }
/// <summary>
/// 6#重量显示
/// </summary>
public float MixDisp_6 { get; set; }
/// <summary>
/// 1#放料
/// </summary>
......@@ -219,6 +259,16 @@ namespace FLY.Weight.Common
/// </summary>
public bool MixLight_4 { get; set; }
/// <summary>
/// 5#放料
/// </summary>
public bool MixLight_5 { get; set; }
/// <summary>
/// 6#放料
/// </summary>
public bool MixLight_6 { get; set; }
/// <summary>
/// 配料斗卸载
/// </summary>
......@@ -254,6 +304,16 @@ namespace FLY.Weight.Common
/// </summary>
public float MixCum_4 { get; set; }
/// <summary>
/// 5#累计重量
/// </summary>
public float MixCum_5 { get; set; }
/// <summary>
/// 6#累计重量
/// </summary>
public float MixCum_6 { get; set; }
/// <summary>
/// 1#累计百分比
/// </summary>
......@@ -274,6 +334,16 @@ namespace FLY.Weight.Common
/// </summary>
public float MixCumPercent_4 { get; set; }
/// <summary>
/// 5#累计百分比
/// </summary>
public float MixCumPercent_5 { get; set; }
/// <summary>
/// 6#累计百分比
/// </summary>
public float MixCumPercent_6 { get; set; }
/// <summary>
/// 产量清零
/// </summary>
......@@ -439,6 +509,16 @@ namespace FLY.Weight.Common
/// </summary>
public float FeedingDeviation_4 { get; set; }
/// <summary>
/// 5次补料偏差
/// </summary>
public float FeedingDeviation_5 { get; set; }
/// <summary>
/// 6次补料偏差
/// </summary>
public float FeedingDeviation_6 { get; set; }
/// <summary>
/// 1次加料设定
/// </summary>
......@@ -459,6 +539,16 @@ namespace FLY.Weight.Common
/// </summary>
public float FeedSet_4 { get; set; }
/// <summary>
/// 5次加料设定
/// </summary>
public float FeedSet_5 { get; set; }
/// <summary>
/// 6次加料设定
/// </summary>
public float FeedSet_6 { get; set; }
/// <summary>
/// 1#初始时间
/// </summary>
......@@ -479,6 +569,16 @@ namespace FLY.Weight.Common
/// </summary>
public float InitTime_4 { get; set; }
/// <summary>
/// 5#初始时间
/// </summary>
public float InitTime_5 { get; set; }
/// <summary>
/// 6#初始时间
/// </summary>
public float InitTime_6 { get; set; }
/// <summary>
/// 1#最小时间
/// </summary>
......@@ -499,6 +599,16 @@ namespace FLY.Weight.Common
/// </summary>
public float MinTime_4 { get; set; }
/// <summary>
/// 5#最小时间
/// </summary>
public float MinTime_5 { get; set; }
/// <summary>
/// 6#最小时间
/// </summary>
public float MinTime_6 { get; set; }
/// <summary>
/// 1#稳重时间
/// </summary>
......@@ -519,6 +629,16 @@ namespace FLY.Weight.Common
/// </summary>
public float StableTime_4 { get; set; }
/// <summary>
/// 5#稳重时间
/// </summary>
public float StableTime_5 { get; set; }
/// <summary>
/// 6#稳重时间
/// </summary>
public float StableTime_6 { get; set; }
/// <summary>
/// 1次料仓报警设定
/// </summary>
......@@ -539,6 +659,16 @@ namespace FLY.Weight.Common
/// </summary>
public float BinAlarmSet_4 { get; set; }
/// <summary>
/// 5次料仓报警设定
/// </summary>
public float BinAlarmSet_5 { get; set; }
/// <summary>
/// 6次料仓报警设定
/// </summary>
public float BinAlarmSet_6 { get; set; }
/// <summary>
/// No.1料仓缺料报警
/// </summary>
......@@ -559,6 +689,16 @@ namespace FLY.Weight.Common
/// </summary>
public bool IsErrorOfLack_4 { get; set; }
/// <summary>
/// No.5料仓缺料报警
/// </summary>
public bool IsErrorOfLack_5 { get; set; }
/// <summary>
/// No.6料仓缺料报警
/// </summary>
public bool IsErrorOfLack_6 { get; set; }
/// <summary>
/// No.1料斗加料异常
/// </summary>
......@@ -579,6 +719,16 @@ namespace FLY.Weight.Common
/// </summary>
public bool IsErrorOfAdd_4 { get; set; }
/// <summary>
/// No.5料斗加料异常
/// </summary>
public bool IsErrorOfAdd_5 { get; set; }
/// <summary>
/// No.6料斗加料异常
/// </summary>
public bool IsErrorOfAdd_6 { get; set; }
/// <summary>
/// 螺杆缺料报警
/// </summary>
......@@ -600,7 +750,7 @@ namespace FLY.Weight.Common
public bool IsErrorOfScram { get; set; }
/// <summary>
/// 搅拌电机开机
/// 搅拌电机急停开启
/// </summary>
public bool IsErrorOfBlender2 { get; set; }
......
......@@ -117,7 +117,6 @@ namespace FLY.Weight.Server
{
"BucketValveIsOpen",
"MixDisp",
//"IsMixSave",
"ClearProduction",
"CumulativeProduction",
"CurrentFlow",
......
......@@ -9,6 +9,127 @@ namespace FLY.Weight.Common
public class WeighterAccessory:INotifyPropertyChanged
{
#region 辅助代码生成
/// <summary>
/// 总流量设定
/// </summary>
public float TotalFlowSetting { get; set; }
/// <summary>
/// 总流量显示
/// </summary>
public float TotalFlow { get; set; }
/// <summary>
/// 总产量
/// </summary>
public float TotalProduction { get; set; }
/// <summary>
/// 码轮周长mm
/// </summary>
public float WheelPerimeter { get; set; }
/// <summary>
/// 码轮脉冲
/// </summary>
public float WheelPulse { get; set; }
/// <summary>
/// 平均密度
/// </summary>
public float Density { get; set; }
/// <summary>
/// 边料不回收
/// </summary>
public bool IsRimNoRecycle { get; set; }
/// <summary>
/// 边料kg/h
/// </summary>
public float RimCharge { get; set; }
/// <summary>
/// 厚度um
/// </summary>
public float Thickness { get; set; }
/// <summary>
/// 当前线速度m/min
/// </summary>
public float CurrentVelocity { get; set; }
/// <summary>
/// 当前线速度设置m/min
/// </summary>
public float CurrentVelocitySet { get; set; }
/// <summary>
/// 吹膜宽度mm
/// </summary>
public float TotalFilmWidth { get; set; }
/// <summary>
/// 切边mm
/// </summary>
public float RimWidth { get; set; }
/// <summary>
/// 收卷宽度mm
/// </summary>
public float ActFilmWidth { get; set; }
/// <summary>
/// 设定厚度um
/// </summary>
public float SetThickness { get; set; }
/// <summary>
/// 理论速度m/min
/// </summary>
public float TargetVelocity { get; set; }
/// <summary>
/// 内收卷当前m
/// </summary>
public float ACurrentLen { get; set; }
/// <summary>
/// 内收卷当前kg
/// </summary>
public float ACurrent { get; set; }
/// <summary>
/// 内收卷上卷kg
/// </summary>
public float ALast { get; set; }
/// <summary>
/// 外收卷当前m
/// </summary>
public float BCurrentLen { get; set; }
/// <summary>
/// 外收卷当前kg
/// </summary>
public float BCurrent { get; set; }
/// <summary>
/// 外收卷上卷kg
/// </summary>
public float BLast { get; set; }
/// <summary>
/// 内收卷清零
/// </summary>
public bool AClear { get; set; }
/// <summary>
/// 外收卷清零
/// </summary>
public bool BClear { get; set; }
#endregion
public event PropertyChangedEventHandler PropertyChanged;
}
}
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