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
5998999a
Commit
5998999a
authored
Sep 22, 2021
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 称重添加电流显示, 版本号是V35, 只有 和美公司里面的那个而已
parent
a077b3db
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
516 additions
and
3 deletions
+516
-3
FLY.Weight.UI.Client.csproj
...Y.Weight/FLY.Weight.UI.Client/FLY.Weight.UI.Client.csproj
+14
-0
UiModule2_MainGraph.cs
...ight/FLY.Weight.UI.Client/UiModule/UiModule2_MainGraph.cs
+5
-0
MainGraphV3p5_2.xaml
...t/FLY.Weight.UI.Client/UiModule/V3.5/MainGraphV3p5_2.xaml
+57
-0
MainGraphV3p5_2.xaml.cs
...LY.Weight.UI.Client/UiModule/V3.5/MainGraphV3p5_2.xaml.cs
+99
-0
UcWeighterItemV3p5_2.xaml
....Weight.UI.Client/UiModule/V3.5/UcWeighterItemV3p5_2.xaml
+168
-0
UcWeighterItemV3p5_2.xaml.cs
...ight.UI.Client/UiModule/V3.5/UcWeighterItemV3p5_2.xaml.cs
+159
-0
WdSetup.xaml.cs
Project.FLY.Weight/FLY.Weight.UI.Server/WdSetup.xaml.cs
+8
-3
WeighterC.cs
Project.FLY.Weight/FLY.Weight/Common/WeighterC.cs
+6
-0
plcgroup.json
Resource/称重/设备连接变量表_44446_v35(螺杆电流)/Generated/plcgroup.json
+0
-0
HMI-44446.xlsx
Resource/称重/设备连接变量表_44446_v35(螺杆电流)/HMI-44446.xlsx
+0
-0
plcgroup.json
...plcgroups/设备连接变量表_44446_v35(螺杆电流)/Generated/plcgroup.json
+0
-0
plcgroup.json
设备连接变量表_44446_v3.5(螺杆电流)/Generated/plcgroup.json
+0
-0
HMI-44446.xlsx
设备连接变量表_44446_v3.5(螺杆电流)/HMI-44446.xlsx
+0
-0
No files found.
Project.FLY.Weight/FLY.Weight.UI.Client/FLY.Weight.UI.Client.csproj
View file @
5998999a
...
@@ -89,6 +89,12 @@
...
@@ -89,6 +89,12 @@
<Compile
Include=
"PgReduce.xaml.cs"
>
<Compile
Include=
"PgReduce.xaml.cs"
>
<DependentUpon>
PgReduce.xaml
</DependentUpon>
<DependentUpon>
PgReduce.xaml
</DependentUpon>
</Compile>
</Compile>
<Compile
Include=
"UiModule\V3.5\MainGraphV3p5_2.xaml.cs"
>
<DependentUpon>
MainGraphV3p5_2.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"UiModule\V3.5\UcWeighterItemV3p5_2.xaml.cs"
>
<DependentUpon>
UcWeighterItemV3p5_2.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"UiModule\V4\MenuSettingV4.xaml.cs"
>
<Compile
Include=
"UiModule\V4\MenuSettingV4.xaml.cs"
>
<DependentUpon>
MenuSettingV4.xaml
</DependentUpon>
<DependentUpon>
MenuSettingV4.xaml
</DependentUpon>
</Compile>
</Compile>
...
@@ -245,6 +251,14 @@
...
@@ -245,6 +251,14 @@
<SubType>
Designer
</SubType>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
<Generator>
MSBuild:Compile
</Generator>
</Page>
</Page>
<Page
Include=
"UiModule\V3.5\MainGraphV3p5_2.xaml"
>
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
</Page>
<Page
Include=
"UiModule\V3.5\UcWeighterItemV3p5_2.xaml"
>
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
</Page>
<Page
Include=
"UiModule\V4\MenuSettingV4.xaml"
>
<Page
Include=
"UiModule\V4\MenuSettingV4.xaml"
>
<Generator>
MSBuild:Compile
</Generator>
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
<SubType>
Designer
</SubType>
...
...
Project.FLY.Weight/FLY.Weight.UI.Client/UiModule/UiModule2_MainGraph.cs
View file @
5998999a
...
@@ -71,6 +71,11 @@ namespace FLY.Weight.UI.Client.UiModule
...
@@ -71,6 +71,11 @@ namespace FLY.Weight.UI.Client.UiModule
}
}
}
}
break
;
break
;
case
35
:
{
return
container
.
Resolve
<
MainGraphV3p5_2
>();
}
break
;
default
:
default
:
{
{
if
(
itemStyle
==
0
)
if
(
itemStyle
==
0
)
...
...
Project.FLY.Weight/FLY.Weight.UI.Client/UiModule/V3.5/MainGraphV3p5_2.xaml
0 → 100644
View file @
5998999a
<UserControl x:Class="FLY.Weight.UI.Client.UiModule.MainGraphV3p5_2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FLY.Weight.UI.Client.UiModule"
xmlns:control="clr-namespace:FLY.Weight.UI.Client.Control"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" >
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.Weight.UI.Client;component/Themes/UcWeighterItemStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid x:Name="container_grid"/>
<Viewbox Stretch="Uniform" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid Name="root_grid" d:DataContext="{StaticResource unittests_weighters}">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<local:UcTotalFlow x:Name="ucTotalFlow" Margin="{StaticResource ControlMargin}" />
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<local:UcThickness x:Name="ucThickness" Margin="{StaticResource ControlMargin}"/>
<ItemsControl x:Name="itemsControl" Grid.Column="1" ItemsSource="{Binding Items}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:UcWeighterItemV3p5_2 Margin="{StaticResource ControlMargin}"
WeightSystemService="{Binding DataContext,ElementName=root_grid}"
Container="{Binding DataContext,ElementName=container_grid}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</Grid>
</Viewbox>
</Grid>
</UserControl>
Project.FLY.Weight/FLY.Weight.UI.Client/UiModule/V3.5/MainGraphV3p5_2.xaml.cs
0 → 100644
View file @
5998999a
using
FLY.OBJComponents.Client
;
using
FLY.Weight.Client
;
using
FLY.Weight.Common
;
using
FLY.Weight.IService
;
using
MultiLayout
;
using
MultiLayout.UiModule
;
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.Controls
;
using
System.Windows.Data
;
using
System.Windows.Documents
;
using
System.Windows.Input
;
using
System.Windows.Media
;
using
System.Windows.Media.Imaging
;
using
System.Windows.Navigation
;
using
System.Windows.Shapes
;
using
Unity
;
namespace
FLY.Weight.UI.Client.UiModule
{
/// <summary>
/// Page_Main.xaml 的交互逻辑
/// </summary>
public
partial
class
MainGraphV3p5_2
:
UserControl
{
IWeightSystemService
weightSystemService
;
List
<
SetPLCUpdatePlan
>
setPlan_items
=
new
List
<
SetPLCUpdatePlan
>();
public
MainGraphV3p5_2
()
{
InitializeComponent
();
}
[
InjectionMethod
]
public
void
Init
(
IUnityContainer
container
,
IWeightSystemService
weightSystemService
)
{
this
.
container_grid
.
DataContext
=
container
;
ucTotalFlow
.
Init
(
weightSystemService
);
ucThickness
.
Init
(
weightSystemService
);
this
.
weightSystemService
=
weightSystemService
;
root_grid
.
DataContext
=
this
.
weightSystemService
;
for
(
int
i
=
0
;
i
<
this
.
weightSystemService
.
Items
.
Count
();
i
++)
{
SetPLCUpdatePlan
plan
=
new
SetPLCUpdatePlan
(
this
.
weightSystemService
.
PLCos
,
this
.
weightSystemService
.
Items
[
i
],
UcWeighterItem
.
item_update_propertynames
);
setPlan_items
.
Add
(
plan
);
}
if
(
weightSystemService
is
WeightSystemServiceClient
)
{
(
weightSystemService
as
WeightSystemServiceClient
).
ResetItemsEvent
+=
MWeighterCsService_ResetItemsEvent
;
}
}
private
void
MWeighterCsService_ResetItemsEvent
()
{
//把多出来的删除
int
remove_cnt
=
setPlan_items
.
Count
()
-
weightSystemService
.
Items
.
Count
();
if
(
remove_cnt
>
0
)
{
for
(
int
i
=
0
;
i
<
remove_cnt
;
i
++)
{
SetPLCUpdatePlan
plan
=
setPlan_items
[
setPlan_items
.
Count
()
-
1
-
i
];
plan
.
Dispose
();
}
setPlan_items
.
RemoveRange
(
setPlan_items
.
Count
()
-
remove_cnt
,
remove_cnt
);
}
else
{
int
start_idx
=
setPlan_items
.
Count
();
int
add_cnt
=
-
remove_cnt
;
for
(
int
i
=
0
;
i
<
add_cnt
;
i
++)
{
SetPLCUpdatePlan
plan
=
new
SetPLCUpdatePlan
(
weightSystemService
.
PLCos
,
weightSystemService
.
Items
[
start_idx
+
i
],
UcWeighterItem
.
item_update_propertynames
);
setPlan_items
.
Add
(
plan
);
}
}
}
}
}
Project.FLY.Weight/FLY.Weight.UI.Client/UiModule/V3.5/UcWeighterItemV3p5_2.xaml
0 → 100644
View file @
5998999a
This diff is collapsed.
Click to expand it.
Project.FLY.Weight/FLY.Weight.UI.Client/UiModule/V3.5/UcWeighterItemV3p5_2.xaml.cs
0 → 100644
View file @
5998999a
using
FLY.OBJComponents.Client
;
using
FLY.Weight.Client
;
using
FLY.Weight.IService
;
using
MultiLayout.UiModule
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows
;
using
System.Windows.Controls
;
using
System.Windows.Data
;
using
System.Windows.Documents
;
using
System.Windows.Input
;
using
System.Windows.Media
;
using
System.Windows.Media.Imaging
;
using
System.Windows.Navigation
;
using
System.Windows.Shapes
;
using
Unity
;
namespace
FLY.Weight.UI.Client.UiModule
{
/// <summary>
/// UcWeighterItem.xaml 的交互逻辑
/// </summary>
public
partial
class
UcWeighterItemV3p5_2
:
UserControl
{
#
region
DependencyProperty
// Using a DependencyProperty as the backing store for WeightSystemService. This enables animation, styling, binding, etc...
public
static
readonly
DependencyProperty
WeightSystemServiceProperty
=
DependencyProperty
.
Register
(
nameof
(
WeightSystemService
),
typeof
(
IWeightSystemService
),
typeof
(
UcWeighterItemV3p5_2
),
new
PropertyMetadata
(
null
));
public
IWeightSystemService
WeightSystemService
{
get
{
return
(
IWeightSystemService
)
GetValue
(
WeightSystemServiceProperty
);
}
set
{
SetValue
(
WeightSystemServiceProperty
,
value
);
}
}
public
static
readonly
DependencyProperty
ContainerProperty
=
DependencyProperty
.
Register
(
nameof
(
Container
),
typeof
(
IUnityContainer
),
typeof
(
UcWeighterItemV3p5_2
),
new
PropertyMetadata
(
null
));
public
IUnityContainer
Container
{
get
{
return
(
IUnityContainer
)
GetValue
(
ContainerProperty
);
}
set
{
SetValue
(
ContainerProperty
,
value
);
}
}
#
endregion
SetPLCUpdatePlan
plan
;
int
Index
=
0
;
public
UcWeighterItemV3p5_2
()
{
InitializeComponent
();
}
[
InjectionMethod
]
public
void
Init
(
IUnityContainer
container
,
int
id
,
IWeightSystemService
weightSystemService
)
{
this
.
Container
=
container
;
this
.
WeightSystemService
=
weightSystemService
;
//查找参数
if
(
WeighterItemParams
.
Current
.
Indexs
.
ContainsKey
(
id
))
{
Index
=
WeighterItemParams
.
Current
.
Indexs
[
id
];
}
else
{
for
(
int
i
=
0
;
i
<
this
.
WeightSystemService
.
Items
.
Count
();
i
++)
{
if
(!
WeighterItemParams
.
Current
.
Indexs
.
ContainsValue
(
i
))
{
WeighterItemParams
.
Current
.
Indexs
.
Add
(
id
,
i
);
Index
=
i
;
break
;
}
}
}
int
idx
=
Index
;
if
(
idx
>=
this
.
WeightSystemService
.
Items
.
Count
())
idx
=
this
.
WeightSystemService
.
Items
.
Count
()
-
1
;
else
if
(
idx
<
0
)
idx
=
0
;
this
.
DataContext
=
this
.
WeightSystemService
.
Items
[
idx
];
plan
=
new
SetPLCUpdatePlan
(
this
.
WeightSystemService
.
PLCos
,
this
.
WeightSystemService
.
Items
[
idx
],
item_update_propertynames
);
}
public
static
string
[]
item_update_propertynames
=
new
string
[]
{
// "CumulativeProduction",
nameof
(
Common
.
WeighterC
.
FlowSetting
),
nameof
(
Common
.
WeighterC
.
CurrentFlow
),
nameof
(
Common
.
WeighterC
.
ScrewPDisp
),
nameof
(
Common
.
WeighterC
.
ScrewPSet
),
nameof
(
Common
.
WeighterC
.
ScrewPDisp
),
nameof
(
Common
.
WeighterC
.
ScrewEleCurrent
),
nameof
(
Common
.
WeighterC
.
MixBucketWeight
),
nameof
(
Common
.
WeighterC
.
BinWeight
),
nameof
(
Common
.
WeighterC
.
MixIsOn
),
nameof
(
Common
.
WeighterC
.
BucketValveIsOpen
),
nameof
(
Common
.
WeighterC
.
ScrewMotorFreq
),
nameof
(
Common
.
WeighterC
.
ScrewMotorIsOn
),
nameof
(
Common
.
WeighterC
.
ScrewIsAutoMode
),
nameof
(
Common
.
WeighterC
.
ScrewManualFreq
)
};
private
async
void
button_frequency_Click
(
object
sender
,
RoutedEventArgs
e
)
{
WdFrequency
w
=
new
WdFrequency
();
var
weight
=
((
Button
)
sender
).
Tag
as
FLY
.
Weight
.
Common
.
WeighterC
;
w
.
FrequencySet
=
weight
.
ScrewManualFreq
;
w
.
Owner
=
FLY
.
ControlLibrary
.
COMMON
.
GetWindow
(
this
);
if
(
w
.
ShowDialog
()
==
true
)
{
//TODO
weight
.
ScrewManualFreq
=
(
float
)
w
.
FrequencySet
;
weight
.
ScrewManualFreqIsSet
=
true
;
//不用写下降沿!!!!!
}
}
private
void
button_ratio_Click
(
object
sender
,
RoutedEventArgs
e
)
{
WdRatioSet
w
=
new
WdRatioSet
();
w
.
Owner
=
FLY
.
ControlLibrary
.
COMMON
.
GetWindow
(
this
);
w
.
Init
(
WeightSystemService
);
w
.
ShowDialog
();
}
private
void
button_ingredient_Click
(
object
sender
,
RoutedEventArgs
e
)
{
FLY
.
Weight
.
Common
.
WeighterC
weight
=
((
Button
)
sender
).
Tag
as
FLY
.
Weight
.
Common
.
WeighterC
;
if
(
weight
.
IsSingle
)
{
//单组份,没有配料
return
;
}
WdIngredient
w
=
new
WdIngredient
();
w
.
Init
(
Container
,
weight
,
WeightSystemService
);
w
.
Owner
=
FLY
.
ControlLibrary
.
COMMON
.
GetWindow
(
this
);
w
.
ShowDialog
();
}
}
}
Project.FLY.Weight/FLY.Weight.UI.Server/WdSetup.xaml.cs
View file @
5998999a
...
@@ -78,7 +78,8 @@ namespace FLY.Weight.UI.Server
...
@@ -78,7 +78,8 @@ namespace FLY.Weight.UI.Server
new
DataVersion
(){
Name
=
"V2"
,
Version
=
2
},
new
DataVersion
(){
Name
=
"V2"
,
Version
=
2
},
new
DataVersion
(){
Name
=
"V3"
,
Version
=
3
},
new
DataVersion
(){
Name
=
"V3"
,
Version
=
3
},
new
DataVersion
(){
Name
=
"V4"
,
Version
=
4
},
new
DataVersion
(){
Name
=
"V4"
,
Version
=
4
},
new
DataVersion
(){
Name
=
"V5"
,
Version
=
5
}
new
DataVersion
(){
Name
=
"V5"
,
Version
=
5
},
new
DataVersion
(){
Name
=
"V35"
,
Version
=
35
}
};
};
public
ObservableCollection
<
WeightStyle
>
WeightStyles
{
get
;
}
=
new
ObservableCollection
<
WeightStyle
>{
public
ObservableCollection
<
WeightStyle
>
WeightStyles
{
get
;
}
=
new
ObservableCollection
<
WeightStyle
>{
...
@@ -321,7 +322,7 @@ namespace FLY.Weight.UI.Server
...
@@ -321,7 +322,7 @@ namespace FLY.Weight.UI.Server
public
string
Path
{
get
;
set
;
}
public
string
Path
{
get
;
set
;
}
}
}
public
class
DataVersion
public
class
DataVersion
:
INotifyPropertyChanged
{
{
/// <summary>
/// <summary>
/// 名称
/// 名称
...
@@ -331,8 +332,10 @@ namespace FLY.Weight.UI.Server
...
@@ -331,8 +332,10 @@ namespace FLY.Weight.UI.Server
/// 版本
/// 版本
/// </summary>
/// </summary>
public
int
Version
{
get
;
set
;
}
public
int
Version
{
get
;
set
;
}
public
event
PropertyChangedEventHandler
PropertyChanged
;
}
}
public
class
WeightStyle
public
class
WeightStyle
:
INotifyPropertyChanged
{
{
/// <summary>
/// <summary>
/// 名称
/// 名称
...
@@ -342,6 +345,8 @@ namespace FLY.Weight.UI.Server
...
@@ -342,6 +345,8 @@ namespace FLY.Weight.UI.Server
/// 版本
/// 版本
/// </summary>
/// </summary>
public
int
ItemStyle
{
get
;
set
;
}
public
int
ItemStyle
{
get
;
set
;
}
public
event
PropertyChangedEventHandler
PropertyChanged
;
}
}
public
class
BinCntsConverter
:
IValueConverter
public
class
BinCntsConverter
:
IValueConverter
{
{
...
...
Project.FLY.Weight/FLY.Weight/Common/WeighterC.cs
View file @
5998999a
...
@@ -114,6 +114,12 @@ namespace FLY.Weight.Common
...
@@ -114,6 +114,12 @@ namespace FLY.Weight.Common
[
Description
(
"设定比例"
)]
[
Description
(
"设定比例"
)]
public
float
ScrewPSet
{
get
;
set
;
}
public
float
ScrewPSet
{
get
;
set
;
}
/// <summary>
/// 螺杆电流
/// </summary>
[
Description
(
"螺杆电流"
)]
public
float
ScrewEleCurrent
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 本层密度
/// 本层密度
/// </summary>
/// </summary>
...
...
Resource/称重/设备连接变量表_44446_v35(螺杆电流)/Generated/plcgroup.json
0 → 100644
View file @
5998999a
This diff is collapsed.
Click to expand it.
Resource/称重/设备连接变量表_44446_v35(螺杆电流)/HMI-44446.xlsx
0 → 100644
View file @
5998999a
File added
脚本/release_conf/FLY.Weight.UI.Server/Gage1/plcgroups/设备连接变量表_44446_v35(螺杆电流)/Generated/plcgroup.json
0 → 100644
View file @
5998999a
This diff is collapsed.
Click to expand it.
设备连接变量表_44446_v3.5(螺杆电流)/Generated/plcgroup.json
0 → 100644
View file @
5998999a
This diff is collapsed.
Click to expand it.
设备连接变量表_44446_v3.5(螺杆电流)/HMI-44446.xlsx
0 → 100644
View file @
5998999a
File added
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