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
69b2a004
Commit
69b2a004
authored
Apr 20, 2021
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化 机架修正删除多余的点移动功能
parent
45bb6303
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
52 deletions
+15
-52
PgScanCorrVm.cs
...Y.Thick.Base/FLY.Thick.Base.UI/PgScanCorr/PgScanCorrVm.cs
+15
-52
No files found.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgScanCorr/PgScanCorrVm.cs
View file @
69b2a004
...
@@ -598,14 +598,6 @@ namespace FLY.Thick.Base.UI
...
@@ -598,14 +598,6 @@ namespace FLY.Thick.Base.UI
return
;
return
;
}
}
break
;
break
;
case
KeyPointsSelectMode
.
Move
:
{
keyPointLine
.
Move
(
cpEnd
.
X
,
SeriesInfos
[
0
].
Datas
);
if
(
selectType
==
SelectType
.
Cancel
)
keyPointLine
.
ResetSelected
();
}
break
;
}
}
}
}
...
@@ -888,8 +880,6 @@ namespace FLY.Thick.Base.UI
...
@@ -888,8 +880,6 @@ namespace FLY.Thick.Base.UI
public
ObservableCollection
<
XY
>
KeyPoints
{
get
;
}
=
new
ObservableCollection
<
XY
>();
public
ObservableCollection
<
XY
>
KeyPoints
{
get
;
}
=
new
ObservableCollection
<
XY
>();
public
int
SmoothFactor
{
get
;
set
;
}
=
20
;
public
int
SmoothFactor
{
get
;
set
;
}
=
20
;
public
int
SelectedIndex
{
get
;
private
set
;
}
=
-
1
;
public
event
PropertyChangedEventHandler
PropertyChanged
;
public
event
PropertyChangedEventHandler
PropertyChanged
;
...
@@ -898,61 +888,34 @@ namespace FLY.Thick.Base.UI
...
@@ -898,61 +888,34 @@ namespace FLY.Thick.Base.UI
public
void
Add
(
double
x
,
IEnumerable
<
double
>
orgDatas
)
public
void
Add
(
double
x
,
IEnumerable
<
double
>
orgDatas
)
{
{
ResetSelected
();
if
(
x
<
0
||
x
>=
orgDatas
.
Count
())
return
;
//超出范围
int
index
=
FindIndex
(
x
);
int
index
=
FindIndex
(
x
);
if
(
index
==
-
1
)
if
(
index
!=
-
1
)
{
return
;
double
y
=
CalY
(
x
,
orgDatas
);
//没有,可以添加
Insert
(
x
,
y
);
double
y
=
CalY
(
x
,
orgDatas
);
}
//没有,可以添加
Insert
(
x
,
y
);
}
}
public
void
Remove
(
double
x
)
public
void
Remove
(
double
x
)
{
{
ResetSelected
();
int
index
=
FindIndex
(
x
);
int
index
=
FindIndex
(
x
);
if
(
index
==
-
1
)
if
(
index
!=
-
1
)
{
return
;
return
;
}
KeyPoints
.
RemoveAt
(
index
);
KeyPoints
.
RemoveAt
(
index
);
}
}
public
void
Move
(
double
x
,
IEnumerable
<
double
>
orgDatas
)
{
if
(
SelectedIndex
>=
0
&&
SelectedIndex
<
KeyPoints
.
Count
())
{
if
(
SelectedIndex
-
1
>=
0
&&
x
<=
KeyPoints
[
SelectedIndex
-
1
].
X
)
{
// 移过头了,停!!!!
//换个点
SelectedIndex
--;
return
;
}
if
(
SelectedIndex
+
1
<
KeyPoints
.
Count
()
&&
x
>=
KeyPoints
[
SelectedIndex
+
1
].
X
)
{
// 移过头了,停!!!!
//换个点
SelectedIndex
++;
return
;
}
double
y
=
CalY
(
x
,
orgDatas
);
KeyPoints
[
SelectedIndex
]
=
new
XY
()
{
X
=
x
,
Y
=
y
};
}
else
{
SelectedIndex
=
FindIndex
(
x
);
}
}
public
void
Clear
()
{
public
void
Clear
()
{
ResetSelected
();
KeyPoints
.
Clear
();
KeyPoints
.
Clear
();
}
}
public
void
ResetSelected
()
{
SelectedIndex
=
-
1
;
}
/// <summary>
/// <summary>
/// 计算 位置为x 在 orgDatas中的y
/// 计算 位置为x 在 orgDatas中的y
/// </summary>
/// </summary>
...
...
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