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
b3e5c982
Commit
b3e5c982
authored
Dec 30, 2018
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 修正 FlyData_Mix 的错误
parent
0769412b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
17 deletions
+9
-17
Page_MixTable.xaml.cs
...ect.FLY.Weight/FLY.Weight.UI.Client/Page_MixTable.xaml.cs
+1
-1
FlyData_Mix.cs
Project.FLY.Weight/FLY.Weight/Common/FlyData_Mix.cs
+8
-16
No files found.
Project.FLY.Weight/FLY.Weight.UI.Client/Page_MixTable.xaml.cs
View file @
b3e5c982
...
@@ -96,7 +96,7 @@ namespace FLY.Weight.UI.Client
...
@@ -96,7 +96,7 @@ namespace FLY.Weight.UI.Client
// %
// %
DataGridTextColumn
dgtc2
=
new
DataGridTextColumn
()
DataGridTextColumn
dgtc2
=
new
DataGridTextColumn
()
{
{
Binding
=
new
Binding
()
{
Path
=
new
PropertyPath
(
$"Items[
{
i
}
].PDisp"
),
StringFormat
=
"{0:F
3
}"
}
Binding
=
new
Binding
()
{
Path
=
new
PropertyPath
(
$"Items[
{
i
}
].PDisp"
),
StringFormat
=
"{0:F
4
}"
}
};
};
StackPanel
sp2
=
new
StackPanel
()
{
Orientation
=
Orientation
.
Horizontal
};
StackPanel
sp2
=
new
StackPanel
()
{
Orientation
=
Orientation
.
Horizontal
};
sp2
.
Children
.
Add
(
sp2
.
Children
.
Add
(
...
...
Project.FLY.Weight/FLY.Weight/Common/FlyData_Mix.cs
View file @
b3e5c982
...
@@ -11,11 +11,7 @@ namespace FLY.Weight.Common
...
@@ -11,11 +11,7 @@ namespace FLY.Weight.Common
/// <summary>
/// <summary>
/// 时间点
/// 时间点
/// </summary>
/// </summary>
public
DateTime
Time
public
DateTime
Time
{
get
;
set
;
}
{
get
;
set
;
}
public
float
Total
{
get
;
set
;
}
public
float
Total
{
get
;
set
;
}
...
@@ -59,12 +55,9 @@ namespace FLY.Weight.Common
...
@@ -59,12 +55,9 @@ namespace FLY.Weight.Common
{
{
string
[]
items
=
str
.
Split
(
new
char
[]
{
','
});
string
[]
items
=
str
.
Split
(
new
char
[]
{
','
});
if
(
items
.
Length
<
(
2
+
2
*
4
))
if
(
items
.
Length
<
(
2
))
return
false
;
return
false
;
int
idx
=
0
;
int
idx
=
0
;
DateTime
t
;
DateTime
t
;
float
f
;
float
f
;
...
@@ -81,21 +74,20 @@ namespace FLY.Weight.Common
...
@@ -81,21 +74,20 @@ namespace FLY.Weight.Common
Total
=
f
;
Total
=
f
;
idx
++;
idx
++;
//翻译
int
items_cnt
=
(
items
.
Length
-
2
)
/
2
;
//header += "," + n + "#";
for
(
int
i
=
0
;
i
<
items_cnt
;
i
++)
//header += "," + n + "#%";
for
(
int
i
=
0
;
i
<
4
;
i
++)
{
{
FlyData_MixItem
mixitem
=
new
FlyData_MixItem
();
if
(!
float
.
TryParse
(
items
[
idx
],
out
f
))
//?#重量
if
(!
float
.
TryParse
(
items
[
idx
],
out
f
))
//?#重量
return
false
;
return
false
;
Items
[
i
]
.
Disp
=
f
;
mixitem
.
Disp
=
f
;
idx
++;
idx
++;
if
(!
float
.
TryParse
(
items
[
idx
],
out
f
))
//?#比例
if
(!
float
.
TryParse
(
items
[
idx
],
out
f
))
//?#比例
return
false
;
return
false
;
Items
[
i
]
.
PDisp
=
f
;
mixitem
.
PDisp
=
f
;
idx
++;
idx
++;
Items
.
Add
(
mixitem
);
}
}
return
true
;
return
true
;
}
}
...
...
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