Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hemei
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘栩锋
hemei
Commits
0603f778
Commit
0603f778
authored
Mar 21, 2020
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决称重的bug, 1. 混料累计 显示内容出错。 2.下料指示灯不提示
parent
ac6c8086
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
46 additions
and
43 deletions
+46
-43
PgFlowTable.xaml
Project.FLY.Weight/FLY.Weight.UI.Client/PgFlowTable.xaml
+4
-18
PgMixTable.xaml
Project.FLY.Weight/FLY.Weight.UI.Client/PgMixTable.xaml
+6
-1
PgRollMixTable.xaml
Project.FLY.Weight/FLY.Weight.UI.Client/PgRollMixTable.xaml
+12
-5
PgRollMixTable.xaml.cs
...ct.FLY.Weight/FLY.Weight.UI.Client/PgRollMixTable.xaml.cs
+3
-1
WdIngredient.xaml
Project.FLY.Weight/FLY.Weight.UI.Client/WdIngredient.xaml
+17
-15
WdIngredient.xaml.cs
Project.FLY.Weight/FLY.Weight.UI.Client/WdIngredient.xaml.cs
+1
-0
MixBufferCollection.cs
Project.FLY.Weight/FLY.Weight/Client/MixBufferCollection.cs
+1
-1
WeighterC.cs
Project.FLY.Weight/FLY.Weight/Common/WeighterC.cs
+1
-1
thick_public
thick_public
+1
-1
No files found.
Project.FLY.Weight/FLY.Weight.UI.Client/PgFlowTable.xaml
View file @
0603f778
...
...
@@ -14,19 +14,10 @@
<ResourceDictionary Source="pack://application:,,,/FLY.Weight.UI.Client;component/Themes/ABCTab.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Weight.UI.Client;component/UnitTests/UnitTests_Weights.xaml"/>
</ResourceDictionary.MergedDictionaries>
<ControlTemplate x:Key="picture_button" TargetType="Button">
<Border Name="border" BorderThickness="1" CornerRadius="5">
<ContentPresenter Content="{TemplateBinding Content}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="BorderBrush" Value="LightBlue"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="border" Property="Background" Value="LightGray"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<Style TargetType="DataGridCell" >
<Setter Property="FontSize" Value="16"/>
</Style>
</ResourceDictionary>
</Page.Resources>
<Grid >
...
...
@@ -112,11 +103,6 @@
</Grid>
<DataGrid Grid.Row="1" x:Name="gridFlows" ItemsSource="{Binding Record}" AutoGenerateColumns="False" IsReadOnly="True"
AlternationCount="5" AlternatingRowBackground="LightGray">
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="FontSize" Value="20"/>
</Style>
</DataGrid.CellStyle>
</DataGrid>
</Grid>
</Grid>
...
...
Project.FLY.Weight/FLY.Weight.UI.Client/PgMixTable.xaml
View file @
0603f778
...
...
@@ -16,7 +16,7 @@
</ResourceDictionary.MergedDictionaries>
<Style TargetType="DataGridCell" x:Key="DataGridCellStyle_Base">
<Setter Property="FontSize" Value="
20
"/>
<Setter Property="FontSize" Value="
16
"/>
</Style>
<Style TargetType="DataGridCell" x:Key="DataGridCellStyle_Percent" BasedOn="{StaticResource DataGridCellStyle_Base}">
<Setter Property="Background" Value="Gray"/>
...
...
@@ -106,6 +106,11 @@
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="kg" Margin="10,0" />
</StackPanel>
</DataGridTextColumn.Header>
<DataGridTextColumn.CellStyle>
<Style TargetType="DataGridCell" BasedOn="{StaticResource DataGridCellStyle_Base}">
<Setter Property="Background" Value="LightBlue"/>
</Style>
</DataGridTextColumn.CellStyle>
</DataGridTextColumn>
</DataGrid.Columns>
...
...
Project.FLY.Weight/FLY.Weight.UI.Client/PgRollMixTable.xaml
View file @
0603f778
...
...
@@ -13,6 +13,13 @@
<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="16"/>
</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 >
...
...
@@ -80,11 +87,6 @@
<DataGrid Grid.Row="1" x:Name="gridFlows" ItemsSource="{Binding Record}" AutoGenerateColumns="False" IsReadOnly="True"
AlternationCount="5" AlternatingRowBackground="LightGray">
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="FontSize" Value="20"/>
</Style>
</DataGrid.CellStyle>
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Time,StringFormat={}{0:MM/dd HH:mm}}" IsReadOnly="True">
...
...
@@ -101,6 +103,11 @@
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="kg" Margin="10,0" />
</StackPanel>
</DataGridTextColumn.Header>
<DataGridTextColumn.CellStyle>
<Style TargetType="DataGridCell" BasedOn="{StaticResource DataGridCellStyle_Base}">
<Setter Property="Background" Value="LightGray"/>
</Style>
</DataGridTextColumn.CellStyle>
</DataGridTextColumn>
<!--<DataGridTextColumn Binding="{Binding Items[0].Disp,StringFormat={}{0:F1}}" >
<DataGridTextColumn.Header>
...
...
Project.FLY.Weight/FLY.Weight.UI.Client/PgRollMixTable.xaml.cs
View file @
0603f778
...
...
@@ -58,7 +58,7 @@ namespace FLY.Weight.UI.Client
this
.
weightSystemService
=
weightSystemService
;
mWeighter
=
w
;
int
item_idx
=
this
.
weightSystemService
.
Items
.
IndexOf
(
w
);
this
.
buffer
=
mixBufferCollection
.
GetMix
(
item_idx
);
this
.
buffer
=
mixBufferCollection
.
Get
Roll
Mix
(
item_idx
);
//templateRoot.DataContext = w;
...
...
@@ -131,6 +131,8 @@ namespace FLY.Weight.UI.Client
Margin
=
new
Thickness
(
10
,
0
,
10
,
0
)
});
dgtc2
.
Header
=
sp2
;
dgtc2
.
CellStyle
=
this
.
FindResource
(
"DataGridCellStyle_Percent"
)
as
Style
;
gridFlows
.
Columns
.
Add
(
dgtc2
);
}
...
...
Project.FLY.Weight/FLY.Weight.UI.Client/WdIngredient.xaml
View file @
0603f778
...
...
@@ -49,7 +49,7 @@
<GroupBox Grid.Column="1" BorderBrush="{Binding Color}" BorderThickness="3" >
<StackPanel Orientation="Horizontal" Margin="5">
<StackPanel
Orientation="Vertical"
>
<StackPanel >
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="批次重量" Foreground="{Binding Color}"/>
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding MixSet,StringFormat={}{0:F1}}"/>
...
...
@@ -69,13 +69,13 @@
<GroupBox.Header>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="当前" Foreground="{Binding Color}"/>
</GroupBox.Header>
<StackPanel
Orientation="Vertical"
>
<StackPanel>
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel
Orientation="Vertical"
>
<StackPanel >
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal" Margin="3" >
<Grid Margin="30,0"/>
...
...
@@ -87,7 +87,7 @@
<ItemsControl ItemsSource="{Binding Ingredients}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel
Orientation="Vertical"
/>
<StackPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
...
...
@@ -96,20 +96,22 @@
<Border Background="{Binding Color}" >
<StackPanel Orientation="Horizontal" Margin="3" >
<Grid Margin="5">
<TextBlock Fo
reground="White" FontSize="40" VerticalAlignment="Center
">
<TextBlock Fo
ntSize="40" VerticalAlignment="Center" Width="50
">
<Run Text="{Binding Number}"/><Run Text="#"/>
<TextBlock.Style>
<Style BasedOn="{StaticResource TextBlockStyle_FieldContent_mm}" TargetType="TextBlock">
<Style BasedOn="{StaticResource TextBlockStyle_FieldContent_mm}" TargetType="TextBlock" >
<Setter Property="Foreground" Value="White" />
<Style.Triggers>
<DataTrigger Binding="{Binding MixLight}" Value="True">
<Setter Property="Foreground" Value="{StaticResource Color_theme_static}"/>
<Setter Property="Foreground" Value="{Binding Color}"/>
<Setter Property="Background" Value="White"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</Grid>
<StackPanel
Orientation="Vertical"
Margin="10,0">
<StackPanel Margin="10,0">
<Border BorderThickness="1" BorderBrush="White" Margin="3" MinWidth="120">
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" FontSize="26" Text="{Binding MixPSet,StringFormat={}{0:F1}}" Foreground="White" Background="Transparent"/>
...
...
@@ -120,7 +122,7 @@
<Run Text="{Binding MixSet,StringFormat={}{0:F4}}"/><Run Text="kg"/>
</TextBlock>
</StackPanel>
<StackPanel
Orientation="Vertical"
Margin="10,0">
<StackPanel Margin="10,0">
<StackPanel Orientation="Horizontal">
<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" />
...
...
@@ -140,7 +142,7 @@
</StackPanel>
<StackPanel
Orientation="Vertical"
Grid.Column="1">
<StackPanel 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="MixPSet" ItemColorBinding="Color" ItemsSource="{Binding Ingredients}"
...
...
@@ -177,11 +179,11 @@
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel
Orientation="Vertical"
>
<StackPanel>
<ItemsControl ItemsSource="{Binding Ingredients}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel
Orientation="Vertical"
/>
<StackPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
...
...
@@ -210,12 +212,12 @@
</StackPanel>
</Button>
</StackPanel>
<StackPanel
Orientation="Vertical"
Grid.Column="1">
<StackPanel Grid.Column="1">
<control:PieChart x:Name="picchart_total" Width="200" Height="200" Margin="10"
ItemValueBinding="MixCum" ItemColorBinding="Color" ItemsSource="{Binding Ingredients}"
/>
<StackPanel Orientation="Horizontal">
<StackPanel
Orientation="Vertical"
Margin="5">
<StackPanel Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader}" Text="累计产量" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent}" Text="{Binding CumulativeProduction,StringFormat={}{0:F1}}"/>
...
...
@@ -223,7 +225,7 @@
</StackPanel>
</StackPanel>
<Button Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_clear_Click" Margin="5" Width="50">
<StackPanel
Orientation="Vertical"
>
<StackPanel>
<Image Source="Images/close.png" />
<TextBlock Text="清零" Style="{StaticResource TextBlockStyle_title}" HorizontalAlignment="Center"/>
</StackPanel>
...
...
Project.FLY.Weight/FLY.Weight.UI.Client/WdIngredient.xaml.cs
View file @
0603f778
...
...
@@ -58,6 +58,7 @@ namespace FLY.Weight.UI.Client
for
(
int
j
=
0
;
j
<
weight
.
BinCnt
;
j
++)
{
int
no
=
j
+
1
;
props
.
Add
(
"MixLight_"
+
no
);
//props.Add("MixPSet_" + no);
//props.Add("MixPDisp_" + no);
props
.
Add
(
"MixCumPercent_"
+
no
);
...
...
Project.FLY.Weight/FLY.Weight/Client/MixBufferCollection.cs
View file @
0603f778
...
...
@@ -46,7 +46,7 @@ namespace FLY.Weight.Client
}
public
IBuffer
<
Lc_Mix
>
GetRollMix
(
int
index
)
{
string
name
=
$"
m
ix
{
index
}
"
;
string
name
=
$"
rollM
ix
{
index
}
"
;
if
(
buffers
.
ContainsKey
(
name
))
{
return
buffers
[
name
];
...
...
Project.FLY.Weight/FLY.Weight/Common/WeighterC.cs
View file @
0603f778
...
...
@@ -948,6 +948,7 @@ namespace FLY.Weight.Common
int
no
=
i
+
1
;
IngredientCell
ingredient
=
new
IngredientCell
();
ingredient
.
Number
=
no
.
ToString
();
Misc
.
BindingOperations
.
SetBinding
(
this
,
$"MixLight_
{
no
}
"
,
ingredient
,
"MixLight"
);
Misc
.
BindingOperations
.
SetBinding
(
this
,
$"MixPSet_
{
no
}
"
,
ingredient
,
"MixPSet"
,
Misc
.
BindingOperations
.
BindingMode
.
TwoWay
);
Misc
.
BindingOperations
.
SetBinding
(
this
,
$"MixPDisp_
{
no
}
"
,
ingredient
,
"MixPDisp"
,
Misc
.
BindingOperations
.
BindingMode
.
TwoWay
);
Misc
.
BindingOperations
.
SetBinding
(
this
,
$"MixCumPercent_
{
no
}
"
,
ingredient
,
"MixCumPercent"
,
Misc
.
BindingOperations
.
BindingMode
.
TwoWay
);
...
...
@@ -1025,7 +1026,6 @@ namespace FLY.Weight.Common
/// </summary>
public
bool
MixLight
{
get
;
set
;
}
private
float
mixPSet
;
/// <summary>
/// 比例设定
/// </summary>
...
...
thick_public
@
e1cebe18
Subproject commit
98912f441dd8a0e3d9b4b55e39134728b745e877
Subproject commit
e1cebe185cd0c19319b90c435e26abe0f8e6c45a
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment