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
0d19fe78
Commit
0d19fe78
authored
Jul 21, 2020
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化 称重MainGraph 也变成 MainGraphV4模式
parent
a0a202b4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
521 deletions
+8
-521
MainGraph.xaml
...t.FLY.Weight/FLY.Weight.UI.Client/UIModule/MainGraph.xaml
+3
-379
MainGraph.xaml.cs
...LY.Weight/FLY.Weight.UI.Client/UIModule/MainGraph.xaml.cs
+5
-141
MainGraphV4.xaml.cs
....Weight/FLY.Weight.UI.Client/UiModule/MainGraphV4.xaml.cs
+0
-1
No files found.
Project.FLY.Weight/FLY.Weight.UI.Client/UIModule/MainGraph.xaml
View file @
0d19fe78
This diff is collapsed.
Click to expand it.
Project.FLY.Weight/FLY.Weight.UI.Client/UIModule/MainGraph.xaml.cs
View file @
0d19fe78
...
@@ -31,7 +31,6 @@ namespace FLY.Weight.UI.Client.UiModule
...
@@ -31,7 +31,6 @@ namespace FLY.Weight.UI.Client.UiModule
IUnityContainer
container
;
IUnityContainer
container
;
IWeightSystemService
weightSystemService
;
IWeightSystemService
weightSystemService
;
SetPLCUpdatePlan
setPlan_accessory
;
List
<
SetPLCUpdatePlan
>
setPlan_items
=
new
List
<
SetPLCUpdatePlan
>();
List
<
SetPLCUpdatePlan
>
setPlan_items
=
new
List
<
SetPLCUpdatePlan
>();
public
MainGraph
()
public
MainGraph
()
{
{
...
@@ -45,42 +44,18 @@ namespace FLY.Weight.UI.Client.UiModule
...
@@ -45,42 +44,18 @@ namespace FLY.Weight.UI.Client.UiModule
IWeightSystemService
weightSystemService
)
IWeightSystemService
weightSystemService
)
{
{
this
.
container
=
container
;
this
.
container
=
container
;
ucTotalFlow
.
Init
(
weightSystemService
);
ucThickness
.
Init
(
weightSystemService
);
this
.
weightSystemService
=
weightSystemService
;
this
.
weightSystemService
=
weightSystemService
;
root_grid
.
DataContext
=
this
.
weightSystemService
;
root_grid
.
DataContext
=
this
.
weightSystemService
;
setPlan_accessory
=
new
SetPLCUpdatePlan
(
this
.
weightSystemService
.
PLCos
,
this
.
weightSystemService
.
Accessory
,
new
string
[]
{
"TotalFlowSetting"
,
"TotalFlow"
,
"TotalProduction"
,
"ALast"
,
"ACurrent"
,
"ACurrentLen"
,
"AClear"
,
"BLast"
,
"BCurrent"
,
"BCurrentLen"
,
"BClear"
,
"TotalFilmWidth"
,
"IsRimNoRecycle"
,
"RimWidth"
,
"ActFilmWidth"
,
"SetThickness"
,
"TargetVelocity"
,
"CurrentVelocity"
});
for
(
int
i
=
0
;
i
<
this
.
weightSystemService
.
Items
.
Count
();
i
++)
for
(
int
i
=
0
;
i
<
this
.
weightSystemService
.
Items
.
Count
();
i
++)
{
{
SetPLCUpdatePlan
plan
=
new
SetPLCUpdatePlan
(
SetPLCUpdatePlan
plan
=
new
SetPLCUpdatePlan
(
this
.
weightSystemService
.
PLCos
,
this
.
weightSystemService
.
PLCos
,
this
.
weightSystemService
.
Items
[
i
],
this
.
weightSystemService
.
Items
[
i
],
item_update_propertynames
);
UcWeighterItem
.
item_update_propertynames
);
setPlan_items
.
Add
(
plan
);
setPlan_items
.
Add
(
plan
);
}
}
if
(
weightSystemService
is
WeightSystemServiceClient
)
{
if
(
weightSystemService
is
WeightSystemServiceClient
)
{
...
@@ -111,123 +86,12 @@ namespace FLY.Weight.UI.Client.UiModule
...
@@ -111,123 +86,12 @@ namespace FLY.Weight.UI.Client.UiModule
SetPLCUpdatePlan
plan
=
new
SetPLCUpdatePlan
(
SetPLCUpdatePlan
plan
=
new
SetPLCUpdatePlan
(
weightSystemService
.
PLCos
,
weightSystemService
.
PLCos
,
weightSystemService
.
Items
[
start_idx
+
i
],
weightSystemService
.
Items
[
start_idx
+
i
],
item_update_propertynames
);
UcWeighterItem
.
item_update_propertynames
);
setPlan_items
.
Add
(
plan
);
setPlan_items
.
Add
(
plan
);
}
}
}
}
}
}
string
[]
item_update_propertynames
=
new
string
[]
{
"CurrentFlow"
,
"CumulativeProduction"
,
"FlowSetting"
,
"CurrentFlow"
,
"ScrewPDisp"
,
"ScrewPSet"
,
"ScrewPDisp"
,
"MixBucketWeight"
,
"BinWeight"
,
"MixIsOn"
,
"BucketValveIsOpen"
,
"ScrewMotorFreq"
,
"ScrewMotorIsOn"
,
"ScrewIsAutoMode"
,
"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_info_Click
(
object
sender
,
RoutedEventArgs
e
)
{
PgMenu
p
=
new
PgMenu
();
container
.
BuildUp
(
p
);
MultiLayout
.
FlyLayoutManager
.
NavigationService
.
Navigate
(
p
);
}
private
void
button_clear_Click
(
object
sender
,
RoutedEventArgs
e
)
{
foreach
(
FLY
.
Weight
.
Common
.
WeighterC
weight
in
weightSystemService
.
Items
)
{
weight
.
ClearProduction
=
true
;
}
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
""
,
"清空成功"
,
TimeSpan
.
FromSeconds
(
2
));
}
private
void
button_ingredient_Click
(
object
sender
,
RoutedEventArgs
e
)
{
WdIngredient
w
=
new
WdIngredient
();
var
weight
=
((
Button
)
sender
).
Tag
as
WeighterC
;
w
.
Init
(
container
,
weight
,
weightSystemService
);
w
.
Owner
=
FLY
.
ControlLibrary
.
COMMON
.
GetWindow
(
this
);
w
.
ShowDialog
();
}
private
void
button_thickness_Click
(
object
sender
,
RoutedEventArgs
e
)
{
WdThickness
w
=
new
WdThickness
();
if
(
weightSystemService
.
Items
.
Count
()
<
1
)
return
;
w
.
SetThickness
=
(
int
)
weightSystemService
.
Accessory
.
SetThickness
;
w
.
FilmWidth
=
(
int
)
weightSystemService
.
Accessory
.
TotalFilmWidth
;
w
.
RimWidth
=
(
int
)
weightSystemService
.
Accessory
.
RimWidth
;
w
.
IsRimNoRecycle
=
weightSystemService
.
Accessory
.
IsRimNoRecycle
;
w
.
Owner
=
FLY
.
ControlLibrary
.
COMMON
.
GetWindow
(
this
);
if
(
w
.
ShowDialog
()
==
true
)
{
weightSystemService
.
Accessory
.
SetThickness
=
w
.
SetThickness
;
weightSystemService
.
Accessory
.
TotalFilmWidth
=
w
.
FilmWidth
;
weightSystemService
.
Accessory
.
RimWidth
=
w
.
RimWidth
;
weightSystemService
.
Accessory
.
IsRimNoRecycle
=
w
.
IsRimNoRecycle
;
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
""
,
"厚度参数设置成功"
,
TimeSpan
.
FromSeconds
(
2
));
}
}
private
void
button_aclear_Click
(
object
sender
,
RoutedEventArgs
e
)
{
if
(
weightSystemService
.
ItemsCnt
>
0
)
{
weightSystemService
.
Accessory
.
AClear
=
true
;
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
""
,
"清空成功"
,
TimeSpan
.
FromSeconds
(
2
));
}
}
private
void
button_bclear_Click
(
object
sender
,
RoutedEventArgs
e
)
{
if
(
weightSystemService
.
ItemsCnt
>
0
)
{
weightSystemService
.
Accessory
.
BClear
=
true
;
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
""
,
"清空成功"
,
TimeSpan
.
FromSeconds
(
2
));
}
}
}
}
...
...
Project.FLY.Weight/FLY.Weight.UI.Client/UiModule/MainGraphV4.xaml.cs
View file @
0d19fe78
...
@@ -31,7 +31,6 @@ namespace FLY.Weight.UI.Client.UiModule
...
@@ -31,7 +31,6 @@ namespace FLY.Weight.UI.Client.UiModule
IUnityContainer
container
;
IUnityContainer
container
;
IWeightSystemService
weightSystemService
;
IWeightSystemService
weightSystemService
;
SetPLCUpdatePlan
setPlan_accessory
;
List
<
SetPLCUpdatePlan
>
setPlan_items
=
new
List
<
SetPLCUpdatePlan
>();
List
<
SetPLCUpdatePlan
>
setPlan_items
=
new
List
<
SetPLCUpdatePlan
>();
public
MainGraphV4
()
public
MainGraphV4
()
{
{
...
...
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