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
2c9d6c0f
Commit
2c9d6c0f
authored
Feb 10, 2025
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复定点图样式
parent
f503cd7b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
129 additions
and
172 deletions
+129
-172
FlyADBase.csproj
Project.FLY.FlyADBase/FlyADBase/FlyADBase.csproj
+1
-1
FixGraph.xaml
...ck.Base/FLY.Thick.Base.UI/UiModule/FixGraph/FixGraph.xaml
+68
-105
FixGraph.xaml.cs
...Base/FLY.Thick.Base.UI/UiModule/FixGraph/FixGraph.xaml.cs
+2
-44
FixGraphVm.cs
...ck.Base/FLY.Thick.Base.UI/UiModule/FixGraph/FixGraphVm.cs
+35
-4
WdPassword.xaml.cs
Project.FLY.Thick.Base/FLY.Thick.Base.UI/WdPassword.xaml.cs
+23
-18
No files found.
Project.FLY.FlyADBase/FlyADBase/FlyADBase.csproj
View file @
2c9d6c0f
...
...
@@ -80,7 +80,7 @@
<Version>
10.1.1
</Version>
</PackageReference>
<PackageReference
Include=
"NLog"
>
<Version>
5.1.0
</Version>
<Version>
4.6.8
</Version>
</PackageReference>
<PackageReference
Include=
"PropertyChanged.Fody"
>
<Version>
4.1.0
</Version>
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UiModule/FixGraph/FixGraph.xaml
View file @
2c9d6c0f
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UiModule/FixGraph/FixGraph.xaml.cs
View file @
2c9d6c0f
using
FLY.Thick.Base.Client
;
using
FLY.Thick.Base.Common
;
using
FLY.Thick.Base.IService
;
using
MultiLayout.UiModule
;
using
FObjBase
;
using
LiveCharts
;
using
Misc
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.IO
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
FLY.Thick.Base.IService
;
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
FLY.Thick.Base.UI
;
using
Unity
;
namespace
FLY.Thick.Base.UI.UiModule
...
...
@@ -38,7 +17,7 @@ namespace FLY.Thick.Base.UI.UiModule
InitializeComponent
();
}
[
InjectionMethod
]
public
void
Init
(
int
id
,
IUnityContainer
container
,
public
void
Init
(
int
id
,
IUnityContainer
container
,
IFixService
fixService
,
ITDGageService
gageService
)
{
//查找参数
...
...
@@ -68,27 +47,6 @@ namespace FLY.Thick.Base.UI.UiModule
w
.
ShowDialog
();
viewModel
.
IsPaused
=
isPaused
;
}
private
void
button_pause_Click
(
object
sender
,
RoutedEventArgs
e
)
{
viewModel
.
IsPaused
=
!
viewModel
.
IsPaused
;
}
private
void
button_save_Click
(
object
sender
,
RoutedEventArgs
e
)
{
viewModel
.
PreSave
();
WdSaveDatas
w
=
new
WdSaveDatas
();
w
.
Init
(
viewModel
);
w
.
ShowDialog
();
}
private
void
button_analyze_Click
(
object
sender
,
RoutedEventArgs
e
)
{
viewModel
.
GetDatas
(
out
double
intervalms
,
out
List
<
double
>
datas
);
PgFixAnalyze
p
=
new
PgFixAnalyze
();
p
.
Init
(
intervalms
,
datas
);
MultiLayout
.
FlyLayoutManager
.
NavigationService
.
Navigate
(
p
);
}
}
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/UiModule/FixGraph/FixGraphVm.cs
View file @
2c9d6c0f
...
...
@@ -11,6 +11,7 @@ using System.Text;
using
System.Threading.Tasks
;
using
FLY.Thick.Base.UI
;
using
FLY.Thick.Base.Common
;
using
CommunityToolkit.Mvvm.Input
;
namespace
FLY.Thick.Base.UI.UiModule
{
...
...
@@ -61,9 +62,9 @@ namespace FLY.Thick.Base.UI.UiModule
/// </summary>
public
double
Min
{
get
;
set
;
}
/// <summary>
///
3
sigma
///
2
sigma
/// </summary>
public
double
Sigma
3
{
get
;
set
;
}
public
double
Sigma
2
{
get
;
set
;
}
#
endregion
#
region
状态
...
...
@@ -92,6 +93,12 @@ namespace FLY.Thick.Base.UI.UiModule
/// </summary>
public
bool
IsADMode
{
get
;
private
set
;
}
#
endregion
public
RelayCommand
PauseCmd
{
get
;
private
set
;
}
public
RelayCommand
SaveCmd
{
get
;
private
set
;
}
public
RelayCommand
AnalyzeCmd
{
get
;
private
set
;
}
public
RelayCommand
ClearCmd
{
get
;
private
set
;
}
/// <summary>
/// 真实接收的数据,与 Values 不一样, Values只是mDatas的一部分
/// </summary>
...
...
@@ -119,6 +126,11 @@ namespace FLY.Thick.Base.UI.UiModule
DynArea
dynArea
;
public
FixGraphVm
()
{
PauseCmd
=
new
RelayCommand
(
Pause
);
SaveCmd
=
new
RelayCommand
(
Save
);
AnalyzeCmd
=
new
RelayCommand
(
Analyze
);
ClearCmd
=
new
RelayCommand
(
UpdateIsADMode
);
#
region
与数据无关界面参数
XFormatter
=
(
x
)
=>
{
...
...
@@ -147,7 +159,26 @@ namespace FLY.Thick.Base.UI.UiModule
IsPaused
=
this
.
dynArea
.
ControllerState
!=
CTRL_STATE
.
FIX
;
}
private
void
Analyze
()
{
GetDatas
(
out
double
intervalms
,
out
List
<
double
>
datas
);
var
p
=
new
FLY
.
Thick
.
Base
.
UI
.
UiModule
.
PgFixAnalyze
();
p
.
Init
(
intervalms
,
datas
);
MultiLayout
.
FlyLayoutManager
.
NavigationService
.
Navigate
(
p
);
}
private
void
Save
()
{
PreSave
();
WdSaveDatas
w
=
new
WdSaveDatas
();
w
.
Init
(
this
);
w
.
ShowDialog
();
}
private
void
Pause
()
{
IsPaused
=
!
IsPaused
;
}
private
void
DynArea_PropertyChanged
(
object
sender
,
PropertyChangedEventArgs
e
)
{
if
(
e
.
PropertyName
==
nameof
(
DynArea
.
ControllerState
))
{
...
...
@@ -426,7 +457,7 @@ namespace FLY.Thick.Base.UI.UiModule
Max
=
double
.
NaN
;
Min
=
double
.
NaN
;
Average
=
double
.
NaN
;
Sigma
3
=
double
.
NaN
;
Sigma
2
=
double
.
NaN
;
AutoTarget
=
double
.
NaN
;
return
;
}
...
...
@@ -434,7 +465,7 @@ namespace FLY.Thick.Base.UI.UiModule
Max
=
mDatas
.
Max
();
Min
=
mDatas
.
Min
();
Average
=
mDatas
.
Average
();
Sigma
3
=
mDatas
.
Sigma
()
*
3
;
Sigma
2
=
mDatas
.
Sigma
()
*
2
;
if
(
mDatas
.
Count
>
100
)
{
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/WdPassword.xaml.cs
View file @
2c9d6c0f
...
...
@@ -73,23 +73,23 @@ namespace FLY.Thick.Base.UI
/// <returns></returns>
public
static
bool
Authorize
(
string
uiName
,
out
int
pwLv
,
string
msg
=
null
)
{
pwLv
=
0
;
//从容器获取
var
container
=
Application
.
Current
.
Properties
[
"container"
]
as
IUnityContainer
;
if
(
container
==
null
)
return
true
;
return
Authorize
(
uiName
,
0
,
out
pwLv
,
msg
);
}
var
passwordAuthorize
=
container
.
Resolve
<
PasswordAuthorize
>();
int
level
=
passwordAuthorize
.
GetLv
(
uiName
);
if
(
level
<=
0
)
return
true
;
/// <summary>
///
/// </summary>
/// <param name="level">要求的级别</param>
/// <param name="pwLv">当密码正确时,密码的级别</param>
/// <returns></returns>
public
static
bool
Authorize
(
int
level
,
out
int
pwLv
)
{
return
Authorize
(
null
,
level
,
out
pwLv
);
}
WdPassword
w
=
new
WdPassword
();
w
.
Init
(
passwordAuthorize
,
level
,
msg
);
w
.
Owner
=
Application
.
Current
.
MainWindow
;
bool
ret
=
(
bool
)
w
.
ShowDialog
();
pwLv
=
w
.
PwLv
;
return
ret
;
public
static
bool
Authorize
(
int
level
,
string
msg
)
{
return
Authorize
(
null
,
level
,
out
int
pwLv
,
msg
);
}
/// <summary>
...
...
@@ -98,7 +98,7 @@ namespace FLY.Thick.Base.UI
/// <param name="level">要求的级别</param>
/// <param name="pwLv">当密码正确时,密码的级别</param>
/// <returns></returns>
public
static
bool
Authorize
(
int
level
,
out
int
pwLv
)
public
static
bool
Authorize
(
string
uiName
,
int
level
,
out
int
pwLv
,
string
msg
=
null
)
{
pwLv
=
0
;
//从容器获取
...
...
@@ -107,11 +107,16 @@ namespace FLY.Thick.Base.UI
return
true
;
var
passwordAuthorize
=
container
.
Resolve
<
PasswordAuthorize
>();
if
(!
string
.
IsNullOrEmpty
(
uiName
))
{
level
=
passwordAuthorize
.
GetLv
(
uiName
);
}
if
(
level
<=
0
)
return
true
;
WdPassword
w
=
new
WdPassword
();
w
.
Init
(
passwordAuthorize
,
level
);
w
.
Init
(
passwordAuthorize
,
level
,
msg
);
w
.
Owner
=
Application
.
Current
.
MainWindow
;
bool
ret
=
(
bool
)
w
.
ShowDialog
();
pwLv
=
w
.
PwLv
;
...
...
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