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
cf55a664
Commit
cf55a664
authored
Apr 09, 2021
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
改进 X轴小数点保留2位
parent
fea0a991
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
18 deletions
+31
-18
PgCurve.xaml.cs
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgCurve.xaml.cs
+31
-18
No files found.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgCurve.xaml.cs
View file @
cf55a664
...
...
@@ -56,6 +56,9 @@ namespace FLY.Thick.Base.UI
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.AxisX.LabelStyle.Format = "%F2";
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
)))));
...
...
@@ -94,7 +97,7 @@ namespace FLY.Thick.Base.UI
series1
.
ShadowOffset
=
2
;
series1
.
XValueType
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartValueType
.
Double
;
series1
.
YValueType
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
ChartValueType
.
Int32
;
this
.
chart1
.
Series
.
Add
(
series1
);
...
...
@@ -272,6 +275,7 @@ namespace FLY.Thick.Base.UI
}
thick
=
CurveCore
.
AD2Value
(
ad
,
AD2ValueFlag
.
NoRevised
);
thick
=
Math
.
Round
(
thick
,
2
);
chart1
.
Series
[
"Series 1"
].
Points
.
AddXY
(
thick
,
ad
);
chart1
.
Series
[
"Series 1"
].
Points
[
chart1
.
Series
[
"Series 1"
].
Points
.
Count
()
-
1
].
MarkerStyle
=
System
.
Windows
.
Forms
.
DataVisualization
.
Charting
.
MarkerStyle
.
None
;
...
...
@@ -375,25 +379,34 @@ namespace FLY.Thick.Base.UI
FromSheet
(
sheet
,
dataTable_info
);
}
Curves
.
CollectionChanged
-=
Curves_CollectionChanged
;
this
.
PropertyChanged
-=
PgCurveVm_PropertyChanged
;
Curves
.
Clear
();
for
(
int
i
=
0
;
i
<
dataTable_curve
.
Rows
.
Count
;
i
++)
{
var
dataRow
=
dataTable_curve
.
Rows
[
i
];
int
ad
=
System
.
Convert
.
ToInt32
(
dataRow
[
"AD"
]);
double
value
=
System
.
Convert
.
ToDouble
(
dataRow
[
"VALUE"
]);
Curves
.
Add
(
new
CurveCell2
()
{
AD
=
ad
,
Value
=
value
});
}
if
(
dataTable_info
.
Rows
.
Count
>
0
)
page
.
Dispatcher
.
Invoke
(()
=>
{
var
dataRow
=
dataTable_curve
.
Rows
[
0
];
Flag
=
(
CurveType
)
Enum
.
Parse
(
typeof
(
CurveType
),
(
string
)
dataRow
[
"曲线类型"
]);
CorrectWay
=
(
CurveCorrectWay
)
Enum
.
Parse
(
typeof
(
CurveCorrectWay
),
(
string
)
dataRow
[
"校正方式"
]);
}
this
.
PropertyChanged
+=
PgCurveVm_PropertyChanged
;
Curves
.
CollectionChanged
+=
Curves_CollectionChanged
;
Curves
.
CollectionChanged
-=
Curves_CollectionChanged
;
this
.
PropertyChanged
-=
PgCurveVm_PropertyChanged
;
Curves
.
Clear
();
for
(
int
i
=
0
;
i
<
dataTable_curve
.
Rows
.
Count
;
i
++)
{
var
dataRow
=
dataTable_curve
.
Rows
[
i
];
int
ad
=
System
.
Convert
.
ToInt32
(
dataRow
[
"AD"
]);
double
value
=
System
.
Convert
.
ToDouble
(
dataRow
[
"VALUE"
]);
Curves
.
Add
(
new
CurveCell2
()
{
AD
=
ad
,
Value
=
value
});
}
if
(
dataTable_info
.
Rows
.
Count
>
0
)
{
var
dataRow
=
dataTable_info
.
Rows
[
0
];
Flag
=
(
CurveType
)
Enum
.
Parse
(
typeof
(
CurveType
),
(
string
)
dataRow
[
"曲线类型"
]);
CorrectWay
=
(
CurveCorrectWay
)
Enum
.
Parse
(
typeof
(
CurveCorrectWay
),
(
string
)
dataRow
[
"校正方式"
]);
}
this
.
PropertyChanged
+=
PgCurveVm_PropertyChanged
;
Curves
.
CollectionChanged
+=
Curves_CollectionChanged
;
});
}
void
FromSheet
(
ExcelWorksheet
sheet
,
DataTable
dataTable
)
...
...
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