Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Thick-Common
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
潘栩锋
Thick-Common
Commits
fad96eee
Commit
fad96eee
authored
Dec 03, 2019
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小修改
parent
5d83800f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
324 additions
and
237 deletions
+324
-237
ConnContext.cs
Project.FLY.FObjSys/FObjSys/ConnContext.cs
+1
-1
TimeGridAdvEventArgs.cs
...FLY.FlyADBase/FlyADBase/EventArgs/TimeGridAdvEventArgs.cs
+2
-1
FlyADClientAdv.cs
Project.FLY.FlyADBase/FlyADBase/FlyADClientAdv.cs
+6
-1
IFlyADClientAdv.cs
Project.FLY.FlyADBase/FlyADBase/IFlyADClientAdv.cs
+2
-0
App.xaml.cs
Project.FLY.FlyADBase/Flyad7_WPF/App.xaml.cs
+4
-0
AutoGetGridAdv.cs
Project.FLY.FlyADBase/Flyad7_WPF/AutoGetGridAdv.cs
+18
-13
AutoSync.cs
Project.FLY.FlyADBase/Flyad7_WPF/AutoSync.cs
+3
-3
DebugAppParam.cs
Project.FLY.FlyADBase/Flyad7_WPF/DebugAppParam.cs
+2
-5
Flyad7_WPF.csproj
Project.FLY.FlyADBase/Flyad7_WPF/Flyad7_WPF.csproj
+34
-3
GridAdvVm.cs
Project.FLY.FlyADBase/Flyad7_WPF/GridAdvVm.cs
+11
-89
MainWindow.xaml
Project.FLY.FlyADBase/Flyad7_WPF/MainWindow.xaml
+1
-0
MainWindow.xaml.cs
Project.FLY.FlyADBase/Flyad7_WPF/MainWindow.xaml.cs
+100
-27
StringResource.en-US.xaml
....Base/FLY.Thick.Base.UI/Culture/StringResource.en-US.xaml
+2
-0
StringResource.zh-CN.xaml
....Base/FLY.Thick.Base.UI/Culture/StringResource.zh-CN.xaml
+2
-0
Page_Initparam.xaml
Project.FLY.Thick.Base/FLY.Thick.Base.UI/Page_Initparam.xaml
+104
-89
SysParam.cs
Project.FLY.Thick.Base/FLY.Thick.Base.UI/SysParam.cs
+0
-2
InitParamServiceClient.cs
...hick.Base/FLY.Thick.Base/Client/InitParamServiceClient.cs
+6
-0
IInitParamService.cs
...Y.Thick.Base/FLY.Thick.Base/IService/IInitParamService.cs
+1
-0
INITPARAM_OBJ_INTERFACE.cs
...e/FLY.Thick.Base/OBJ_INTERFACE/INITPARAM_OBJ_INTERFACE.cs
+2
-1
Initparam_OBJProxy.cs
...Base/FLY.Thick.Base/Server.OBJProxy/Initparam_OBJProxy.cs
+2
-0
AD2ThickHandler.cs
...t.FLY.Thick.Base/FLY.Thick.Base/Server/AD2ThickHandler.cs
+12
-0
InitParam.cs
Project.FLY.Thick.Base/FLY.Thick.Base/Server/InitParam.cs
+9
-2
No files found.
Project.FLY.FObjSys/FObjSys/ConnContext.cs
View file @
fad96eee
...
...
@@ -29,5 +29,5 @@ namespace FObjBase
}
}
public
delegate
void
AsyncCBHandler
(
object
AsyncState
,
object
retData
);
public
delegate
void
AsyncCBHandler
(
object
asyncContext
,
object
retData
);
}
Project.FLY.FlyADBase/FlyADBase/EventArgs/TimeGridAdvEventArgs.cs
View file @
fad96eee
...
...
@@ -23,6 +23,7 @@ namespace FlyADBase
///
/// </summary>
public
int
Marker
{
get
;
set
;
}
public
Misc
.
DIRECTION
Direction
{
get
;
set
;
}
/// <summary>
/// 数据
/// </summary>
...
...
Project.FLY.FlyADBase/FlyADBase/FlyADClientAdv.cs
View file @
fad96eee
...
...
@@ -429,7 +429,12 @@ namespace FlyADBase
gridAdvUnit
.
ad
=
CorrectAD
(
gridAdvUnit
.
pos
/
PosOfGrid
,
gridAdvUnit
.
ad
);
}
}
TimeGridAdvEvent
(
this
,
new
TimeGridAdvEventArgs
()
{
Data
=
gridAdvUnits
,
Marker
=
pushGridInfo
.
marker
});
TimeGridAdvEvent
(
this
,
new
TimeGridAdvEventArgs
()
{
Data
=
gridAdvUnits
,
Marker
=
pushGridInfo
.
marker
,
Direction
=
pushGridInfo
.
direction
});
}
pushGridInfo
=
null
;
...
...
Project.FLY.FlyADBase/FlyADBase/IFlyADClientAdv.cs
View file @
fad96eee
...
...
@@ -117,6 +117,7 @@ namespace FlyADBase
/// <param name="grid_len">grid 长度</param>
/// <param name="dat">grid 数据</param>
void
GetGrid
(
DIRECTION
direction
,
int
grid_start
,
int
grid_len
,
out
int
[]
dat
);
/// <summary>
/// 从正反缓存区, 获取全部grid数据
/// </summary>
...
...
@@ -132,6 +133,7 @@ namespace FlyADBase
/// <param name="dat"></param>
/// <param name="adLag">测试功能 ad值滞后</param>
void
ToGrid
(
IEnumerable
<
GridAdvUnit
>
gridAdvUnits
,
out
int
[]
dat
,
int
adLag
);
/// <summary>
/// 动作完成
/// </summary>
...
...
Project.FLY.FlyADBase/Flyad7_WPF/App.xaml.cs
View file @
fad96eee
...
...
@@ -12,5 +12,9 @@ namespace Flyad7_WPF
/// </summary>
public
partial
class
App
:
Application
{
public
App
()
{
App
.
Current
.
Properties
[
"Container"
]
=
UnityExt
.
Container
;
}
}
}
Project.FLY.FlyADBase/Flyad7_WPF/AutoGetGridAdv.cs
View file @
fad96eee
...
...
@@ -44,25 +44,25 @@ namespace Flyad7_WPF
public
RelayCommand
StartCmd
{
get
;
private
set
;
}
public
RelayCommand
StopCmd
{
get
;
private
set
;
}
public
RelayCommand
AnalyzeCmd
{
get
;
private
set
;
}
List
<
IEnumerable
<
GridAdvUnit
>>
gridAdvUnits
=
new
List
<
IEnumerable
<
GridAdvUnit
>>();
public
AutoGetGridAdv
()
public
AutoGetGridAdv
(
FlyAD7
flyad
)
{
this
.
flyad
=
flyad
;
StartCmd
=
new
RelayCommand
(
Start
);
StopCmd
=
new
RelayCommand
(
Stop
);
AnalyzeCmd
=
new
RelayCommand
(
Analyze
);
Load
();
}
public
void
Init
(
FlyAD7
flyad
)
{
this
.
PropertyChanged
+=
AutoSave
;
this
.
flyad
=
flyad
;
}
CancellationTokenSource
cancellationTokenSource
;
public
async
void
Start
()
async
void
Start
()
{
if
(
IsRunning
)
...
...
@@ -159,7 +159,7 @@ namespace Flyad7_WPF
}
}
}
public
void
Stop
()
void
Stop
()
{
if
(!
IsRunning
)
return
;
...
...
@@ -171,7 +171,12 @@ namespace Flyad7_WPF
cancellationTokenSource
.
Cancel
();
}
private
void
Analyze
()
{
WdGridAdvAnalyze
wd
=
new
WdGridAdvAnalyze
();
wd
.
Init
();
wd
.
ShowDialog
();
}
public
event
PropertyChangedEventHandler
PropertyChanged
;
private
bool
isIgnoreSave
;
...
...
@@ -196,7 +201,7 @@ namespace Flyad7_WPF
{
try
{
string
json
=
Newtonsoft
.
Json
.
JsonConvert
.
SerializeObject
(
this
);
string
json
=
Newtonsoft
.
Json
.
JsonConvert
.
SerializeObject
(
this
,
Formatting
.
Indented
);
File
.
WriteAllText
(
"autoGridAdv.json"
,
json
);
}
catch
(
Exception
e
)
...
...
Project.FLY.FlyADBase/Flyad7_WPF/AutoSync.cs
View file @
fad96eee
...
...
@@ -124,7 +124,7 @@ namespace Flyad7_WPF
public
double
FilmVelocity
{
get
;
set
;
}
public
AutoSync
()
public
AutoSync
(
FlyAD7
flyad
)
{
ScanBegin
=
484
;
ScanWidth
=
4000
;
...
...
@@ -151,10 +151,10 @@ namespace Flyad7_WPF
Load
();
Init
(
flyad
);
}
public
void
Init
(
IFlyADClient
flyad
)
void
Init
(
IFlyADClient
flyad
)
{
mFlyAD
=
flyad
;
Misc
.
BindingOperations
.
SetBinding
(
mFlyAD
,
new
string
[]
{
"Ratio02"
,
"Ratio01"
},
...
...
Project.FLY.FlyADBase/Flyad7_WPF/DebugAppParam.cs
View file @
fad96eee
...
...
@@ -48,9 +48,6 @@ namespace Flyad7_WPF
public
DebugAppParam
()
{
Load
();
}
public
void
Init
()
{
this
.
PropertyChanged
+=
AutoSave
;
}
...
...
@@ -60,7 +57,7 @@ namespace Flyad7_WPF
if
(
isIgnoreSave
)
return
;
if
(
this
.
GetType
().
GetProperty
(
e
.
PropertyName
).
GetCustomAttributes
(
typeof
(
JsonPropertyAttribute
),
false
).
Count
()
>
0
)
//
if (this.GetType().GetProperty(e.PropertyName).GetCustomAttributes(typeof(JsonPropertyAttribute), false).Count() > 0)
{
isIgnoreSave
=
true
;
await
Task
.
Delay
(
5000
);
//Task.Yield();
...
...
@@ -72,7 +69,7 @@ namespace Flyad7_WPF
{
try
{
string
json
=
JsonConvert
.
SerializeObject
(
this
);
string
json
=
JsonConvert
.
SerializeObject
(
this
,
Formatting
.
Indented
);
File
.
WriteAllText
(
"param.json"
,
json
);
}
catch
{
...
...
Project.FLY.FlyADBase/Flyad7_WPF/Flyad7_WPF.csproj
View file @
fad96eee
...
...
@@ -80,6 +80,15 @@
<Compile
Include=
"DebugAppParam.cs"
/>
<Compile
Include=
"FlyADClientUI.cs"
/>
<Compile
Include=
"GridAdvVm.cs"
/>
<Compile
Include=
"UnityExt.cs"
/>
<Compile
Include=
"WdConvolution\WdConvolution.xaml.cs"
>
<DependentUpon>
WdConvolution.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"WdConvolution\WdConvolutionVm.cs"
/>
<Compile
Include=
"WdGridAdvAnalyze\WdGridAdvAnalyzeVm.cs"
/>
<Compile
Include=
"WdGridAdvAnalyze\WdGridAdvAnalyze.xaml.cs"
>
<DependentUpon>
WdGridAdvAnalyze.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"Window1.xaml.cs"
>
<DependentUpon>
Window1.xaml
</DependentUpon>
</Compile>
...
...
@@ -111,6 +120,22 @@
<DependentUpon>
MainWindow.xaml
</DependentUpon>
<SubType>
Code
</SubType>
</Compile>
<Page
Include=
"WdConvolution\WdConvolution.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"WdConvolution\WdConvolutionStyle.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"WdGridAdvAnalyze\WdGridAdvAnalyze.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"WdGridAdvAnalyze\WdGridAdvAnalyzeStyle.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"Window1.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
...
...
@@ -175,9 +200,6 @@
<Resource
Include=
"chip_128px_1093586_easyicon.net.ico"
/>
</ItemGroup>
<ItemGroup>
<PackageReference
Include=
"AutoMapper"
>
<Version>
9.0.0
</Version>
</PackageReference>
<PackageReference
Include=
"Costura.Fody"
>
<Version>
3.3.3
</Version>
</PackageReference>
...
...
@@ -186,6 +208,9 @@
<IncludeAssets>
runtime; build; native; contentfiles; analyzers
</IncludeAssets>
<PrivateAssets>
all
</PrivateAssets>
</PackageReference>
<PackageReference
Include=
"MathNet.Numerics"
>
<Version>
4.9.0
</Version>
</PackageReference>
<PackageReference
Include=
"MvvmLightLibs"
>
<Version>
5.4.1.1
</Version>
</PackageReference>
...
...
@@ -195,6 +220,12 @@
<PackageReference
Include=
"PropertyChanged.Fody"
>
<Version>
2.6.1
</Version>
</PackageReference>
<PackageReference
Include=
"Unity"
>
<Version>
5.11.1
</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Folder
Include=
"Core\"
/>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
...
...
Project.FLY.FlyADBase/Flyad7_WPF/GridAdvVm.cs
View file @
fad96eee
...
...
@@ -22,112 +22,32 @@ namespace Flyad7_WPF
public
RelayCommand
LoadCmd
{
get
;
private
set
;
}
public
RelayCommand
CalAdLagCmd
{
get
;
private
set
;
}
Chart
chart3
;
Chart
chart3
=
null
;
FlyAD7
flyad
;
int
timeGridAdvIndex
=
0
;
List
<
IEnumerable
<
GridAdvUnit
>>
gridAdvUnits
=
new
List
<
IEnumerable
<
GridAdvUnit
>>();
public
GridAdvVm
()
public
GridAdvVm
(
FlyAD7
flyad
)
{
SaveCmd
=
new
RelayCommand
(
Save
);
LoadCmd
=
new
RelayCommand
(
Load
);
CalAdLagCmd
=
new
RelayCommand
(
CalAdLag
);
}
public
void
Init
(
Chart
chart3
,
FlyAD7
flyad
)
{
this
.
chart3
=
chart3
;
this
.
flyad
=
flyad
;
InitializeComponent4
();
this
.
flyad
=
flyad
;
flyad
.
TimeGridAdvEvent
+=
flyad_TimeGridAdvEvent
;
}
void
InitializeComponent4
()
public
void
Init
(
Chart
chart
)
{
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartArea
chartArea1
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartArea
();
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Legend
legend1
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Legend
();
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Series
series1
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Series
();
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Series
series2
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Series
();
//
// chart1
//
chartArea1
.
AxisX
.
LabelStyle
.
Font
=
new
System
.
Drawing
.
Font
(
"Trebuchet MS"
,
8.25F
,
System
.
Drawing
.
FontStyle
.
Bold
);
chartArea1
.
AxisX
.
LineColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))));
chartArea1
.
AxisX
.
MajorGrid
.
LineColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))));
chartArea1
.
AxisY
.
LabelStyle
.
Font
=
new
System
.
Drawing
.
Font
(
"Trebuchet MS"
,
8.25F
,
System
.
Drawing
.
FontStyle
.
Bold
);
chartArea1
.
AxisY
.
LineColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))));
chartArea1
.
AxisY
.
MajorGrid
.
LineColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))));
chartArea1
.
BackColor
=
System
.
Drawing
.
Color
.
OldLace
;
//chartArea1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
//chartArea1.BackSecondaryColor = System.Drawing.Color.White;
chartArea1
.
BorderColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))));
chartArea1
.
BorderDashStyle
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartDashStyle
.
Solid
;
chartArea1
.
Name
=
"Default"
;
chartArea1
.
ShadowColor
=
System
.
Drawing
.
Color
.
Transparent
;
chartArea1
.
CursorX
.
IsUserEnabled
=
true
;
chartArea1
.
CursorX
.
IsUserSelectionEnabled
=
true
;
chartArea1
.
CursorX
.
SelectionColor
=
System
.
Drawing
.
SystemColors
.
Highlight
;
chartArea1
.
CursorY
.
IsUserEnabled
=
true
;
chartArea1
.
CursorY
.
IsUserSelectionEnabled
=
true
;
chartArea1
.
CursorY
.
SelectionColor
=
System
.
Drawing
.
SystemColors
.
Highlight
;
//对数坐标
//chartArea1.AxisY.IsLogarithmic = true;
//chartArea1.AxisY.LogarithmBase = Math.E;
chart3
.
ChartAreas
.
Add
(
chartArea1
);
legend1
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
legend1
.
Enabled
=
true
;
legend1
.
Font
=
new
System
.
Drawing
.
Font
(
"Trebuchet MS"
,
8.25F
,
System
.
Drawing
.
FontStyle
.
Bold
);
legend1
.
Alignment
=
System
.
Drawing
.
StringAlignment
.
Near
;
legend1
.
Docking
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Docking
.
Right
;
legend1
.
IsDockedInsideChartArea
=
true
;
legend1
.
DockedToChartArea
=
chartArea1
.
Name
;
//legend1.IsTextAutoFit = false;
legend1
.
Name
=
"Default"
;
chart3
.
Legends
.
Add
(
legend1
);
series1
.
Name
=
"Series 1"
;
series1
.
BorderColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
180
)))),
((
int
)(((
byte
)(
26
)))),
((
int
)(((
byte
)(
59
)))),
((
int
)(((
byte
)(
105
)))));
series1
.
BorderWidth
=
3
;
series1
.
ChartArea
=
chartArea1
.
Name
;
series1
.
ChartType
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
SeriesChartType
.
Line
;
series1
.
Color
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
220
)))),
((
int
)(((
byte
)(
65
)))),
((
int
)(((
byte
)(
140
)))),
((
int
)(((
byte
)(
240
)))));
series1
.
Legend
=
legend1
.
Name
;
series1
.
LegendText
=
"Series 1"
;
series1
.
ShadowColor
=
System
.
Drawing
.
Color
.
Black
;
series1
.
ShadowOffset
=
2
;
series1
.
XValueType
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartValueType
.
Int32
;
series1
.
YValueType
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartValueType
.
Int32
;
chart3
.
Series
.
Add
(
series1
);
series2
.
Name
=
"Series 2"
;
series2
.
BorderColor
=
System
.
Drawing
.
Color
.
Pink
;
series2
.
BorderWidth
=
3
;
series2
.
ChartArea
=
chartArea1
.
Name
;
series2
.
ChartType
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
SeriesChartType
.
Line
;
series2
.
Color
=
System
.
Drawing
.
Color
.
Red
;
series2
.
Legend
=
legend1
.
Name
;
series2
.
LegendText
=
"Series 2"
;
series2
.
ShadowColor
=
System
.
Drawing
.
Color
.
Black
;
series2
.
ShadowOffset
=
2
;
series2
.
XValueType
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartValueType
.
Int32
;
series2
.
YValueType
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartValueType
.
Int32
;
chart3
.
Series
.
Add
(
series2
);
//this.chart1.Location = new System.Drawing.Point(16, 32);
chart3
.
Name
=
"chart3"
;
chart3
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
chart3
=
chart
;
}
#
region
timeGridAdv
private
async
void
flyad_TimeGridAdvEvent
(
object
sender
,
TimeGridAdvEventArgs
e
)
{
if
(
chart3
==
null
)
return
;
if
(!
HasGridAdv
)
return
;
...
...
@@ -152,6 +72,8 @@ namespace Flyad7_WPF
void
DrawGridAdv
(
IEnumerable
<
GridAdvUnit
>
units
,
int
adLag
=
0
)
{
if
(
chart3
==
null
)
return
;
flyad
.
ToGrid
(
units
,
out
int
[]
datas
,
adLag
);
//画图
timeGridAdvIndex
++;
...
...
Project.FLY.FlyADBase/Flyad7_WPF/MainWindow.xaml
View file @
fad96eee
...
...
@@ -399,6 +399,7 @@
<GroupBox x:Name="gbAutoGetGridAdv" Header="自动采集不同速度TimeGridAdv" d:DataContext="{d:DesignInstance Type=local:AutoGetGridAdv}" >
<StackPanel >
<StackPanel Orientation="Horizontal" >
<Button Style="{StaticResource ButtonStyle}" Content="数据分析" Command="{Binding AnalyzeCmd}" />
<Button Style="{StaticResource ButtonStyle}" Content="开始" Command="{Binding StartCmd}" />
<Button Style="{StaticResource ButtonStyle}" Content="停止" Command="{Binding StopCmd}" />
<StackPanel Orientation="Horizontal">
...
...
Project.FLY.FlyADBase/Flyad7_WPF/MainWindow.xaml.cs
View file @
fad96eee
...
...
@@ -23,6 +23,7 @@ using System.Windows.Forms.DataVisualization.Charting;
using
Microsoft.Win32
;
using
System.IO
;
using
System.Threading.Tasks
;
using
Unity
;
namespace
Flyad7_WPF
{
...
...
@@ -31,6 +32,7 @@ namespace Flyad7_WPF
/// </summary>
public
partial
class
MainWindow
:
Window
,
INotifyPropertyChanged
{
IUnityContainer
Container
;
FlyAD7
flyad
;
DebugAppParam
param
;
AutoForwBackw
autofb
;
...
...
@@ -43,28 +45,21 @@ namespace Flyad7_WPF
InitializeComponent
();
InitializeComponent2
();
InitializeComponent3
();
InitializeComponent4
();
Init
();
}
param
=
new
DebugAppParam
();
param
.
Init
();
flyad
=
new
FlyAD7
();
Misc
.
BindingOperations
.
SetBinding
(
param
,
"HasCRC"
,
flyad
,
"HasCRC"
);
autofb
=
new
AutoForwBackw
(
flyad
);
Misc
.
BindingOperations
.
SetBinding
(
param
,
"FB_Pos1"
,
autofb
,
"FB_Pos1"
,
Misc
.
BindingOperations
.
BindingMode
.
TwoWay
);
Misc
.
BindingOperations
.
SetBinding
(
param
,
"FB_Pos2"
,
autofb
,
"FB_Pos2"
,
Misc
.
BindingOperations
.
BindingMode
.
TwoWay
);
flyad_clientui
=
new
FlyADClientUI
(
flyad
);
autoGetGridAdv
=
new
AutoGetGridAdv
();
autoGetGridAdv
.
Init
(
flyad
);
mAutoSync
=
new
AutoSync
();
mAutoSync
.
Init
(
flyad
);
gridAdvVm
=
new
GridAdvVm
();
gridAdvVm
.
Init
(
chart3
,
flyad
);
Misc
.
BindingOperations
.
SetBinding
(
param
,
"HasGridAdv"
,
gridAdvVm
,
"HasGridAdv"
,
Misc
.
BindingOperations
.
BindingMode
.
TwoWay
);
public
void
Init
()
{
Container
=
App
.
Current
.
Properties
[
"Container"
]
as
IUnityContainer
;
param
=
Container
.
Resolve
<
DebugAppParam
>();
flyad
=
Container
.
Resolve
<
FlyAD7
>();
autofb
=
Container
.
Resolve
<
AutoForwBackw
>();
flyad_clientui
=
Container
.
Resolve
<
FlyADClientUI
>();
autoGetGridAdv
=
Container
.
Resolve
<
AutoGetGridAdv
>();
mAutoSync
=
Container
.
Resolve
<
AutoSync
>();
gridAdvVm
=
Container
.
Resolve
<
GridAdvVm
>();
gridAdvVm
.
Init
(
chart3
);
this
.
DataContext
=
flyad
;
...
...
@@ -79,12 +74,9 @@ namespace Flyad7_WPF
flyad
.
TimeGridEvent
+=
flyad_TimeGridEvent
;
FObjBase
.
PollModule
.
Current
.
Start
();
}
/// <summary>
/// grid图
/// </summary>
...
...
@@ -220,6 +212,87 @@ namespace Flyad7_WPF
this
.
chart2
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
}
void
InitializeComponent4
()
{
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartArea
chartArea1
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartArea
();
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Legend
legend1
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Legend
();
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Series
series1
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Series
();
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Series
series2
=
new
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Series
();
//
// chart1
//
chartArea1
.
AxisX
.
LabelStyle
.
Font
=
new
System
.
Drawing
.
Font
(
"Trebuchet MS"
,
8.25F
,
System
.
Drawing
.
FontStyle
.
Bold
);
chartArea1
.
AxisX
.
LineColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))));
chartArea1
.
AxisX
.
MajorGrid
.
LineColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))));
chartArea1
.
AxisY
.
LabelStyle
.
Font
=
new
System
.
Drawing
.
Font
(
"Trebuchet MS"
,
8.25F
,
System
.
Drawing
.
FontStyle
.
Bold
);
chartArea1
.
AxisY
.
LineColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))));
chartArea1
.
AxisY
.
MajorGrid
.
LineColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))));
chartArea1
.
BackColor
=
System
.
Drawing
.
Color
.
OldLace
;
//chartArea1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
//chartArea1.BackSecondaryColor = System.Drawing.Color.White;
chartArea1
.
BorderColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))));
chartArea1
.
BorderDashStyle
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartDashStyle
.
Solid
;
chartArea1
.
Name
=
"Default"
;
chartArea1
.
ShadowColor
=
System
.
Drawing
.
Color
.
Transparent
;
chartArea1
.
CursorX
.
IsUserEnabled
=
true
;
chartArea1
.
CursorX
.
IsUserSelectionEnabled
=
true
;
chartArea1
.
CursorX
.
SelectionColor
=
System
.
Drawing
.
SystemColors
.
Highlight
;
chartArea1
.
CursorY
.
IsUserEnabled
=
true
;
chartArea1
.
CursorY
.
IsUserSelectionEnabled
=
true
;
chartArea1
.
CursorY
.
SelectionColor
=
System
.
Drawing
.
SystemColors
.
Highlight
;
//对数坐标
//chartArea1.AxisY.IsLogarithmic = true;
//chartArea1.AxisY.LogarithmBase = Math.E;
chart3
.
ChartAreas
.
Add
(
chartArea1
);
legend1
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
legend1
.
Enabled
=
true
;
legend1
.
Font
=
new
System
.
Drawing
.
Font
(
"Trebuchet MS"
,
8.25F
,
System
.
Drawing
.
FontStyle
.
Bold
);
legend1
.
Alignment
=
System
.
Drawing
.
StringAlignment
.
Near
;
legend1
.
Docking
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
Docking
.
Right
;
legend1
.
IsDockedInsideChartArea
=
true
;
legend1
.
DockedToChartArea
=
chartArea1
.
Name
;
//legend1.IsTextAutoFit = false;
legend1
.
Name
=
"Default"
;
chart3
.
Legends
.
Add
(
legend1
);
series1
.
Name
=
"Series 1"
;
series1
.
BorderColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
180
)))),
((
int
)(((
byte
)(
26
)))),
((
int
)(((
byte
)(
59
)))),
((
int
)(((
byte
)(
105
)))));
series1
.
BorderWidth
=
3
;
series1
.
ChartArea
=
chartArea1
.
Name
;
series1
.
ChartType
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
SeriesChartType
.
Line
;
series1
.
Color
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
220
)))),
((
int
)(((
byte
)(
65
)))),
((
int
)(((
byte
)(
140
)))),
((
int
)(((
byte
)(
240
)))));
series1
.
Legend
=
legend1
.
Name
;
series1
.
LegendText
=
"Series 1"
;
series1
.
ShadowColor
=
System
.
Drawing
.
Color
.
Black
;
series1
.
ShadowOffset
=
2
;
series1
.
XValueType
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartValueType
.
Int32
;
series1
.
YValueType
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartValueType
.
Int32
;
chart3
.
Series
.
Add
(
series1
);
series2
.
Name
=
"Series 2"
;
series2
.
BorderColor
=
System
.
Drawing
.
Color
.
Pink
;
series2
.
BorderWidth
=
3
;
series2
.
ChartArea
=
chartArea1
.
Name
;
series2
.
ChartType
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
SeriesChartType
.
Line
;
series2
.
Color
=
System
.
Drawing
.
Color
.
Red
;
series2
.
Legend
=
legend1
.
Name
;
series2
.
LegendText
=
"Series 2"
;
series2
.
ShadowColor
=
System
.
Drawing
.
Color
.
Black
;
series2
.
ShadowOffset
=
2
;
series2
.
XValueType
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartValueType
.
Int32
;
series2
.
YValueType
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartValueType
.
Int32
;
chart3
.
Series
.
Add
(
series2
);
//this.chart1.Location = new System.Drawing.Point(16, 32);
chart3
.
Name
=
"chart3"
;
chart3
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
}
#
region
grid
void
flyad_GridEvent
(
object
sender
,
MiniGridEventArgs
e
)
{
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/Culture/StringResource.en-US.xaml
View file @
fad96eee
...
...
@@ -95,6 +95,8 @@
<sys:String x:Key="strMonth">Month</sys:String>
<sys:String x:Key="strOrgInterval">OrgInterval</sys:String>
<sys:String x:Key="strGageLength">GageLength</sys:String>
<sys:String x:Key="strTimeGridAdv">TimeGridAdv</sys:String>
<sys:String x:Key="strAdLag">AdLag</sys:String>
<sys:String x:Key="strEncoder1Scale">Encoder1Scale</sys:String>
<sys:String x:Key="strEncoder2Scale">Encoder2Scale</sys:String>
<sys:String x:Key="strMmOfPulse">mm/Pulse</sys:String>
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/Culture/StringResource.zh-CN.xaml
View file @
fad96eee
...
...
@@ -99,6 +99,8 @@
<sys:String x:Key="strMonth">月</sys:String>
<sys:String x:Key="strOrgInterval">归零间隔</sys:String>
<sys:String x:Key="strGageLength">机架长度</sys:String>
<sys:String x:Key="strTimeGridAdv">高级AD数据</sys:String>
<sys:String x:Key="strAdLag">AD滞后</sys:String>
<sys:String x:Key="strEncoder1Scale">编码器1比例</sys:String>
<sys:String x:Key="strEncoder2Scale">编码器2比例</sys:String>
<sys:String x:Key="strMmOfPulse">mm/脉冲</sys:String>
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/Page_Initparam.xaml
View file @
fad96eee
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/SysParam.cs
View file @
fad96eee
...
...
@@ -36,7 +36,6 @@ namespace ThickTcpUiInWindow
if
(!
serverep
.
Equals
(
value
))
{
serverep
=
new
IPEndPoint
(
value
.
Address
,
value
.
Port
);
NotifyPropertyChanged
(
"ServerIPEP"
);
}
}
}
...
...
@@ -59,7 +58,6 @@ namespace ThickTcpUiInWindow
if
(!
string
.
IsNullOrEmpty
(
value
))
{
_language
=
value
;
NotifyPropertyChanged
(
"Language"
);
}
}
}
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Client/InitParamServiceClient.cs
View file @
fad96eee
...
...
@@ -40,6 +40,10 @@ namespace FLY.Thick.Base.Client
/// </summary>
public
int
PosOfGrid
{
get
;
set
;
}
=
10
;
/// <summary>
/// timeGridAdv 使能
/// </summary>
public
bool
IsTimeGridAdvEnabled
{
get
;
set
;
}
/// <summary>
/// ad 滞后量 ms
/// </summary>
...
...
@@ -186,6 +190,7 @@ namespace FLY.Thick.Base.Client
{
poslength
=
PosLength
,
auto_org_interval
=
AutoOrgInterval
,
isTimeGridAdvEnabled
=
IsTimeGridAdvEnabled
,
adlag
=
ADLag
,
encoder1_mmpp
=
Encoder1_mmpp
,
...
...
@@ -252,6 +257,7 @@ namespace FLY.Thick.Base.Client
PosLength
=
p
.
poslength
;
AutoOrgInterval
=
p
.
auto_org_interval
;
PosOfGrid
=
p
.
posOfGrid
;
IsTimeGridAdvEnabled
=
p
.
isTimeGridAdvEnabled
;
ADLag
=
p
.
adlag
;
Encoder1_mmpp
=
p
.
encoder1_mmpp
;
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/IService/IInitParamService.cs
View file @
fad96eee
...
...
@@ -14,6 +14,7 @@ namespace FLY.Thick.Base.IService
/// </summary>
int
PosLength
{
get
;
set
;
}
bool
IsTimeGridAdvEnabled
{
get
;
set
;
}
int
ADLag
{
get
;
set
;
}
int
PosOfGrid
{
get
;
}
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/OBJ_INTERFACE/INITPARAM_OBJ_INTERFACE.cs
View file @
fad96eee
...
...
@@ -16,8 +16,9 @@ namespace FLY.Thick.Base.OBJ_INTERFACE
public
int
auto_org_interval
;
public
double
encoder1_mmpp
;
public
bool
isTimeGridAdvEnabled
;
public
int
adlag
;
public
int
posOfGrid
;
public
double
speed1scale
;
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Server.OBJProxy/Initparam_OBJProxy.cs
View file @
fad96eee
...
...
@@ -52,6 +52,7 @@ namespace FLY.Thick.Base.Server.OBJProxy
encoder1_mmpp
=
mInitparam
.
Encoder1_mmpp
,
speed1scale
=
mInitparam
.
Speed1Scale
,
adlag
=
mInitparam
.
ADLag
,
isTimeGridAdvEnabled
=
mInitparam
.
IsTimeGridAdvEnabled
,
posOfGrid
=
mInitparam
.
PosOfGrid
,
filmVSrc
=
mInitparam
.
FilmVSrc
,
...
...
@@ -97,6 +98,7 @@ namespace FLY.Thick.Base.Server.OBJProxy
var
p
=
JsonConvert
.
DeserializeObject
<
INITPARAM_OBJ_INTERFACE
.
Pack_Params
>(
json
);
mInitparam
.
PosLength
=
p
.
poslength
;
mInitparam
.
IsTimeGridAdvEnabled
=
p
.
isTimeGridAdvEnabled
;
mInitparam
.
ADLag
=
p
.
adlag
;
mInitparam
.
AutoOrgInterval
=
p
.
auto_org_interval
;
mInitparam
.
Encoder2_mmpp
=
p
.
encoder2_mmpp
;
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Server/AD2ThickHandler.cs
View file @
fad96eee
...
...
@@ -18,5 +18,17 @@ using FLY.Thick.BulkDataModule;
namespace
FLY.Thick.Base.Server
{
/// <summary>
/// int 版的 ad->thick 准备淘汰
/// </summary>
/// <param name="ad"></param>
/// <returns></returns>
[
Obsolete
(
"准备 被 AD2ThkHandler 替代"
)]
public
delegate
int
AD2ThickHandler
(
int
ad
);
/// <summary>
/// double 版的 ad->thick
/// </summary>
/// <param name="ad"></param>
/// <returns></returns>
public
delegate
double
AD2ThkHandler
(
int
ad
);
}
Project.FLY.Thick.Base/FLY.Thick.Base/Server/InitParam.cs
View file @
fad96eee
...
...
@@ -26,7 +26,12 @@ namespace FLY.Thick.Base.Server
public
int
PosOfGrid
{
get
;
set
;
}
=
10
;
/// <summary>
/// ad 滞后量 ms
/// timeGridAdv 使能
/// </summary>
public
bool
IsTimeGridAdvEnabled
{
get
;
set
;
}
/// <summary>
/// ad 滞后量 1.28ms
/// </summary>
public
int
ADLag
{
get
;
set
;
}
...
...
@@ -197,6 +202,8 @@ namespace FLY.Thick.Base.Server
{
return
new
string
[]{
"PosLength"
,
"ADLag"
,
"IsTimeGridAdvEnabled"
,
"AutoOrgInterval"
,
"VScan"
,
...
...
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