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
2407200c
Commit
2407200c
authored
Dec 26, 2018
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 改进 称重FlowGraph DisableAnimations="True" 把动画关掉,快了很多很多
parent
fc6c69f0
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
157 deletions
+42
-157
FlowGraph.xaml
...t.FLY.Weight/FLY.Weight.UI.Client/UIModule/FlowGraph.xaml
+6
-1
FlowGraph.xaml.cs
...LY.Weight/FLY.Weight.UI.Client/UIModule/FlowGraph.xaml.cs
+14
-126
2.update_graphcustom_All.ps1
脚本/2.update_graphcustom_All.ps1
+1
-1
graphcustom_AirRingWeight5.xml
脚本/graphcustom/graphcustom_AirRingWeight5.xml
+17
-1
graphcustom_all_weight3.xml
脚本/graphcustom/graphcustom_all_weight3.xml
+0
-0
graphcustom.xml
...ws/FLY.Thick.Blowing.UI.Fix.Client/layout/graphcustom.xml
+4
-28
和美安装包_v1.1.6.zip
脚本/和美安装包_v1.1.6.zip
+0
-0
No files found.
Project.FLY.Weight/FLY.Weight.UI.Client/UIModule/FlowGraph.xaml
View file @
2407200c
...
@@ -150,7 +150,12 @@
...
@@ -150,7 +150,12 @@
</Grid>
</Grid>
<Grid Grid.Row="1" Margin="-4,0,0,0">
<Grid Grid.Row="1" Margin="-4,0,0,0">
<lvc:CartesianChart Series="{Binding Series}" Hoverable="False" DataTooltip="{x:Null}" >
<!--DisableAnimations="True" 这个非常重要,把速度提升了很多倍!!!-->
<lvc:CartesianChart DisableAnimations="True" Hoverable="False" DataTooltip="{x:Null}" >
<lvc:CartesianChart.Series>
<lvc:LineSeries Values="{Binding Values}" LineSmoothness="1" StrokeThickness="3" Configuration="{Binding Mapper}"
Stroke="{Binding Stroke}" Fill="Transparent" PointGeometrySize="0"/>
</lvc:CartesianChart.Series>
<lvc:CartesianChart.Resources>
<lvc:CartesianChart.Resources>
<Style x:Key="CleanSeparator" TargetType="lvc:Separator">
<Style x:Key="CleanSeparator" TargetType="lvc:Separator">
<Setter Property="IsEnabled" Value="False"></Setter>
<Setter Property="IsEnabled" Value="False"></Setter>
...
...
Project.FLY.Weight/FLY.Weight.UI.Client/UIModule/FlowGraph.xaml.cs
View file @
2407200c
...
@@ -43,29 +43,8 @@ namespace FLY.Weight.UI.Client.UIModule
...
@@ -43,29 +43,8 @@ namespace FLY.Weight.UI.Client.UIModule
grid_modelview
.
DataContext
=
flowGraphModelView
;
grid_modelview
.
DataContext
=
flowGraphModelView
;
grid_bufferwindow
.
DataContext
=
flowGraphModelView
.
bufferWindow
;
grid_bufferwindow
.
DataContext
=
flowGraphModelView
.
bufferWindow
;
}
}
/// <summary>
/// 测试界面用
/// </summary>
public
void
Debug
()
{
flowGraphModelView
=
new
FlowGraphModelView
();
flowGraphModelView
.
InitData_Debug
();
grid_modelview
.
DataContext
=
flowGraphModelView
;
//TODO 有问题
//itemsControl.ItemsSource = flowGraphModelView.Series;
//stackpanel_window.DataContext = flowGraphModelView.bufferWindow;
}
//private void ListBox_OnPreviewMouseDown(object sender, MouseButtonEventArgs e)
//{
// var item = ItemsControl.ContainerFromElement(ListBox, (DependencyObject)e.OriginalSource) as ListBoxItem;
// if (item == null) return;
// var series = (StackedAreaSeries)item.Content;
// if (series.Visibility == Visibility.Visible)
// series.Visibility = Visibility.Hidden;
// else
// series.Visibility = Visibility;
//}
private
void
button_info_Click
(
object
sender
,
RoutedEventArgs
e
)
private
void
button_info_Click
(
object
sender
,
RoutedEventArgs
e
)
{
{
...
@@ -159,10 +138,13 @@ namespace FLY.Weight.UI.Client.UIModule
...
@@ -159,10 +138,13 @@ namespace FLY.Weight.UI.Client.UIModule
public
ChartValues
<
FlyData_Flow
>
Values
{
get
;
set
;
}
public
ChartValues
<
FlyData_Flow
>
Values
{
get
;
set
;
}
/// <summary>
/// <summary>
///
折径曲线 XY 定义
///
曲线值转换器
/// </summary>
/// </summary>
//public CartesianMapper<FlyData_Flow> Mapper_ { get; set; }
public
CartesianMapper
<
FlyData_Flow
>
Mapper
{
get
;
set
;
}
/// <summary>
/// 曲线颜色
/// </summary>
public
Brush
Stroke
{
get
;
set
;
}
/// <summary>
/// <summary>
/// X轴格式
/// X轴格式
...
@@ -198,10 +180,6 @@ namespace FLY.Weight.UI.Client.UIModule
...
@@ -198,10 +180,6 @@ namespace FLY.Weight.UI.Client.UIModule
/// </summary>
/// </summary>
public
DateTime
EndTime
{
get
;
set
;
}
public
DateTime
EndTime
{
get
;
set
;
}
/// <summary>
/// 曲线
/// </summary>
public
SeriesCollection
Series
{
get
;
set
;
}
=
new
SeriesCollection
();
public
ObservableCollection
<
FlowGraphModelView_Item
>
Items
{
get
;
}
=
new
ObservableCollection
<
FlowGraphModelView_Item
>();
public
ObservableCollection
<
FlowGraphModelView_Item
>
Items
{
get
;
}
=
new
ObservableCollection
<
FlowGraphModelView_Item
>();
/// <summary>
/// <summary>
...
@@ -256,18 +234,8 @@ namespace FLY.Weight.UI.Client.UIModule
...
@@ -256,18 +234,8 @@ namespace FLY.Weight.UI.Client.UIModule
//根据 weightSystemClient.Item创建Series
//根据 weightSystemClient.Item创建Series
Stroke
=
new
SolidColorBrush
(
Colors
.
Black
);
LineSeries
series
=
new
LineSeries
Mapper
=
ConfigurationAll
;
{
Fill
=
new
SolidColorBrush
(
Colors
.
Transparent
),
Stroke
=
new
SolidColorBrush
(
Colors
.
Black
),
LineSmoothness
=
2
,
StrokeThickness
=
3
,
Configuration
=
ConfigurationAll
,
PointGeometrySize
=
0
};
series
.
SetBinding
(
LiveCharts
.
Wpf
.
Series
.
ValuesProperty
,
new
Binding
(
"Values"
)
{
Source
=
this
});
Series
.
Add
(
series
);
BindingSeries
();
BindingSeries
();
weightSystemClient
.
ResetItemsEvent
+=
BindingSeries
;
weightSystemClient
.
ResetItemsEvent
+=
BindingSeries
;
...
@@ -505,83 +473,6 @@ namespace FLY.Weight.UI.Client.UIModule
...
@@ -505,83 +473,6 @@ namespace FLY.Weight.UI.Client.UIModule
}
}
}
}
public
void
InitData_Debug
()
{
graphParams
=
SysParam
.
Current
.
GraphParams
;
DateTime
date
=
DateTime
.
Now
;
Random
r
=
new
Random
();
double
noise
=
2
;
double
[]
flows
=
new
double
[]
{
50
,
300
,
300
,
280
,
20
};
ObservableCollection
<
FlyData_Flow
>
Record
=
new
ObservableCollection
<
FlyData_Flow
>();
for
(
int
i
=
0
;
i
<
1000
;
i
++)
{
FlyData_Flow
flyData_Flow
=
new
FlyData_Flow
();
flyData_Flow
.
Time
=
date
.
AddSeconds
(
1
*
i
);
flyData_Flow
.
Items
=
new
FlyData_FlowItem
[
flows
.
Count
()];
for
(
int
j
=
0
;
j
<
flows
.
Count
();
j
++)
{
flyData_Flow
.
Items
[
j
]
=
new
FlyData_FlowItem
()
{
Flow
=
(
float
)(
flows
[
j
]
+
r
.
NextDouble
()
*
noise
-
noise
/
2
)
};
}
Record
.
Add
(
flyData_Flow
);
}
if
(
Record
.
Count
<=
ValuesCap
)
{
Values
.
Clear
();
Values
.
AddRange
(
Record
);
}
else
{
Values
.
Clear
();
for
(
int
i
=
0
;
i
<
ValuesCap
;
i
++)
{
int
idx
=
i
*
Record
.
Count
/
ValuesCap
;
Values
.
Add
(
Record
[
idx
]);
}
}
if
(
Values
.
Count
()
>
0
)
{
BeginTime
=
Values
.
First
().
Time
;
EndTime
=
Values
.
Last
().
Time
;
}
else
{
BeginTime
=
DateTime
.
MinValue
;
EndTime
=
DateTime
.
MinValue
;
}
for
(
int
i
=
0
;
i
<
flows
.
Count
();
i
++)
{
LineSeries
series
=
new
LineSeries
();
series
.
Title
=
((
char
)(
'A'
+
i
)).
ToString
();
series
.
Fill
=
WeighterColorDB
.
GetSelf
(
series
.
Title
);
series
.
SetBinding
(
LiveCharts
.
Wpf
.
Series
.
ValuesProperty
,
new
Binding
(
"Values"
)
{
Source
=
this
});
series
.
Configuration
=
new
GetMapperOfFlyData_Flow
(
i
).
GetCartesianMapper
();
Series
.
Add
(
series
);
}
graphParams
.
IsAxisYRangeAuto
=
true
;
if
(
graphParams
.
IsAxisYRangeAuto
)
{
MaxValue
=
double
.
NaN
;
MinValue
=
double
.
NaN
;
}
else
{
MaxValue
=
AxisYTarget
+
graphParams
.
AxisYRange
;
MinValue
=
AxisYTarget
-
graphParams
.
AxisYRange
;
}
UpdateAxisYTarget
();
}
void
UpdateAxisYTarget
()
void
UpdateAxisYTarget
()
{
{
FObjBase
.
PollModule
.
Current
.
Poll_JustOnce
(()
=>
FObjBase
.
PollModule
.
Current
.
Poll_JustOnce
(()
=>
...
@@ -638,9 +529,8 @@ namespace FLY.Weight.UI.Client.UIModule
...
@@ -638,9 +529,8 @@ namespace FLY.Weight.UI.Client.UIModule
{
{
i
.
Visibility
=
Visibility
.
Hidden
;
i
.
Visibility
=
Visibility
.
Hidden
;
}
}
LineSeries
series
=
Series
[
0
]
as
LineSeries
;
Stroke
=
new
SolidColorBrush
(
Colors
.
Black
);
series
.
Stroke
=
new
SolidColorBrush
(
Colors
.
Black
);
Mapper
=
ConfigurationAll
;
series
.
Configuration
=
ConfigurationAll
;
UpdateAxisYTarget
();
UpdateAxisYTarget
();
}
}
...
@@ -657,10 +547,8 @@ namespace FLY.Weight.UI.Client.UIModule
...
@@ -657,10 +547,8 @@ namespace FLY.Weight.UI.Client.UIModule
i
.
Visibility
=
Visibility
.
Visible
;
i
.
Visibility
=
Visibility
.
Visible
;
}
}
}
}
Stroke
=
item
.
Fill
;
LineSeries
series
=
Series
[
0
]
as
LineSeries
;
Mapper
=
new
GetMapperOfFlyData_Flow
(
item
.
Index
).
GetCartesianMapper
();
series
.
Stroke
=
item
.
Fill
;
series
.
Configuration
=
new
GetMapperOfFlyData_Flow
(
item
.
Index
).
GetCartesianMapper
();
UpdateAxisYTarget
();
UpdateAxisYTarget
();
}
}
...
...
脚本/2.update_graphcustom_All.ps1
View file @
2407200c
$src_path
=
$PSScriptRoot
+
"\graphcustom\graphcustom.xml"
$src_path
=
$PSScriptRoot
+
"\graphcustom\graphcustom.xml"
$root_path
=
$PSScriptRoot
+
"\.."
$root_path
=
$PSScriptRoot
+
"\.."
$dest_path
=
$root_path
+
"\Project.FLY.Thick.Blowing\FLY.Thick.Blowing.UI.Fix.Client\bin\Debug\layout\graphcustom.xml"
$dest_path
=
$root_path
+
"\Project.FLY.Thick.Blowing\FLY.Thick.Blowing.UI.Fix.Client\bin\Debug\layout\graphcustom
_all_weight3
.xml"
cp
$src_path
$dest_path
cp
$src_path
$dest_path
...
...
脚本/graphcustom/graphcustom_AirRingWeight5.xml
View file @
2407200c
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<FLYLayout
DynAreaWidth=
"250"
IsDynAreaVisible=
"True"
Left=
"0"
Top=
"2"
Width=
"1366"
Height=
"768"
WindowState=
"Maximized"
>
<FLYLayout
DynAreaWidth=
"250"
IsDynAreaVisible=
"True"
Left=
"0"
Top=
"2"
Width=
"1366"
Height=
"768"
WindowState=
"Maximized"
>
<Items>
<Items>
<GraphTabItem
Header=
"称 重"
ColumnCount=
"1"
RowCount=
"2"
>
<ColumnDefinitions>
<Boolean
value=
"False"
/>
</ColumnDefinitions>
<RowDefinitions>
<Boolean
value=
"False"
/>
<Boolean
value=
"False"
/>
</RowDefinitions>
<Graphs>
<GraphComponent
ID=
"60426628"
Module=
"FLY.Weight.UI.Client.UIModule.UIModule_Main"
Row=
"0"
Column=
"0"
RowSpan=
"1"
ColumnSpan=
"1"
/>
<GraphComponent
ID=
"25136147"
Module=
"FLY.Weight.UI.Client.UIModule.UIModule_FlowGraph"
Row=
"1"
Column=
"0"
RowSpan=
"1"
ColumnSpan=
"1"
/>
</Graphs>
</GraphTabItem>
<GraphTabItem
Header=
"风 环"
ColumnCount=
"1"
RowCount=
"4"
>
<GraphTabItem
Header=
"风 环"
ColumnCount=
"1"
RowCount=
"4"
>
<ColumnDefinitions>
<ColumnDefinitions>
<Boolean
value=
"False"
/>
<Boolean
value=
"False"
/>
...
@@ -54,7 +67,8 @@
...
@@ -54,7 +67,8 @@
<Boolean
value=
"False"
/>
<Boolean
value=
"False"
/>
</RowDefinitions>
</RowDefinitions>
<Graphs>
<Graphs>
<GraphComponent
ID=
"56082556"
Module=
"trendgraph"
Row=
"0"
Column=
"0"
RowSpan=
"1"
ColumnSpan=
"1"
/>
<GraphComponent
ID=
"56082556"
Module=
"trendgraph"
Row=
"1"
Column=
"0"
RowSpan=
"1"
ColumnSpan=
"1"
/>
<GraphComponent
ID=
"24898733"
Module=
"scangraph"
Row=
"0"
Column=
"0"
RowSpan=
"1"
ColumnSpan=
"1"
/>
</Graphs>
</Graphs>
</GraphTabItem>
</GraphTabItem>
<GraphTabItem
Header=
"定 点"
ColumnCount=
"1"
RowCount=
"2"
>
<GraphTabItem
Header=
"定 点"
ColumnCount=
"1"
RowCount=
"2"
>
...
@@ -77,5 +91,6 @@
...
@@ -77,5 +91,6 @@
</ControllerStates>
</ControllerStates>
<DynAreaItems>
<DynAreaItems>
<DynAreaComponent
ID=
"43395070"
Module=
"FLY.FeedbackRenZiJia.UI.Client.UIModule.UIModule_DynAreaFB"
/>
<DynAreaComponent
ID=
"43395070"
Module=
"FLY.FeedbackRenZiJia.UI.Client.UIModule.UIModule_DynAreaFB"
/>
<DynAreaComponent
ID=
"25339754"
Module=
"FLY.Weight.UI.Client.UIModule.UIModule_DynArea"
/>
</DynAreaItems>
</DynAreaItems>
</FLYLayout>
</FLYLayout>
\ No newline at end of file
脚本/graphcustom/graphcustom.xml
→
脚本/graphcustom/graphcustom
_all_weight3
.xml
View file @
2407200c
File moved
脚本/和美安装包/佛山市枫莱尔自动化技术有限公司/windows/FLY.Thick.Blowing.UI.Fix.Client/layout/graphcustom.xml
View file @
2407200c
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<FLYLayout
DynAreaWidth=
"250"
IsDynAreaVisible=
"True"
Left=
"0"
Top=
"2"
Width=
"1366"
Height=
"768"
WindowState=
"Maximized"
>
<FLYLayout
DynAreaWidth=
"250"
IsDynAreaVisible=
"True"
Left=
"0"
Top=
"2"
Width=
"1366"
Height=
"768"
WindowState=
"Maximized"
>
<Items>
<Items>
<GraphTabItem
Header=
"
收 卷"
ColumnCount=
"1"
RowCount=
"1
"
>
<GraphTabItem
Header=
"
称 重"
ColumnCount=
"1"
RowCount=
"2
"
>
<ColumnDefinitions>
<ColumnDefinitions>
<Boolean
value=
"False"
/>
<Boolean
value=
"False"
/>
</ColumnDefinitions>
</ColumnDefinitions>
<RowDefinitions>
<RowDefinitions>
<Boolean
value=
"False"
/>
<Boolean
value=
"False"
/>
</RowDefinitions>
<Graphs>
<GraphComponent
ID=
"49956960"
Module=
"FLY.Winder.UI.Client.UIModule.UIModule_Main"
Row=
"0"
Column=
"0"
RowSpan=
"1"
ColumnSpan=
"1"
/>
</Graphs>
</GraphTabItem>
<GraphTabItem
Header=
"称 重"
ColumnCount=
"1"
RowCount=
"1"
>
<ColumnDefinitions>
<Boolean
value=
"False"
/>
</ColumnDefinitions>
<RowDefinitions>
<Boolean
value=
"False"
/>
<Boolean
value=
"False"
/>
</RowDefinitions>
</RowDefinitions>
<Graphs>
<Graphs>
<GraphComponent
ID=
"60426628"
Module=
"FLY.Weight.UI.Client.UIModule.UIModule_Main"
Row=
"0"
Column=
"0"
RowSpan=
"1"
ColumnSpan=
"1"
/>
<GraphComponent
ID=
"60426628"
Module=
"FLY.Weight.UI.Client.UIModule.UIModule_Main"
Row=
"0"
Column=
"0"
RowSpan=
"1"
ColumnSpan=
"1"
/>
</Graphs>
<GraphComponent
ID=
"25136147"
Module=
"FLY.Weight.UI.Client.UIModule.UIModule_FlowGraph"
Row=
"1"
Column=
"0"
RowSpan=
"1"
ColumnSpan=
"1"
/>
</GraphTabItem>
<GraphTabItem
Header=
"I B C"
ColumnCount=
"1"
RowCount=
"1"
>
<ColumnDefinitions>
<Boolean
value=
"False"
/>
</ColumnDefinitions>
<RowDefinitions>
<Boolean
value=
"False"
/>
<Boolean
value=
"False"
/>
</RowDefinitions>
<Graphs>
<GraphComponent
ID=
"65203096"
Module=
"FLY.IBC.UI.Client.UIModule.UIModule_Main"
Row=
"0"
Column=
"0"
RowSpan=
"1"
ColumnSpan=
"1"
/>
</Graphs>
</Graphs>
</GraphTabItem>
</GraphTabItem>
<GraphTabItem
Header=
"风 环"
ColumnCount=
"1"
RowCount=
"4"
>
<GraphTabItem
Header=
"风 环"
ColumnCount=
"1"
RowCount=
"4"
>
...
@@ -88,8 +67,8 @@
...
@@ -88,8 +67,8 @@
<Boolean
value=
"False"
/>
<Boolean
value=
"False"
/>
</RowDefinitions>
</RowDefinitions>
<Graphs>
<Graphs>
<GraphComponent
ID=
"56082556"
Module=
"trendgraph"
Row=
"
0
"
Column=
"0"
RowSpan=
"1"
ColumnSpan=
"1"
/>
<GraphComponent
ID=
"56082556"
Module=
"trendgraph"
Row=
"
1
"
Column=
"0"
RowSpan=
"1"
ColumnSpan=
"1"
/>
<GraphComponent
ID=
"
36196647"
Module=
"FLY.Weight.UI.Client.UIModule.UIModule_FlowGraph"
Row=
"1
"
Column=
"0"
RowSpan=
"1"
ColumnSpan=
"1"
/>
<GraphComponent
ID=
"
24898733"
Module=
"scangraph"
Row=
"0
"
Column=
"0"
RowSpan=
"1"
ColumnSpan=
"1"
/>
</Graphs>
</Graphs>
</GraphTabItem>
</GraphTabItem>
<GraphTabItem
Header=
"定 点"
ColumnCount=
"1"
RowCount=
"2"
>
<GraphTabItem
Header=
"定 点"
ColumnCount=
"1"
RowCount=
"2"
>
...
@@ -112,8 +91,6 @@
...
@@ -112,8 +91,6 @@
</ControllerStates>
</ControllerStates>
<DynAreaItems>
<DynAreaItems>
<DynAreaComponent
ID=
"43395070"
Module=
"FLY.FeedbackRenZiJia.UI.Client.UIModule.UIModule_DynAreaFB"
/>
<DynAreaComponent
ID=
"43395070"
Module=
"FLY.FeedbackRenZiJia.UI.Client.UIModule.UIModule_DynAreaFB"
/>
<DynAreaComponent
ID=
"55011311"
Module=
"FLY.IBC.UI.Client.UIModule.UIModule_DynArea"
/>
<DynAreaComponent
ID=
"25339754"
Module=
"FLY.Weight.UI.Client.UIModule.UIModule_DynArea"
/>
<DynAreaComponent
ID=
"25339754"
Module=
"FLY.Weight.UI.Client.UIModule.UIModule_DynArea"
/>
<DynAreaComponent
ID=
"26731201"
Module=
"FLY.Winder.UI.Client.UIModule.UIModule_DynArea"
/>
</DynAreaItems>
</DynAreaItems>
</FLYLayout>
</FLYLayout>
\ No newline at end of file
脚本/和美安装包_v1.1.6.zip
View file @
2407200c
No preview for this file type
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