Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.TVP.Golf
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘龙飞
VIZ.TVP.Golf
Commits
f84f786d
Commit
f84f786d
authored
Nov 23, 2022
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
排序逻辑
parent
074f0cd9
Show whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
824 additions
and
677 deletions
+824
-677
VIZ.TVP.Golf.Domain/Comparer/GroupTempModelComparer.cs
+53
-0
VIZ.TVP.Golf.Domain/Comparer/GroupTempModelTopComparer.cs
+132
-0
VIZ.TVP.Golf.Domain/Comparer/TeamTempModelComparer.cs
+175
-0
VIZ.TVP.Golf.Domain/Enum/ViewKeys.cs
+0
-10
VIZ.TVP.Golf.Domain/Model/TempModel/GroupTempModel.cs
+5
-5
VIZ.TVP.Golf.Domain/Model/TempModel/PlayerTempModel.cs
+6
-6
VIZ.TVP.Golf.Domain/Model/TempModel/TeamTempModel.cs
+19
-5
VIZ.TVP.Golf.Domain/VIZ.TVP.Golf.Domain.csproj
+3
-0
VIZ.TVP.Golf.Module/Main/View/MainView.xaml
+5
-0
VIZ.TVP.Golf.Module/Package/BottomHoleInfo/View/BottomHoleInfoView.xaml
+1
-7
VIZ.TVP.Golf.Module/Package/GroupHoleInfo/View/GroupHoleInfoView.xaml
+13
-13
VIZ.TVP.Golf.Module/Package/GroupHoleInfo/ViewModel/GroupHoleInfoViewModel.cs
+41
-21
VIZ.TVP.Golf.Module/Package/GroupInfo/View/GroupInfoView.xaml
+26
-6
VIZ.TVP.Golf.Module/Package/GroupInfo/ViewModel/GroupInfoViewModel.cs
+24
-8
VIZ.TVP.Golf.Module/Package/GroupRanking/GroupRankingViewModelBase.cs
+1
-1
VIZ.TVP.Golf.Module/Package/NameBar/View/NameBarBottomView.xaml
+0
-80
VIZ.TVP.Golf.Module/Package/NameBar/View/NameBarBottomView.xaml.cs
+0
-31
VIZ.TVP.Golf.Module/Package/NameBar/View/NameBarView.xaml
+0
-96
VIZ.TVP.Golf.Module/Package/NameBar/View/NameBarView.xaml.cs
+0
-31
VIZ.TVP.Golf.Module/Package/NameBar/ViewModel/NameBarBottomViewModel.cs
+0
-107
VIZ.TVP.Golf.Module/Package/NameBar/ViewModel/NameBarViewModel.cs
+0
-140
VIZ.TVP.Golf.Module/Package/PackageViewModelBase.cs
+18
-4
VIZ.TVP.Golf.Module/Package/TeamRanking/AfterMatchTeamRanking/View/AfterMatchTeamRankingView.xaml
+2
-22
VIZ.TVP.Golf.Module/Package/TeamRanking/AfterMatchTeamRanking/ViewModel/AfterMatchTeamRankingViewModel.cs
+26
-0
VIZ.TVP.Golf.Module/Package/TeamRanking/BeforeMatchTeamRanking/View/BeforeMatchTeamRankingView.xaml
+2
-23
VIZ.TVP.Golf.Module/Package/TeamRanking/BeforeMatchTeamRanking/ViewModel/BeforeMatchTeamRankingViewModel.cs
+35
-0
VIZ.TVP.Golf.Module/Package/TeamRanking/LongTeamRanking/View/LongTeamRankingView.xaml
+3
-3
VIZ.TVP.Golf.Module/Package/TeamRanking/ShortTeamRanking/View/ShortTeamRankingView.xaml
+2
-2
VIZ.TVP.Golf.Module/Package/TeamRanking/ShortTeamRanking/ViewModel/ShortTeamRankingViewModel.cs
+17
-11
VIZ.TVP.Golf.Module/Package/TeamRanking/TeamRankingViewModelBase.cs
+18
-3
VIZ.TVP.Golf.Module/VIZ.TVP.Golf.Module.csproj
+0
-16
VIZ.TVP.Golf.Module/Widgets/Group/GroupPickerPanel.xaml
+7
-7
VIZ.TVP.Golf.Module/Widgets/Group/GroupPickerPanelModel.cs
+12
-16
VIZ.TVP.Golf.Module/Widgets/Group/GroupPickerPanelNoPlayer.xaml
+3
-3
VIZ.TVP.Golf.sln
+1
-0
高尔夫球数据获取_test.xml
+174
-0
No files found.
VIZ.TVP.Golf.Domain/Comparer/GroupTempModelComparer.cs
0 → 100644
View file @
f84f786d
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
VIZ.TVP.Golf.Domain
{
/// <summary>
/// 分组临时模型排序比较器
/// </summary>
public
class
GroupTempModelComparer
:
IComparer
<
GroupTempModel
>
{
/// <summary>
/// 分组临时模型排序比较器
/// </summary>
/// <param name="playerRealModels">球员真实模型</param>
/// <param name="round">轮次</param>
public
GroupTempModelComparer
(
List
<
PlayerRealModel
>
playerRealModels
,
int
round
)
{
this
.
PlayerRealModels
=
playerRealModels
;
this
.
Round
=
round
;
}
/// <summary>
/// 轮次
/// </summary>
public
int
Round
{
get
;
private
set
;
}
/// <summary>
/// 球员真实模型
/// </summary>
public
List
<
PlayerRealModel
>
PlayerRealModels
{
get
;
private
set
;
}
/// <summary>
/// 比较
/// </summary>
public
int
Compare
(
GroupTempModel
x
,
GroupTempModel
y
)
{
var
real_players_X
=
this
.
PlayerRealModels
.
Where
(
p
=>
p
.
TeamInfoModel
==
x
.
TeamInfo
&&
p
.
PlayerInfoModel
.
Group
==
x
.
Group
);
var
real_players_Y
=
this
.
PlayerRealModels
.
Where
(
p
=>
p
.
TeamInfoModel
==
y
.
TeamInfo
&&
p
.
PlayerInfoModel
.
Group
==
y
.
Group
);
// 杆数少 排名靠前
int
total_x
=
real_players_X
.
Sum
(
p
=>
p
.
Score
);
int
total_y
=
real_players_Y
.
Sum
(
p
=>
p
.
Score
);
if
(
total_x
==
total_y
)
return
0
;
else
return
total_x
<
total_y
?
-
1
:
1
;
}
}
}
VIZ.TVP.Golf.Domain/Comparer/GroupTempModelTopComparer.cs
0 → 100644
View file @
f84f786d
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
VIZ.TVP.Golf.Domain
{
/// <summary>
/// 分组临时模型顶部排序比较器
/// </summary>
public
class
GroupTempModelTopComparer
:
IComparer
<
GroupTempModel
>
{
/// <summary>
/// 分组临时模型顶部排序比较器
/// </summary>
/// <param name="playerRealModels">球员真实模型</param>
/// <param name="round">轮次</param>
public
GroupTempModelTopComparer
(
List
<
PlayerRealModel
>
playerRealModels
,
int
round
)
{
this
.
PlayerRealModels
=
playerRealModels
;
this
.
Round
=
round
;
}
/// <summary>
/// 轮次
/// </summary>
public
int
Round
{
get
;
private
set
;
}
/// <summary>
/// 球员真实模型
/// </summary>
public
List
<
PlayerRealModel
>
PlayerRealModels
{
get
;
private
set
;
}
/// <summary>
/// 比较
/// </summary>
public
int
Compare
(
GroupTempModel
x
,
GroupTempModel
y
)
{
var
real_players_X
=
this
.
PlayerRealModels
.
Where
(
p
=>
p
.
TeamInfoModel
==
x
.
TeamInfo
&&
p
.
PlayerInfoModel
.
Group
==
x
.
Group
);
var
real_players_Y
=
this
.
PlayerRealModels
.
Where
(
p
=>
p
.
TeamInfoModel
==
y
.
TeamInfo
&&
p
.
PlayerInfoModel
.
Group
==
y
.
Group
);
// 1. 杆数少 排名靠前
int
total_x
=
real_players_X
.
Sum
(
p
=>
p
.
Score
);
int
total_y
=
real_players_Y
.
Sum
(
p
=>
p
.
Score
);
if
(
total_x
!=
total_y
)
return
total_x
<
total_y
?
-
1
:
1
;
// 2. 比较后9洞总成绩
int
last_x
=
0
;
foreach
(
var
real_player
in
real_players_X
)
{
var
real_round
=
real_player
.
Rounds
.
FirstOrDefault
(
p
=>
p
.
No
==
this
.
Round
);
if
(
real_round
==
null
)
continue
;
last_x
+=
real_round
.
Scores
.
Skip
(
9
).
Sum
(
p
=>
p
.
Strokes
-
p
.
Par
);
}
int
last_y
=
0
;
foreach
(
var
real_player
in
real_players_Y
)
{
var
real_round
=
real_player
.
Rounds
.
FirstOrDefault
(
p
=>
p
.
No
==
this
.
Round
);
if
(
real_round
==
null
)
continue
;
last_y
+=
real_round
.
Scores
.
Skip
(
9
).
Sum
(
p
=>
p
.
Strokes
-
p
.
Par
);
}
if
(
last_x
!=
last_y
)
return
last_x
<
last_y
?
-
1
:
1
;
// 3. 逐个比较第二轮每一洞成绩
for
(
int
i
=
18
;
i
>=
1
;
--
i
)
{
int
hole_result
=
this
.
CompareWithHole
(
x
,
y
,
2
,
i
);
if
(
hole_result
!=
0
)
{
return
hole_result
;
}
}
return
0
;
}
/// <summary>
/// 比较大小
/// </summary>
/// <param name="round">轮次</param>
private
int
CompareWithHole
(
GroupTempModel
x
,
GroupTempModel
y
,
int
round
,
int
hole
)
{
var
real_players_X
=
this
.
PlayerRealModels
.
Where
(
p
=>
p
.
TeamInfoModel
==
x
.
TeamInfo
&&
p
.
PlayerInfoModel
.
Group
==
x
.
Group
);
var
real_players_Y
=
this
.
PlayerRealModels
.
Where
(
p
=>
p
.
TeamInfoModel
==
y
.
TeamInfo
&&
p
.
PlayerInfoModel
.
Group
==
y
.
Group
);
int
total_x
=
0
;
foreach
(
var
real_player
in
real_players_X
)
{
RoundRealModel
real_round
=
real_player
.
Rounds
.
FirstOrDefault
(
p
=>
p
.
No
==
round
);
if
(
real_round
==
null
)
continue
;
ScoreRealModel
real_score
=
real_round
.
Scores
.
FirstOrDefault
(
p
=>
p
.
Hole
==
hole
);
if
(
real_score
==
null
)
continue
;
total_x
+=
real_score
.
Strokes
-
real_score
.
Par
;
}
int
total_y
=
0
;
foreach
(
var
real_player
in
real_players_Y
)
{
RoundRealModel
real_round
=
real_player
.
Rounds
.
FirstOrDefault
(
p
=>
p
.
No
==
round
);
if
(
real_round
==
null
)
continue
;
ScoreRealModel
real_score
=
real_round
.
Scores
.
FirstOrDefault
(
p
=>
p
.
Hole
==
hole
);
if
(
real_score
==
null
)
continue
;
total_y
+=
real_score
.
Strokes
-
real_score
.
Par
;
}
if
(
total_x
==
total_y
)
return
0
;
else
return
total_x
<
total_y
?
-
1
:
1
;
}
}
}
VIZ.TVP.Golf.Domain/Comparer/TeamTempModelComparer.cs
0 → 100644
View file @
f84f786d
using
System
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Web.Routing
;
namespace
VIZ.TVP.Golf.Domain
{
/// <summary>
/// 队伍临时模型比较器
/// </summary>
public
class
TeamTempModelComparer
:
IComparer
<
TeamTempModel
>
{
/// <summary>
/// 队伍临时模型比较器
/// </summary>
/// <param name="playerRealModels">球员真实模型</param>
public
TeamTempModelComparer
(
List
<
PlayerRealModel
>
playerRealModels
)
{
this
.
PlayerRealModels
=
playerRealModels
;
}
/// <summary>
/// 队伍临时模型比较器
/// </summary>
/// <param name="playerRealModels">球员真实模型</param>
/// <param name="round">轮次</param>
public
TeamTempModelComparer
(
List
<
PlayerRealModel
>
playerRealModels
,
int
round
)
{
this
.
PlayerRealModels
=
playerRealModels
;
this
.
Round
=
round
;
}
/// <summary>
/// 球员真实模型
/// </summary>
public
List
<
PlayerRealModel
>
PlayerRealModels
{
get
;
private
set
;
}
/// <summary>
/// 轮次
/// </summary>
public
int
?
Round
{
get
;
private
set
;
}
/// <summary>
/// 比较大小
/// </summary>
public
int
Compare
(
TeamTempModel
x
,
TeamTempModel
y
)
{
return
this
.
Round
==
null
?
this
.
CompareAllRound
(
x
,
y
)
:
this
.
CompareWithRound
(
x
,
y
,
this
.
Round
.
Value
);
}
/// <summary>
/// 比较大小, 所有轮次
/// </summary>
/// <remarks>
/// 1. 杆数少排名靠前
/// 2. 杆数相同时则比较第二轮成绩
/// 3. 如果再次相同,则比较第二轮由18号洞往前推的每一洞
/// </remarks>
/// <returns></returns>
private
int
CompareAllRound
(
TeamTempModel
x
,
TeamTempModel
y
)
{
var
real_players_X
=
this
.
PlayerRealModels
.
Where
(
p
=>
p
.
TeamInfoModel
==
x
.
TeamInfoModel
);
var
real_players_Y
=
this
.
PlayerRealModels
.
Where
(
p
=>
p
.
TeamInfoModel
==
y
.
TeamInfoModel
);
// 1. 杆数少排名靠前
int
total_x
=
real_players_X
.
Sum
(
p
=>
p
.
Score
);
int
total_y
=
real_players_Y
.
Sum
(
p
=>
p
.
Score
);
if
(
total_x
!=
total_y
)
{
return
total_x
<
total_y
?
-
1
:
1
;
}
// 2. 杆数相同时则比较第二轮成绩
int
round_result
=
this
.
CompareWithRound
(
x
,
y
,
2
);
if
(
round_result
!=
0
)
{
return
total_x
<
total_y
?
-
1
:
1
;
}
// 3. 逐个比较第二轮每一洞成绩
for
(
int
i
=
18
;
i
>=
1
;
--
i
)
{
int
hole_result
=
this
.
CompareWithHole
(
x
,
y
,
2
,
i
);
if
(
hole_result
!=
0
)
{
return
hole_result
;
}
}
return
0
;
}
/// <summary>
/// 比较大小
/// </summary>
/// <param name="round">轮次</param>
private
int
CompareWithRound
(
TeamTempModel
x
,
TeamTempModel
y
,
int
round
)
{
var
real_players_X
=
this
.
PlayerRealModels
.
Where
(
p
=>
p
.
TeamInfoModel
==
x
.
TeamInfoModel
);
var
real_players_Y
=
this
.
PlayerRealModels
.
Where
(
p
=>
p
.
TeamInfoModel
==
y
.
TeamInfoModel
);
int
total_x
=
0
;
foreach
(
var
real_player
in
real_players_X
)
{
RoundRealModel
real_round
=
real_player
.
Rounds
.
FirstOrDefault
(
p
=>
p
.
No
==
round
);
if
(
real_round
!=
null
)
{
total_x
+=
real_round
.
Today
;
}
}
int
total_y
=
0
;
foreach
(
var
real_player
in
real_players_Y
)
{
RoundRealModel
real_round
=
real_player
.
Rounds
.
FirstOrDefault
(
p
=>
p
.
No
==
round
);
if
(
real_round
!=
null
)
{
total_y
+=
real_round
.
Today
;
}
}
if
(
total_x
==
total_y
)
return
0
;
else
return
total_x
<
total_y
?
-
1
:
1
;
}
/// <summary>
/// 比较大小
/// </summary>
/// <param name="round">轮次</param>
private
int
CompareWithHole
(
TeamTempModel
x
,
TeamTempModel
y
,
int
round
,
int
hole
)
{
var
real_players_X
=
this
.
PlayerRealModels
.
Where
(
p
=>
p
.
TeamInfoModel
==
x
.
TeamInfoModel
);
var
real_players_Y
=
this
.
PlayerRealModels
.
Where
(
p
=>
p
.
TeamInfoModel
==
y
.
TeamInfoModel
);
int
total_x
=
0
;
foreach
(
var
real_player
in
real_players_X
)
{
RoundRealModel
real_round
=
real_player
.
Rounds
.
FirstOrDefault
(
p
=>
p
.
No
==
round
);
if
(
real_round
==
null
)
continue
;
ScoreRealModel
real_score
=
real_round
.
Scores
.
FirstOrDefault
(
p
=>
p
.
Hole
==
hole
);
if
(
real_score
==
null
)
continue
;
total_x
+=
real_score
.
Strokes
-
real_score
.
Par
;
}
int
total_y
=
0
;
foreach
(
var
real_player
in
real_players_Y
)
{
RoundRealModel
real_round
=
real_player
.
Rounds
.
FirstOrDefault
(
p
=>
p
.
No
==
round
);
if
(
real_round
==
null
)
continue
;
ScoreRealModel
real_score
=
real_round
.
Scores
.
FirstOrDefault
(
p
=>
p
.
Hole
==
hole
);
if
(
real_score
==
null
)
continue
;
total_y
+=
real_score
.
Strokes
-
real_score
.
Par
;
}
if
(
total_x
==
total_y
)
return
0
;
else
return
total_x
<
total_y
?
-
1
:
1
;
}
}
}
VIZ.TVP.Golf.Domain/Enum/ViewKeys.cs
View file @
f84f786d
...
...
@@ -98,15 +98,5 @@ namespace VIZ.TVP.Golf.Domain
/// 长版小组排名
/// </summary>
public
const
string
LongGroupRanking
=
"LongGroupRanking"
;
/// <summary>
/// 人名条
/// </summary>
public
const
string
NameBarView
=
"NameBarView"
;
/// <summary>
/// 底部人名条
/// </summary>
public
const
string
NameBarBottomView
=
"NameBarBottomView"
;
}
}
VIZ.TVP.Golf.Domain/Model/TempModel/GroupTempModel.cs
View file @
f84f786d
...
...
@@ -97,16 +97,16 @@ namespace VIZ.TVP.Golf.Domain
#
endregion
#
region
PlayersS
trokes
--
总杆数
#
region
PlayersS
core
--
总得分
private
string
playersS
trokes
;
private
string
playersS
core
;
/// <summary>
/// 总杆数
/// </summary>
public
string
PlayersS
trokes
public
string
PlayersS
core
{
get
{
return
playersS
trokes
;
}
set
{
playersS
trokes
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
PlayersStrokes
));
}
get
{
return
playersS
core
;
}
set
{
playersS
core
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
PlayersScore
));
}
}
#
endregion
...
...
VIZ.TVP.Golf.Domain/Model/TempModel/PlayerTempModel.cs
View file @
f84f786d
...
...
@@ -68,16 +68,16 @@ namespace VIZ.TVP.Golf.Domain
#
endregion
#
region
S
trokes
--
总杆数
#
region
S
core
--
得分
private
int
s
trokes
;
private
int
s
core
;
/// <summary>
///
总杆数
///
得分
/// </summary>
public
int
S
trokes
public
int
S
core
{
get
{
return
s
trokes
;
}
set
{
s
trokes
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Strokes
));
}
get
{
return
s
core
;
}
set
{
s
core
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Score
));
}
}
#
endregion
...
...
VIZ.TVP.Golf.Domain/Model/TempModel/TeamTempModel.cs
View file @
f84f786d
...
...
@@ -82,16 +82,30 @@ namespace VIZ.TVP.Golf.Domain
#
endregion
#
region
TotalS
trokes
--
总杆数
#
region
TotalS
coreValue
--
总得分值
private
string
totalStrokes
;
private
int
totalScoreValue
;
/// <summary>
/// 总得分值
/// </summary>
public
int
TotalScoreValue
{
get
{
return
totalScoreValue
;
}
set
{
totalScoreValue
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TotalScoreValue
));
}
}
#
endregion
#
region
TotalScore
--
总得分
private
string
totalScore
;
/// <summary>
/// 总杆数
/// </summary>
public
string
TotalS
trokes
public
string
TotalS
core
{
get
{
return
totalS
trokes
;
}
set
{
totalS
trokes
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TotalStrokes
));
}
get
{
return
totalS
core
;
}
set
{
totalS
core
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TotalScore
));
}
}
#
endregion
...
...
VIZ.TVP.Golf.Domain/VIZ.TVP.Golf.Domain.csproj
View file @
f84f786d
...
...
@@ -65,6 +65,9 @@
</ItemGroup>
<ItemGroup>
<Compile Include="ApplicationDomainEx.cs" />
<Compile Include="Comparer\GroupTempModelTopComparer.cs" />
<Compile Include="Comparer\GroupTempModelComparer.cs" />
<Compile Include="Comparer\TeamTempModelComparer.cs" />
<Compile Include="Enum\ViewKeys.cs" />
<Compile Include="Model\EntityModel\HoleInfoModel.cs" />
<Compile Include="Model\EntityModel\PlayerInfoModel.cs" />
...
...
VIZ.TVP.Golf.Module/Main/View/MainView.xaml
View file @
f84f786d
...
...
@@ -64,8 +64,10 @@
Content="分组洞信息版"></RadioButton>
<RadioButton x:Name="rb_BottomHoleInfo" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="底部洞信息版"></RadioButton>
<!-- 队伍排名 -->
<Rectangle Height="1" Fill="#44000000" Margin="0,5,0,5"></Rectangle>
<RadioButton x:Name="rb_BeforeMatchTeamRanking" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="赛前队伍排名"></RadioButton>
<RadioButton x:Name="rb_AfterMatchTeamRanking" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
...
...
@@ -74,7 +76,10 @@
Content="短版队伍排名"></RadioButton>
<RadioButton x:Name="rb_LongTeamRanking" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="长版队伍排名"></RadioButton>
<!-- 小组排名 -->
<Rectangle Height="1" Fill="#44000000" Margin="0,5,0,5"></Rectangle>
<RadioButton x:Name="rb_BeforeMatchGroupRanking" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="赛前分组排名"></RadioButton>
<RadioButton x:Name="rb_AfterMatchGroupRanking" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
...
...
VIZ.TVP.Golf.Module/Package/BottomHoleInfo/View/BottomHoleInfoView.xaml
View file @
f84f786d
...
...
@@ -32,13 +32,7 @@
<!-- 版子操作 -->
<Border Grid.Row="0" Grid.ColumnSpan="2" BorderBrush="#44000000" Background="#66b6f2e3" BorderThickness="1" Margin="5" Padding="5">
<StackPanel Orientation="Horizontal">
<fcommon:IconButton Style="{StaticResource IconButton_Default}"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/db_16x16.png"
Content="加载本地数据" Command="{Binding Path=LoadLocalDataCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
IsEnabled="{Binding Path=IsLoadRemoteDataEnabled,Mode=OneWay}"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/refresh_16x16.png"
Content="刷新实时数据" Command="{Binding Path=LoadRemoteDataCommand}"></fcommon:IconButton>
</StackPanel>
</Border>
<!-- 版子信息 -->
...
...
VIZ.TVP.Golf.Module/Package/GroupHoleInfo/View/GroupHoleInfoView.xaml
View file @
f84f786d
...
...
@@ -48,20 +48,13 @@
<Border Grid.Row="1" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="220"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition Height="220"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
</Grid.RowDefinitions>
<!-- 组信息 -->
<GroupBox Padding="10">
<GroupBox.Header>
<TextBlock Text="组信息" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<local:GroupPickerPanelNoPlayer DataContext="{Binding Path=GroupPickerPanelModel}" Margin="5"></local:GroupPickerPanelNoPlayer>
</GroupBox>
<!-- 轮次 -->
<GroupBox Padding="10" Grid.Row="
1
">
<GroupBox Padding="10" Grid.Row="
0
">
<GroupBox.Header>
<TextBlock Text="轮次信息" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
...
...
@@ -79,6 +72,13 @@
</StackPanel>
</Grid>
</GroupBox>
<!-- 组信息 -->
<GroupBox Padding="10" Grid.Row="1">
<GroupBox.Header>
<TextBlock Text="组信息" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<local:GroupPickerPanelNoPlayer DataContext="{Binding Path=GroupPickerPanelModel}" Margin="5"></local:GroupPickerPanelNoPlayer>
</GroupBox>
<!-- 洞得分信息 -->
<GroupBox Padding="10" Grid.Row="2">
<GroupBox.Header>
...
...
@@ -114,12 +114,12 @@
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<!-- 前
18
洞 -->
<!-- 前
9
洞 -->
<fcommon:LabelValue Style="{StaticResource LabelValue_Default}" LabelWidth="60"
Label="前
18洞:" Text="{Binding Path=First18
HoleStrokes,Mode=TwoWay}"></fcommon:LabelValue>
<!-- 后
18
洞 -->
Label="前
9洞:" Text="{Binding Path=First
HoleStrokes,Mode=TwoWay}"></fcommon:LabelValue>
<!-- 后
9
洞 -->
<fcommon:LabelValue Style="{StaticResource LabelValue_Default}" LabelWidth="60"
Label="后
18洞:" Text="{Binding Path=Secend18
HoleStrokes,Mode=TwoWay}" Grid.Column="1"></fcommon:LabelValue>
Label="后
9洞:" Text="{Binding Path=Secend
HoleStrokes,Mode=TwoWay}" Grid.Column="1"></fcommon:LabelValue>
<!-- 总计 -->
<fcommon:LabelValue Style="{StaticResource LabelValue_Default}" LabelWidth="60"
Label="总计:" Text="{Binding Path=TotalHoleStrokes,Mode=TwoWay}" Grid.Column="2"></fcommon:LabelValue>
...
...
VIZ.TVP.Golf.Module/Package/GroupHoleInfo/ViewModel/GroupHoleInfoViewModel.cs
View file @
f84f786d
...
...
@@ -34,6 +34,11 @@ namespace VIZ.TVP.Golf.Module
// Field
// ===================================================================================
/// <summary>
/// 上下半场每场洞数
/// </summary>
public
const
int
FIRST_SECEND_HOLE_COUNT
=
9
;
// ===================================================================================
// Property
// ===================================================================================
...
...
@@ -80,30 +85,30 @@ namespace VIZ.TVP.Golf.Module
#
endregion
#
region
First
18HoleStrokes
--
前
18
洞总杆数
#
region
First
HoleStrokes
--
上半
洞总杆数
private
string
first
18
HoleStrokes
;
private
string
firstHoleStrokes
;
/// <summary>
/// 前18洞总杆数
/// </summary>
public
string
First
18
HoleStrokes
public
string
FirstHoleStrokes
{
get
{
return
first
18
HoleStrokes
;
}
set
{
first
18HoleStrokes
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
First18
HoleStrokes
));
}
get
{
return
firstHoleStrokes
;
}
set
{
first
HoleStrokes
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
First
HoleStrokes
));
}
}
#
endregion
#
region
Secend
18HoleStrokes
--
后
18
洞中
杆数
#
region
Secend
HoleStrokes
--
下半洞总
杆数
private
string
secend
18
HoleStrokes
;
private
string
secendHoleStrokes
;
/// <summary>
/// 后18洞中杆数
/// </summary>
public
string
Secend
18
HoleStrokes
public
string
SecendHoleStrokes
{
get
{
return
secend
18
HoleStrokes
;
}
set
{
secend
18HoleStrokes
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Secend18
HoleStrokes
));
}
get
{
return
secendHoleStrokes
;
}
set
{
secend
HoleStrokes
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Secend
HoleStrokes
));
}
}
#
endregion
...
...
@@ -205,19 +210,19 @@ namespace VIZ.TVP.Golf.Module
{
if
(
this
.
GroupHoleTempModels
==
null
||
this
.
GroupHoleTempModels
.
Count
==
0
)
{
this
.
First
18
HoleStrokes
=
null
;
this
.
Secend
18
HoleStrokes
=
null
;
this
.
FirstHoleStrokes
=
null
;
this
.
SecendHoleStrokes
=
null
;
this
.
TotalHoleStrokes
=
null
;
return
;
}
int
first
18
=
this
.
GroupHoleTempModels
.
Take
(
18
).
Sum
(
p
=>
ValueHelper
.
ConvertValue
<
int
>(
p
.
TotalStrokes
));
int
secend
18
=
this
.
GroupHoleTempModels
.
Skip
(
18
).
Take
(
18
).
Sum
(
p
=>
ValueHelper
.
ConvertValue
<
int
>(
p
.
TotalStrokes
));
int
first
=
this
.
GroupHoleTempModels
.
Take
(
FIRST_SECEND_HOLE_COUNT
).
Sum
(
p
=>
ValueHelper
.
ConvertValue
<
int
>(
p
.
TotalStrokes
));
int
secend
=
this
.
GroupHoleTempModels
.
Skip
(
FIRST_SECEND_HOLE_COUNT
).
Take
(
FIRST_SECEND_HOLE_COUNT
).
Sum
(
p
=>
ValueHelper
.
ConvertValue
<
int
>(
p
.
TotalStrokes
));
this
.
First
18HoleStrokes
=
first18
.
ToString
();
this
.
Secend
18HoleStrokes
=
secend18
.
ToString
();
this
.
TotalHoleStrokes
=
(
first
18
+
secend18
).
ToString
();
this
.
First
HoleStrokes
=
first
.
ToString
();
this
.
Secend
HoleStrokes
=
secend
.
ToString
();
this
.
TotalHoleStrokes
=
(
first
+
secend
).
ToString
();
}
#
endregion
...
...
@@ -232,10 +237,18 @@ namespace VIZ.TVP.Golf.Module
/// <param name="list">真实球员模型</param>
private
void
UpdateGroupHoleTempModels
(
List
<
PlayerRealModel
>
list
)
{
var
players
=
ApplicationDomainEx
.
PlayerInfos
.
Where
(
p
=>
p
.
Group
==
this
.
GroupPickerPanelModel
.
SelectedGroupInfo
.
Group
);
var
players
=
ApplicationDomainEx
.
PlayerInfos
.
Where
(
p
=>
p
.
Group
==
this
.
GroupPickerPanelModel
.
SelectedGroupInfo
.
Group
&&
p
.
TeamID
==
this
.
GroupPickerPanelModel
.
SelectedGroupInfo
.
TeamInfo
.
TeamID
);
ObservableCollection
<
GroupHoleTempModel
>
groupHoleTempModels
=
new
ObservableCollection
<
GroupHoleTempModel
>();
if
(
this
.
SelectedRound
==
0
)
{
this
.
GroupHoleTempModels
=
groupHoleTempModels
;
// 统计
this
.
Summary
();
return
;
}
foreach
(
HoleInfoModel
holeInfo
in
ApplicationDomainEx
.
HoleInfos
)
{
GroupHoleTempModel
model
=
new
GroupHoleTempModel
();
...
...
@@ -243,7 +256,6 @@ namespace VIZ.TVP.Golf.Module
model
.
Par
=
holeInfo
.
Par
;
int
total
=
0
;
foreach
(
PlayerInfoModel
player
in
players
)
{
PlayerRealModel
player_real
=
list
.
FirstOrDefault
(
p
=>
p
.
PlayerID
==
player
.
PlayerID
);
...
...
@@ -254,8 +266,12 @@ namespace VIZ.TVP.Golf.Module
if
(
round_real
==
null
)
continue
;
total
+=
round_real
.
Today
;
model
.
TotalStrokesDetail
+=
$"
{
player
.
Name
}
:
{
round_real
.
Today
}
| "
;
ScoreRealModel
score_real
=
round_real
.
Scores
.
FirstOrDefault
(
p
=>
p
.
Hole
==
holeInfo
.
HoleID
);
if
(
score_real
==
null
)
continue
;
total
+=
score_real
.
Strokes
;
model
.
TotalStrokesDetail
+=
$"
{
player
.
Name
}
:
{
score_real
.
Strokes
}
| "
;
}
model
.
TotalStrokes
=
total
.
ToString
();
...
...
@@ -267,6 +283,10 @@ namespace VIZ.TVP.Golf.Module
// 统计
this
.
Summary
();
// 更新其他信息
this
.
GroupPickerPanelModel
.
UpdatePlayersProperty
();
}
}
}
VIZ.TVP.Golf.Module/Package/GroupInfo/View/GroupInfoView.xaml
View file @
f84f786d
...
...
@@ -44,15 +44,34 @@
</Border>
<!-- 版子信息 -->
<Border Grid.Row="1" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition Height="220"></RowDefinition>
<RowDefinition Height="220"></RowDefinition>
</Grid.RowDefinitions>
<!-- 队伍1 -->
<GroupBox Padding="10">
<!-- 轮次 -->
<GroupBox Padding="10" Grid.Row="0">
<GroupBox.Header>
<TextBlock Text="轮次信息" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Text="轮次:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,5,0" Grid.Row="1"></TextBlock>
<StackPanel Grid.Column="1" Margin="5,0,10,0" HorizontalAlignment="Left" Orientation="Horizontal">
<ComboBox Height="30" Width="240" VerticalContentAlignment="Center"
SelectedValue="{Binding Path=SelectedRound,Mode=TwoWay}"
ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.Rounds}}"></ComboBox>
</StackPanel>
</Grid>
</GroupBox>
<!-- 预设 -->
<GroupBox Padding="10" Grid.Row="1">
<GroupBox.Header>
<TextBlock Text="预设" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
...
...
@@ -75,20 +94,21 @@
</StackPanel>
</Grid>
</GroupBox>
<GroupBox Grid.Row="1" Padding="10">
<!-- 分组1 -->
<GroupBox Grid.Row="2" Padding="10">
<GroupBox.Header>
<TextBlock Text="分组1" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<local:GroupPickerPanelNoPlayer DataContext="{Binding GroupPickerPanelModel1}"></local:GroupPickerPanelNoPlayer>
</GroupBox>
<GroupBox Grid.Row="2" Padding="10">
<!-- 分组2 -->
<GroupBox Grid.Row="3" Padding="10">
<GroupBox.Header>
<TextBlock Text="分组2" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<local:GroupPickerPanelNoPlayer DataContext="{Binding GroupPickerPanelModel2}"></local:GroupPickerPanelNoPlayer>
</GroupBox>
</Grid>
</ScrollViewer>
</Border>
<!-- 示意图 -->
<Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
...
...
VIZ.TVP.Golf.Module/Package/GroupInfo/ViewModel/GroupInfoViewModel.cs
View file @
f84f786d
...
...
@@ -32,6 +32,20 @@ namespace VIZ.TVP.Golf.Module
// Property
// ===================================================================================
#
region
SelectedRound
--
选中的轮次
private
int
selectedRound
;
/// <summary>
/// 选中的轮次
/// </summary>
public
int
SelectedRound
{
get
{
return
selectedRound
;
}
set
{
selectedRound
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectedRound
));
}
}
#
endregion
#
region
Group
--
分组
private
string
group
;
...
...
@@ -113,11 +127,13 @@ namespace VIZ.TVP.Golf.Module
List
<
PlayerRealModel
>
list
=
this
.
realDataService
.
LoadPlayerRealModelFormLocal
(
vm
.
SelectedFile
.
FileName
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel1
?.
Player1
,
list
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel1
?.
Player2
,
list
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel1
?.
Player1
,
this
.
SelectedRound
,
list
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel1
?.
Player2
,
this
.
SelectedRound
,
list
);
this
.
GroupPickerPanelModel1
.
UpdatePlayersProperty
();
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel2
?.
Player1
,
list
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel2
?.
Player2
,
list
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel2
?.
Player1
,
this
.
SelectedRound
,
list
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel2
?.
Player2
,
this
.
SelectedRound
,
list
);
this
.
GroupPickerPanelModel2
.
UpdatePlayersProperty
();
}
#
endregion
...
...
@@ -144,11 +160,11 @@ namespace VIZ.TVP.Golf.Module
{
List
<
PlayerRealModel
>
list
=
this
.
realDataService
.
LoadPlayerRealModelFormLocal
(
fileName
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel1
?.
Player1
,
list
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel1
?.
Player2
,
list
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel1
?.
Player1
,
this
.
SelectedRound
,
list
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel1
?.
Player2
,
this
.
SelectedRound
,
list
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel2
?.
Player1
,
list
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel2
?.
Player2
,
list
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel2
?.
Player1
,
this
.
SelectedRound
,
list
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel2
?.
Player2
,
this
.
SelectedRound
,
list
);
});
});
}
...
...
VIZ.TVP.Golf.Module/Package/GroupRanking/GroupRankingViewModelBase.cs
View file @
f84f786d
...
...
@@ -142,7 +142,7 @@ namespace VIZ.TVP.Golf.Module
}
temp_model
.
PlayersDisplayName
=
string
.
Join
(
" / "
,
temp_model
.
Players
.
Select
(
p
=>
p
.
Name
));
List
<
int
>
player_ids
=
temp_model
.
Players
.
Select
(
p
=>
p
.
PlayerID
).
ToList
();
temp_model
.
PlayersS
trokes
=
list
.
Where
(
p
=>
player_ids
.
Contains
(
p
.
PlayerID
)).
Sum
(
p
=>
p
.
Strokes
).
ToString
();
temp_model
.
PlayersS
core
=
list
.
Where
(
p
=>
player_ids
.
Contains
(
p
.
PlayerID
)).
Sum
(
p
=>
p
.
Score
).
ToString
();
temp_model
.
TeamLogo
=
ApplicationDomainEx
.
TeamInfos
.
FirstOrDefault
(
p
=>
p
.
TeamID
==
team_group
.
Key
)?.
Logo
;
groupTempModels
.
Add
(
temp_model
);
...
...
VIZ.TVP.Golf.Module/Package/NameBar/View/NameBarBottomView.xaml
deleted
100644 → 0
View file @
074f0cd9
<UserControl x:Class="VIZ.TVP.Golf.Module.NameBarBottomView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:VIZ.TVP.Golf.Module"
xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:domain="clr-namespace:VIZ.TVP.Golf.Domain;assembly=VIZ.TVP.Golf.Domain"
xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
d:Background="White"
d:DataContext="{d:DesignInstance Type=local:NameBarBottomViewModel}"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="1600">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.TVP.Golf.Module.Resource;component/Style/IconButton/IconButton_Default.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
<core:String2ImageSourceConverter x:Key="String2ImageSourceConverter_team" Type="Relative" WorkPath="picture/team"></core:String2ImageSourceConverter>
<core:String2ImageSourceConverter x:Key="String2ImageSourceConverter_player" Type="Relative" WorkPath="picture/player"></core:String2ImageSourceConverter>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="600"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<!-- 版子操作 -->
<Border Grid.Row="0" Grid.ColumnSpan="2" BorderBrush="#44000000" Background="#66b6f2e3" BorderThickness="1" Margin="5" Padding="5">
<StackPanel Orientation="Horizontal">
<fcommon:IconButton Style="{StaticResource IconButton_Default}"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/db_16x16.png"
Content="加载本地数据" Command="{Binding Path=LoadLocalDataCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
IsEnabled="{Binding Path=IsLoadRemoteDataEnabled,Mode=OneWay}"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/refresh_16x16.png"
Content="刷新实时数据" Command="{Binding Path=LoadRemoteDataCommand}"></fcommon:IconButton>
</StackPanel>
</Border>
<!-- 版子信息 -->
<Border Grid.Row="1" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="220"></RowDefinition>
</Grid.RowDefinitions>
<!-- 组信息 -->
<GroupBox Padding="10">
<GroupBox.Header>
<TextBlock Text="组信息" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<local:GroupPickerPanelNoPlayer DataContext="{Binding Path=GroupPickerPanelModel}" Margin="5"></local:GroupPickerPanelNoPlayer>
</GroupBox>
</Grid>
</Border>
<!-- 示意图 -->
<Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="300"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
</Grid.RowDefinitions>
<Image Source="pack://SiteOfOrigin:,,,/images/NameBarBottom.jpg" />
<StackPanel Orientation="Horizontal" Grid.Row="1">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上版子"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子"></fcommon:IconButton>
</StackPanel>
</Grid>
</Border>
</Grid>
</UserControl>
VIZ.TVP.Golf.Module/Package/NameBar/View/NameBarBottomView.xaml.cs
deleted
100644 → 0
View file @
074f0cd9
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
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
VIZ.Framework.Core
;
namespace
VIZ.TVP.Golf.Module
{
/// <summary>
/// NameBarBottomView.xaml 的交互逻辑
/// </summary>
public
partial
class
NameBarBottomView
:
UserControl
{
public
NameBarBottomView
()
{
InitializeComponent
();
WPFHelper
.
BindingViewModel
(
this
,
new
NameBarBottomViewModel
());
}
}
}
VIZ.TVP.Golf.Module/Package/NameBar/View/NameBarView.xaml
deleted
100644 → 0
View file @
074f0cd9
<UserControl x:Class="VIZ.TVP.Golf.Module.NameBarView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:VIZ.TVP.Golf.Module"
xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:domain="clr-namespace:VIZ.TVP.Golf.Domain;assembly=VIZ.TVP.Golf.Domain"
xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
d:Background="White"
d:DataContext="{d:DesignInstance Type=local:NameBarViewModel}"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="1600">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.TVP.Golf.Module.Resource;component/Style/IconButton/IconButton_Default.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
<core:String2ImageSourceConverter x:Key="String2ImageSourceConverter_team" Type="Relative" WorkPath="picture/team"></core:String2ImageSourceConverter>
<core:String2ImageSourceConverter x:Key="String2ImageSourceConverter_player" Type="Relative" WorkPath="picture/player"></core:String2ImageSourceConverter>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="600"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<!-- 版子操作 -->
<Border Grid.Row="0" Grid.ColumnSpan="2" BorderBrush="#44000000" Background="#66b6f2e3" BorderThickness="1" Margin="5" Padding="5">
<StackPanel Orientation="Horizontal">
<fcommon:IconButton Style="{StaticResource IconButton_Default}"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/db_16x16.png"
Content="加载本地数据" Command="{Binding Path=LoadLocalDataCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
IsEnabled="{Binding Path=IsLoadRemoteDataEnabled,Mode=OneWay}"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/refresh_16x16.png"
Content="刷新实时数据" Command="{Binding Path=LoadRemoteDataCommand}"></fcommon:IconButton>
</StackPanel>
</Border>
<!-- 版子信息 -->
<Border Grid.Row="1" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="220"></RowDefinition>
<RowDefinition Height="170"></RowDefinition>
<RowDefinition Height="100"></RowDefinition>
</Grid.RowDefinitions>
<!-- 组信息 -->
<GroupBox Padding="10">
<GroupBox.Header>
<TextBlock Text="组信息" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<local:GroupPickerPanelNoPlayer DataContext="{Binding Path=GroupPickerPanelModel}" Margin="5"></local:GroupPickerPanelNoPlayer>
</GroupBox>
<!-- 洞信息 -->
<GroupBox Grid.Row="1" Padding="10">
<GroupBox.Header>
<TextBlock Text="洞信息" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<local:HolePickerPanelNoPicture DataContext="{Binding Path=HolePickerPanelNoPictureModel}" Grid.Row="1"></local:HolePickerPanelNoPicture>
</GroupBox>
<!-- 其他信息 -->
<GroupBox Grid.Row="2" Padding="10">
<GroupBox.Header>
<TextBlock Text="其他信息" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<local:DetailPanel DataContext="{Binding DetailPanelModel}"></local:DetailPanel>
</GroupBox>
</Grid>
</Border>
<!-- 示意图 -->
<Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="300"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
</Grid.RowDefinitions>
<Image Source="pack://SiteOfOrigin:,,,/images/NameBar1.jpg" />
<StackPanel Orientation="Horizontal" Grid.Row="1">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上版子"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子"></fcommon:IconButton>
</StackPanel>
</Grid>
</Border>
</Grid>
</UserControl>
VIZ.TVP.Golf.Module/Package/NameBar/View/NameBarView.xaml.cs
deleted
100644 → 0
View file @
074f0cd9
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
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
VIZ.Framework.Core
;
namespace
VIZ.TVP.Golf.Module
{
/// <summary>
/// NameBarView.xaml 的交互逻辑
/// </summary>
public
partial
class
NameBarView
:
UserControl
{
public
NameBarView
()
{
InitializeComponent
();
WPFHelper
.
BindingViewModel
(
this
,
new
NameBarViewModel
());
}
}
}
VIZ.TVP.Golf.Module/Package/NameBar/ViewModel/NameBarBottomViewModel.cs
deleted
100644 → 0
View file @
074f0cd9
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows
;
using
VIZ.Framework.Core
;
using
VIZ.TVP.Golf.Domain
;
namespace
VIZ.TVP.Golf.Module
{
/// <summary>
/// 底部名条视图模型
/// </summary>
public
class
NameBarBottomViewModel
:
PackageViewModelBase
{
// ===================================================================================
// Property
// ===================================================================================
#
region
GroupPickerPanelModel
--
分组选择模型
private
GroupPickerPanelModel
groupPickerPanelModel
=
new
GroupPickerPanelModel
();
/// <summary>
/// 分组选择模型
/// </summary>
public
GroupPickerPanelModel
GroupPickerPanelModel
{
get
{
return
groupPickerPanelModel
;
}
set
{
groupPickerPanelModel
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
GroupPickerPanelModel
));
}
}
#
endregion
// ===================================================================================
// Command
// ===================================================================================
#
region
SendCommand
--
发送命令
/// <summary>
/// 执行发送命令
/// </summary>
protected
override
void
Send
()
{
}
#
endregion
#
region
LoadLocalDataCommand
--
加载本地数据命令
/// <summary>
/// 加载本地数据
/// </summary>
protected
override
void
LoadLocalData
()
{
RealDataWindow
window
=
new
RealDataWindow
();
window
.
ShowDialog
();
RealDataViewModel
vm
=
window
.
realDataView
.
DataContext
as
RealDataViewModel
;
if
(
vm
==
null
)
return
;
if
(!
vm
.
IsEnter
)
return
;
List
<
PlayerRealModel
>
list
=
this
.
realDataService
.
LoadPlayerRealModelFormLocal
(
vm
.
SelectedFile
.
FileName
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel
?.
Player1
,
list
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel
?.
Player2
,
list
);
}
#
endregion
#
region
LoadRemoteDataCommand
--
加载远程数据命令
/// <summary>
/// 加载远程数据
/// </summary>
protected
override
void
LoadRemoteData
()
{
Task
.
Run
(()
=>
{
string
fileName
=
this
.
realDataService
.
DownLoadData
(
INTERFACE_TOURNAMENT
);
if
(
string
.
IsNullOrWhiteSpace
(
fileName
))
{
MessageBox
.
Show
(
"加载远程数据失败!"
);
return
;
}
WPFHelper
.
BeginInvoke
(()
=>
{
List
<
PlayerRealModel
>
list
=
this
.
realDataService
.
LoadPlayerRealModelFormLocal
(
fileName
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel
?.
Player1
,
list
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel
?.
Player2
,
list
);
});
});
}
#
endregion
}
}
\ No newline at end of file
VIZ.TVP.Golf.Module/Package/NameBar/ViewModel/NameBarViewModel.cs
deleted
100644 → 0
View file @
074f0cd9
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows
;
using
VIZ.Framework.Core
;
using
VIZ.TVP.Golf.Domain
;
using
VIZ.TVP.Golf.Service
;
namespace
VIZ.TVP.Golf.Module
{
/// <summary>
/// 包装视图模型 -- 人名条
/// </summary>
public
class
NameBarViewModel
:
PackageViewModelBase
{
public
NameBarViewModel
()
{
}
// ===================================================================================
// Property
// ===================================================================================
#
region
GroupPickerPanelModel
--
分组选择模型
private
GroupPickerPanelModel
groupPickerPanelModel
=
new
GroupPickerPanelModel
();
/// <summary>
/// 分组选择模型
/// </summary>
public
GroupPickerPanelModel
GroupPickerPanelModel
{
get
{
return
groupPickerPanelModel
;
}
set
{
groupPickerPanelModel
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
GroupPickerPanelModel
));
}
}
#
endregion
#
region
HolePickerPanelNoPictureModel
--
洞选择模型
private
HolePickerPanelNoPictureModel
holePickerPanelNoPictureModel
=
new
HolePickerPanelNoPictureModel
();
/// <summary>
/// 洞选择模型
/// </summary>
public
HolePickerPanelNoPictureModel
HolePickerPanelNoPictureModel
{
get
{
return
holePickerPanelNoPictureModel
;
}
set
{
holePickerPanelNoPictureModel
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
HolePickerPanelNoPictureModel
));
}
}
#
endregion
#
region
DetailPanelModel
--
描述面板模型
private
DetailPanelModel
detailPanelModel
=
new
DetailPanelModel
();
/// <summary>
/// 描述面板模型
/// </summary>
public
DetailPanelModel
DetailPanelModel
{
get
{
return
detailPanelModel
;
}
set
{
detailPanelModel
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
DetailPanelModel
));
}
}
#
endregion
// ===================================================================================
// Command
// ===================================================================================
#
region
SendCommand
--
发送命令
/// <summary>
/// 执行发送命令
/// </summary>
protected
override
void
Send
()
{
}
#
endregion
#
region
LoadLocalDataCommand
--
加载本地数据命令
/// <summary>
/// 加载本地数据
/// </summary>
protected
override
void
LoadLocalData
()
{
RealDataWindow
window
=
new
RealDataWindow
();
window
.
ShowDialog
();
RealDataViewModel
vm
=
window
.
realDataView
.
DataContext
as
RealDataViewModel
;
if
(
vm
==
null
)
return
;
if
(!
vm
.
IsEnter
)
return
;
List
<
PlayerRealModel
>
list
=
this
.
realDataService
.
LoadPlayerRealModelFormLocal
(
vm
.
SelectedFile
.
FileName
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel
?.
Player1
,
list
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel
?.
Player2
,
list
);
}
#
endregion
#
region
LoadRemoteDataCommand
--
加载远程数据命令
/// <summary>
/// 加载远程数据
/// </summary>
protected
override
void
LoadRemoteData
()
{
Task
.
Run
(()
=>
{
string
fileName
=
this
.
realDataService
.
DownLoadData
(
INTERFACE_TOURNAMENT
);
if
(
string
.
IsNullOrWhiteSpace
(
fileName
))
{
MessageBox
.
Show
(
"加载远程数据失败!"
);
return
;
}
WPFHelper
.
BeginInvoke
(()
=>
{
List
<
PlayerRealModel
>
list
=
this
.
realDataService
.
LoadPlayerRealModelFormLocal
(
fileName
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel
?.
Player1
,
list
);
this
.
UpdatePlayerTempModel
(
this
.
GroupPickerPanelModel
?.
Player2
,
list
);
});
});
}
#
endregion
}
}
VIZ.TVP.Golf.Module/Package/PackageViewModelBase.cs
View file @
f84f786d
...
...
@@ -137,18 +137,32 @@ namespace VIZ.TVP.Golf.Module
/// 更新球员临时数据
/// </summary>
/// <param name="tempModel">临时模型</param>
/// <param name="round">轮次</param>
/// <param name="realModels">实时模型集合</param>
protected
void
UpdatePlayerTempModel
(
PlayerTempModel
tempModel
,
List
<
PlayerRealModel
>
realModels
)
protected
void
UpdatePlayerTempModel
(
PlayerTempModel
tempModel
,
int
round
,
List
<
PlayerRealModel
>
realModels
)
{
if
(
tempModel
==
null
||
realModels
==
null
||
tempModel
.
PlayerID
<=
0
||
realModels
.
Count
==
0
)
return
;
PlayerRealModel
realModel
=
realModels
.
FirstOrDefault
(
p
=>
p
.
PlayerID
==
tempModel
.
PlayerID
);
if
(
realModel
==
null
)
return
;
if
(
realModel
!=
null
)
{
tempModel
.
Strokes
=
realModel
.
Strokes
;
RoundRealModel
roundModel
=
realModel
.
Rounds
.
FirstOrDefault
(
p
=>
p
.
No
==
round
);
if
(
roundModel
==
null
)
return
;
tempModel
.
Score
=
roundModel
.
Today
;
}
/// <summary>
/// 获取得分字符串
/// </summary>
/// <param name="score">得分</param>
/// <returns>得分字符串</returns>
protected
string
GetScoreString
(
int
score
)
{
return
score
==
0
?
"E"
:
(
score
>
0
?
$"+
{
score
}
"
:
$"-
{
score
}
"
);
}
}
}
VIZ.TVP.Golf.Module/Package/TeamRanking/AfterMatchTeamRanking/View/AfterMatchTeamRankingView.xaml
View file @
f84f786d
...
...
@@ -47,28 +47,8 @@
<Border Grid.Row="1" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<!-- 轮次信息 -->
<GroupBox Padding="10">
<GroupBox.Header>
<TextBlock Text="轮次信息" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Text="轮次:" VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="1"></TextBlock>
<StackPanel Grid.Column="1" Margin="10,0,10,0" HorizontalAlignment="Left" Orientation="Horizontal">
<ComboBox Height="30" Width="220" VerticalContentAlignment="Center"
SelectedValue="{Binding Path=SelectedRound,Mode=TwoWay}"
ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.Rounds}}"></ComboBox>
</StackPanel>
</Grid>
</GroupBox>
<!-- 排名 -->
<GroupBox Padding="10" Grid.Row="1">
...
...
@@ -86,8 +66,8 @@
ItemsSource="{Binding Path=TeamTempModels}">
<DataGrid.Columns>
<DataGridTextColumn Header="排名" Width="100" Binding="{Binding Path=Position}" IsReadOnly="True"></DataGridTextColumn>
<DataGridTextColumn Header="队伍名称" Width="
1
00" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="
总杆数" Width="100" Binding="{Binding Path=TotalStrokes
}"></DataGridTextColumn>
<DataGridTextColumn Header="队伍名称" Width="
2
00" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="
得分" Width="100" Binding="{Binding Path=TotalScore
}"></DataGridTextColumn>
<DataGridComboBoxColumn x:Name="c1" Header="Logo" Width="240"
ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.TeamLogos}}"
SelectedValueBinding="{Binding Path=Logo}"></DataGridComboBoxColumn>
...
...
VIZ.TVP.Golf.Module/Package/TeamRanking/AfterMatchTeamRanking/ViewModel/AfterMatchTeamRankingViewModel.cs
View file @
f84f786d
...
...
@@ -34,5 +34,31 @@ namespace VIZ.TVP.Golf.Module
// Private Function
// ===================================================================================
/// <summary>
/// 更新队伍临时模型
/// </summary>
/// <param name="list">球员真实模型</param>
protected
override
void
UpdateTeamTempModels
(
List
<
PlayerRealModel
>
list
)
{
List
<
TeamTempModel
>
teamTempModels
=
new
List
<
TeamTempModel
>();
foreach
(
TeamInfoModel
info_model
in
ApplicationDomainEx
.
TeamInfos
)
{
TeamTempModel
temp_model
=
new
TeamTempModel
();
temp_model
.
FromInfoModel
(
info_model
);
var
real_players
=
list
.
Where
(
p
=>
p
.
TeamInfoModel
!=
null
&&
p
.
TeamInfoModel
.
TeamID
==
temp_model
.
TeamID
).
ToList
();
int
total
=
real_players
.
Sum
(
p
=>
p
.
Score
);
temp_model
.
TotalScore
=
this
.
GetScoreString
(
total
);
teamTempModels
.
Add
(
temp_model
);
}
// 赛后比较所有的轮次
TeamTempModelComparer
comparer
=
new
TeamTempModelComparer
(
list
);
teamTempModels
.
Sort
(
comparer
);
this
.
TeamTempModels
=
teamTempModels
.
ToObservableCollection
();
}
}
}
VIZ.TVP.Golf.Module/Package/TeamRanking/BeforeMatchTeamRanking/View/BeforeMatchTeamRankingView.xaml
View file @
f84f786d
...
...
@@ -47,29 +47,8 @@
<Border Grid.Row="1" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<!-- 轮次信息 -->
<GroupBox Padding="10">
<GroupBox.Header>
<TextBlock Text="轮次信息" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Text="轮次:" VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="1"></TextBlock>
<StackPanel Grid.Column="1" Margin="10,0,10,0" HorizontalAlignment="Left" Orientation="Horizontal">
<ComboBox Height="30" Width="220" VerticalContentAlignment="Center"
SelectedValue="{Binding Path=SelectedRound,Mode=TwoWay}"
ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.Rounds}}"></ComboBox>
</StackPanel>
</Grid>
</GroupBox>
<!-- 排名 -->
<GroupBox Padding="10" Grid.Row="1">
<GroupBox.Header>
...
...
@@ -86,8 +65,8 @@
ItemsSource="{Binding Path=TeamTempModels}">
<DataGrid.Columns>
<DataGridTextColumn Header="排名" Width="100" Binding="{Binding Path=Position}" IsReadOnly="True"></DataGridTextColumn>
<DataGridTextColumn Header="队伍名称" Width="
1
00" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="
总杆数" Width="100" Binding="{Binding Path=TotalStrokes
}"></DataGridTextColumn>
<DataGridTextColumn Header="队伍名称" Width="
2
00" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="
得分" Width="100" Binding="{Binding Path=TotalScore
}"></DataGridTextColumn>
<DataGridComboBoxColumn x:Name="c1" Header="Logo" Width="240"
ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.TeamLogos}}"
SelectedValueBinding="{Binding Path=Logo}"></DataGridComboBoxColumn>
...
...
VIZ.TVP.Golf.Module/Package/TeamRanking/BeforeMatchTeamRanking/ViewModel/BeforeMatchTeamRankingViewModel.cs
View file @
f84f786d
...
...
@@ -34,5 +34,40 @@ namespace VIZ.TVP.Golf.Module
// Private Function
// ===================================================================================
/// <summary>
/// 更新队伍临时模型
/// </summary>
/// <param name="list">球员真实模型</param>
protected
override
void
UpdateTeamTempModels
(
List
<
PlayerRealModel
>
list
)
{
List
<
TeamTempModel
>
teamTempModels
=
new
List
<
TeamTempModel
>();
foreach
(
TeamInfoModel
info_model
in
ApplicationDomainEx
.
TeamInfos
)
{
TeamTempModel
temp_model
=
new
TeamTempModel
();
temp_model
.
FromInfoModel
(
info_model
);
var
real_players
=
list
.
Where
(
p
=>
p
.
TeamInfoModel
!=
null
&&
p
.
TeamInfoModel
.
TeamID
==
temp_model
.
TeamID
).
ToList
();
int
total
=
0
;
foreach
(
PlayerRealModel
real_player
in
real_players
)
{
RoundRealModel
real_round
=
real_player
.
Rounds
.
FirstOrDefault
(
p
=>
p
.
No
==
1
);
if
(
real_round
==
null
)
continue
;
total
+=
real_round
.
Today
;
}
temp_model
.
TotalScore
=
this
.
GetScoreString
(
total
);
teamTempModels
.
Add
(
temp_model
);
}
// 赛前比较第一轮
TeamTempModelComparer
comparer
=
new
TeamTempModelComparer
(
list
,
1
);
teamTempModels
.
Sort
(
comparer
);
this
.
TeamTempModels
=
teamTempModels
.
ToObservableCollection
();
}
}
}
VIZ.TVP.Golf.Module/Package/TeamRanking/LongTeamRanking/View/LongTeamRankingView.xaml
View file @
f84f786d
...
...
@@ -86,9 +86,9 @@
ItemsSource="{Binding Path=TeamTempModels}">
<DataGrid.Columns>
<DataGridTextColumn Header="排名" Width="100" Binding="{Binding Path=Position}" IsReadOnly="True"></DataGridTextColumn>
<DataGridTextColumn Header="队伍名称" Width="
1
00" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="
总杆数" Width="100" Binding="{Binding Path=TotalStrokes
}"></DataGridTextColumn>
<DataGridComboBoxColumn
x:Name="c1"
Header="Logo" Width="240"
<DataGridTextColumn Header="队伍名称" Width="
2
00" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="
得分" Width="100" Binding="{Binding Path=TotalScore
}"></DataGridTextColumn>
<DataGridComboBoxColumn Header="Logo" Width="240"
ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.TeamLogos}}"
SelectedValueBinding="{Binding Path=Logo}"></DataGridComboBoxColumn>
</DataGrid.Columns>
...
...
VIZ.TVP.Golf.Module/Package/TeamRanking/ShortTeamRanking/View/ShortTeamRankingView.xaml
View file @
f84f786d
...
...
@@ -86,8 +86,8 @@
ItemsSource="{Binding Path=TeamTempModels}">
<DataGrid.Columns>
<DataGridTextColumn Header="排名" Width="100" Binding="{Binding Path=Position}" IsReadOnly="True"></DataGridTextColumn>
<DataGridTextColumn Header="队伍名称" Width="
1
00" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="
总杆数" Width="100" Binding="{Binding Path=TotalStrokes
}"></DataGridTextColumn>
<DataGridTextColumn Header="队伍名称" Width="
2
00" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="
得分" Width="100" Binding="{Binding Path=TotalScore
}"></DataGridTextColumn>
<DataGridComboBoxColumn x:Name="c1" Header="Logo" Width="240"
ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.TeamLogos}}"
SelectedValueBinding="{Binding Path=Logo}"></DataGridComboBoxColumn>
...
...
VIZ.TVP.Golf.Module/Package/TeamRanking/ShortTeamRanking/ViewModel/ShortTeamRankingViewModel.cs
View file @
f84f786d
...
...
@@ -34,13 +34,12 @@ namespace VIZ.TVP.Golf.Module
// ===================================================================================
/// <summary>
/// 更新
组
临时模型
/// 更新
队伍
临时模型
/// </summary>
/// <param name="list">球员真实模型</param>
protected
void
UpdateGroup
TempModels
(
List
<
PlayerRealModel
>
list
)
protected
override
void
UpdateTeam
TempModels
(
List
<
PlayerRealModel
>
list
)
{
ObservableCollection
<
TeamTempModel
>
teamTempModels
=
new
ObservableCollection
<
TeamTempModel
>();
List
<
TeamTempModel
>
temp_list
=
new
List
<
TeamTempModel
>();
List
<
TeamTempModel
>
teamTempModels
=
new
List
<
TeamTempModel
>();
foreach
(
TeamInfoModel
info_model
in
ApplicationDomainEx
.
TeamInfos
)
{
...
...
@@ -49,17 +48,24 @@ namespace VIZ.TVP.Golf.Module
var
real_players
=
list
.
Where
(
p
=>
p
.
TeamInfoModel
!=
null
&&
p
.
TeamInfoModel
.
TeamID
==
temp_model
.
TeamID
).
ToList
();
temp_model
.
TotalStrokes
=
real_players
.
Sum
(
p
=>
p
.
Strokes
).
ToString
();
temp_list
.
Add
(
temp_model
);
int
total
=
0
;
foreach
(
PlayerRealModel
real_player
in
real_players
)
{
RoundRealModel
real_round
=
real_player
.
Rounds
.
FirstOrDefault
(
p
=>
p
.
No
==
this
.
SelectedRound
);
if
(
real_round
==
null
)
continue
;
total
+=
real_round
.
Today
;
}
temp_list
=
temp_list
.
Take
(
5
).
ToList
();
foreach
(
TeamTempModel
temp
in
temp_list
)
{
teamTempModels
.
Add
(
temp
);
temp_model
.
TotalScore
=
this
.
GetScoreString
(
total
);
teamTempModels
.
Add
(
temp_model
);
}
this
.
TeamTempModels
=
teamTempModels
;
TeamTempModelComparer
comparer
=
new
TeamTempModelComparer
(
list
,
this
.
SelectedRound
);
teamTempModels
.
Sort
(
comparer
);
this
.
TeamTempModels
=
teamTempModels
.
Take
(
5
).
ToObservableCollection
();
}
}
}
VIZ.TVP.Golf.Module/Package/TeamRanking/TeamRankingViewModelBase.cs
View file @
f84f786d
using
System
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Collections.ObjectModel
;
using
System.Linq
;
...
...
@@ -127,7 +128,7 @@ namespace VIZ.TVP.Golf.Module
/// <param name="list">球员真实模型</param>
protected
virtual
void
UpdateTeamTempModels
(
List
<
PlayerRealModel
>
list
)
{
ObservableCollection
<
TeamTempModel
>
teamTempModels
=
new
ObservableCollection
<
TeamTempModel
>();
List
<
TeamTempModel
>
teamTempModels
=
new
List
<
TeamTempModel
>();
foreach
(
TeamInfoModel
info_model
in
ApplicationDomainEx
.
TeamInfos
)
{
...
...
@@ -136,11 +137,24 @@ namespace VIZ.TVP.Golf.Module
var
real_players
=
list
.
Where
(
p
=>
p
.
TeamInfoModel
!=
null
&&
p
.
TeamInfoModel
.
TeamID
==
temp_model
.
TeamID
).
ToList
();
temp_model
.
TotalStrokes
=
real_players
.
Sum
(
p
=>
p
.
Strokes
).
ToString
();
int
total
=
0
;
foreach
(
PlayerRealModel
real_player
in
real_players
)
{
RoundRealModel
real_round
=
real_player
.
Rounds
.
FirstOrDefault
(
p
=>
p
.
No
==
this
.
SelectedRound
);
if
(
real_round
==
null
)
continue
;
total
+=
real_round
.
Today
;
}
temp_model
.
TotalScore
=
this
.
GetScoreString
(
total
);
teamTempModels
.
Add
(
temp_model
);
}
this
.
TeamTempModels
=
teamTempModels
;
TeamTempModelComparer
comparer
=
new
TeamTempModelComparer
(
list
,
this
.
SelectedRound
);
teamTempModels
.
Sort
(
comparer
);
this
.
TeamTempModels
=
teamTempModels
.
ToObservableCollection
();
}
}
}
\ No newline at end of file
VIZ.TVP.Golf.Module/VIZ.TVP.Golf.Module.csproj
View file @
f84f786d
...
...
@@ -137,18 +137,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Package\NameBar\View\NameBarBottomView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Widgets\Detail\DetailPanel.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Package\NameBar\View\NameBarView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Widgets\Group\GroupPickerPanelNoPlayer.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
...
...
@@ -264,18 +256,10 @@
<Compile Include="Package\TeamInfo\View\TeamInfoView.xaml.cs">
<DependentUpon>TeamInfoView.xaml</DependentUpon>
</Compile>
<Compile Include="Package\NameBar\ViewModel\NameBarBottomViewModel.cs" />
<Compile Include="Package\NameBar\View\NameBarBottomView.xaml.cs">
<DependentUpon>NameBarBottomView.xaml</DependentUpon>
</Compile>
<Compile Include="Package\TeamRanking\TeamRankingViewModelBase.cs" />
<Compile Include="Widgets\Detail\DetailPanel.xaml.cs">
<DependentUpon>DetailPanel.xaml</DependentUpon>
</Compile>
<Compile Include="Package\NameBar\ViewModel\NameBarViewModel.cs" />
<Compile Include="Package\NameBar\View\NameBarView.xaml.cs">
<DependentUpon>NameBarView.xaml</DependentUpon>
</Compile>
<Compile Include="Setup\Provider\Setup\AppSetup_ClearLocalData.cs" />
<Compile Include="Widgets\Detail\DetailPanelModel.cs" />
<Compile Include="Widgets\Group\GroupPickerPanelNoPlayer.xaml.cs">
...
...
VIZ.TVP.Golf.Module/Widgets/Group/GroupPickerPanel.xaml
View file @
f84f786d
...
...
@@ -11,7 +11,7 @@
d:Background="White"
d:DataContext="{d:DesignInstance Type=local:GroupPickerPanelModel}"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="
7
00">
d:DesignHeight="300" d:DesignWidth="
10
00">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
...
...
@@ -80,13 +80,13 @@
Margin="0,0,5,0"></TextBlock>
<TextBox Grid.Row="0" Grid.Column="1" Height="30" AcceptsReturn="False" TextWrapping="NoWrap" Padding="3"
Text="{Binding Player1.Name,Mode=TwoWay}" VerticalContentAlignment="Center"></TextBox>
<!--
杆数
-->
<!--
得分
-->
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="1" Grid.Column="0" Margin="0,0,5,0" Orientation="Horizontal">
<Image Width="16" Height="16" Source="/VIZ.TVP.Golf.Module.Resource;component/Icons/refresh_16x16.png" Margin="0,0,5,0"></Image>
<TextBlock Text="
杆数
:" ></TextBlock>
<TextBlock Text="
得分
:" ></TextBlock>
</StackPanel>
<TextBox Grid.Row="1" Grid.Column="1" Height="30" AcceptsReturn="False" TextWrapping="NoWrap" Padding="3"
Text="{Binding Player1.S
trokes
,Mode=TwoWay}" VerticalContentAlignment="Center"></TextBox>
Text="{Binding Player1.S
core
,Mode=TwoWay}" VerticalContentAlignment="Center"></TextBox>
<!-- 照片 -->
<TextBlock Text="照片:" VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="2" Grid.Column="0"
Margin="0,0,5,0"></TextBlock>
...
...
@@ -117,13 +117,13 @@
Margin="0,0,5,0"></TextBlock>
<TextBox Grid.Row="0" Grid.Column="1" Height="30" AcceptsReturn="False" TextWrapping="NoWrap" Padding="3"
Text="{Binding Player2.Name,Mode=TwoWay}" VerticalContentAlignment="Center"></TextBox>
<!--
杆数
-->
<!--
得分
-->
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="1" Grid.Column="0" Margin="0,0,5,0" Orientation="Horizontal">
<Image Width="16" Height="16" Source="/VIZ.TVP.Golf.Module.Resource;component/Icons/refresh_16x16.png" Margin="0,0,5,0"></Image>
<TextBlock Text="
杆数
:" ></TextBlock>
<TextBlock Text="
得分
:" ></TextBlock>
</StackPanel>
<TextBox Grid.Row="1" Grid.Column="1" Height="30" AcceptsReturn="False" TextWrapping="NoWrap" Padding="3"
Text="{Binding Player2.S
trokes
,Mode=TwoWay}" VerticalContentAlignment="Center"></TextBox>
Text="{Binding Player2.S
core
,Mode=TwoWay}" VerticalContentAlignment="Center"></TextBox>
<!-- 照片 -->
<TextBlock Text="照片:" VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="2" Grid.Column="0"
Margin="0,0,5,0"></TextBlock>
...
...
VIZ.TVP.Golf.Module/Widgets/Group/GroupPickerPanelModel.cs
View file @
f84f786d
...
...
@@ -119,16 +119,16 @@ namespace VIZ.TVP.Golf.Module
#
endregion
#
region
PlayersS
trokes
--
组成员杆数
#
region
PlayersS
core
--
组成员得分
private
string
playersS
trokes
;
private
string
playersS
core
;
/// <summary>
/// 组成员
杆数
/// 组成员
得分
/// </summary>
public
string
PlayersS
trokes
public
string
PlayersS
core
{
get
{
return
playersS
trokes
;
}
set
{
playersS
trokes
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
PlayersStrokes
));
}
get
{
return
playersS
core
;
}
set
{
playersS
core
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
PlayersScore
));
}
}
#
endregion
...
...
@@ -213,25 +213,21 @@ namespace VIZ.TVP.Golf.Module
this
.
Player1
.
PlayerID
=
0
;
this
.
Player1
.
Name
=
null
;
this
.
Player1
.
HalfPicture
=
null
;
this
.
Player1
.
S
trokes
=
0
;
this
.
Player1
.
S
core
=
0
;
this
.
Player2
.
PlayerID
=
0
;
this
.
Player2
.
Name
=
null
;
this
.
Player2
.
HalfPicture
=
null
;
this
.
Player2
.
S
trokes
=
0
;
this
.
Player2
.
S
core
=
0
;
this
.
PlayersDisplayName
=
null
;
this
.
PlayersS
trokes
=
null
;
this
.
PlayersS
core
=
null
;
}
// ===================================================================================
// Private Action
// ===================================================================================
/// <summary>
/// 更新球员集合属性
/// </summary>
p
rivate
void
UpdatePlayersProperty
()
p
ublic
void
UpdatePlayersProperty
()
{
// 组成员
StringBuilder
sb
=
new
StringBuilder
();
...
...
@@ -250,8 +246,8 @@ namespace VIZ.TVP.Golf.Module
this
.
PlayersDisplayName
=
sb
.
ToString
();
// 总杆数
int
strokes
=
this
.
Player1
?.
S
trokes
??
0
+
this
.
Player2
?.
Strokes
??
0
;
this
.
PlayersS
trokes
=
strokes
==
0
?
"E"
:
strokes
>
0
?
$"+
{
strokes
}
"
:
$"-
{
strokes
}
"
;
int
strokes
=
this
.
Player1
?.
S
core
??
0
+
this
.
Player2
?.
Score
??
0
;
this
.
PlayersS
core
=
strokes
==
0
?
"E"
:
strokes
>
0
?
$"+
{
strokes
}
"
:
$"-
{
strokes
}
"
;
}
}
}
VIZ.TVP.Golf.Module/Widgets/Group/GroupPickerPanelNoPlayer.xaml
View file @
f84f786d
...
...
@@ -42,13 +42,13 @@
<TextBlock Text="成员:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,5,0" Grid.Row="1"></TextBlock>
<TextBox Grid.Row="1" Grid.Column="1" Height="30" Margin="5,0,18,0" VerticalContentAlignment="Center"
Text="{Binding Path=PlayersDisplayName,Mode=TwoWay}" Padding="3"></TextBox>
<!--
杆数
-->
<!--
得分
-->
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="2" Grid.Column="0" Margin="0,0,5,0" Orientation="Horizontal">
<Image Width="16" Height="16" Source="/VIZ.TVP.Golf.Module.Resource;component/Icons/refresh_16x16.png" Margin="0,0,5,0"></Image>
<TextBlock Text="
杆数
:" ></TextBlock>
<TextBlock Text="
得分
:" ></TextBlock>
</StackPanel>
<TextBox Grid.Row="2" Grid.Column="1" Height="30" Margin="5,0,18,0" VerticalContentAlignment="Center"
Text="{Binding Path=PlayersS
trokes
,Mode=TwoWay}" Padding="3"></TextBox>
Text="{Binding Path=PlayersS
core
,Mode=TwoWay}" Padding="3"></TextBox>
<!-- 球队Logo -->
<TextBlock Text="球队Logo:" VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="3"></TextBlock>
<ComboBox Height="30" Margin="5,0,18,0" VerticalContentAlignment="Center" Grid.Row="3" Grid.Column="1"
...
...
VIZ.TVP.Golf.sln
View file @
f84f786d
...
...
@@ -6,6 +6,7 @@ MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "00-Doc", "00-Doc", "{CAE00ECF-BA01-4461-AE78-617D2977BEA0}"
ProjectSection(SolutionItems) = preProject
高尔夫球数据获取api.xml = 高尔夫球数据获取api.xml
高尔夫球数据获取_test.xml = 高尔夫球数据获取_test.xml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "05-Lib", "05-Lib", "{5EC530D3-BA38-4C9A-AD51-4F458373A455}"
...
...
高尔夫球数据获取_test.xml
0 → 100644
View file @
f84f786d
<tournament
cn-name=
"2021第二十二届中国商学院高尔夫联盟“联盟杯”总决赛A组"
en-name=
"2021第二十二届中国商学院高尔夫联盟“联盟杯”总决赛A组"
cn-course=
"海口观澜湖高尔夫球会 -黑石球场"
en-course=
""
begindate=
"2021-11-12"
enddate=
"2021-11-13"
status=
"finished"
current-round=
"2"
maxRound=
"2"
>
<tournament
cn-name=
"2021第二十二届中国商学院高尔夫联盟“联盟杯”总决赛A组"
en-name=
"2021第二十二届中国商学院高尔夫联盟“联盟杯”总决赛A组"
cn-course=
"海口观澜湖高尔夫球会 -黑石球场"
en-course=
""
begindate=
"2021-11-12"
enddate=
"2021-11-13"
status=
"finished"
current-round=
"2"
maxRound=
"2"
>
<players>
<player
id=
"1"
pl_tvlname=
"钟大伟"
pl_tvsname=
"钟大伟"
pl_sex=
"1"
firstname=
""
lastname=
""
en-name=
""
cn-name=
"钟大伟"
country=
"CHN"
pro-am=
"PRO"
status=
"competing"
position=
"1"
score=
"1"
strokes=
"147"
>
<round
no=
"1"
matchnumber=
"21"
matchnumberindex=
"3"
teetime=
"00:01"
startingtee=
"10"
thru=
"18"
today=
"-2"
total=
"71"
round-status=
"finished"
player-status=
"competing"
>
<score
hole=
"1"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"2"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"3"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"4"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"5"
strokes=
"2"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"6"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"7"
strokes=
"3"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"8"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"9"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"10"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"11"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"12"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"13"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"14"
strokes=
"5"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"15"
strokes=
"4"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"16"
strokes=
"3"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"17"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"18"
strokes=
"4"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
</round>
<round
no=
"2"
matchnumber=
"14"
matchnumberindex=
"1"
teetime=
"00:00"
startingtee=
"1"
thru=
"18"
today=
"3"
total=
"76"
round-status=
"finished"
player-status=
"competing"
>
<score
hole=
"1"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"2"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"3"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"4"
strokes=
"6"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"5"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"6"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"7"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"8"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"9"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"10"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"11"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"12"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"13"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"14"
strokes=
"5"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"15"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"16"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"17"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"18"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
</round>
</player>
<player
id=
"2"
pl_tvlname=
"杜亮"
pl_tvsname=
"杜亮"
pl_sex=
"1"
firstname=
""
lastname=
""
en-name=
""
cn-name=
"杜亮"
country=
"CHN"
pro-am=
"PRO"
status=
"competing"
position=
"2"
score=
"5"
strokes=
"151"
>
<round
no=
"1"
matchnumber=
"20"
matchnumberindex=
"3"
teetime=
"00:00"
startingtee=
"10"
thru=
"18"
today=
"2"
total=
"75"
round-status=
"finished"
player-status=
"competing"
>
<score
hole=
"1"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"2"
strokes=
"4"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"3"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"4"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"5"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"6"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"7"
strokes=
"5"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"8"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"9"
strokes=
"5"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"10"
strokes=
"5"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"11"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"12"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"13"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"14"
strokes=
"5"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"15"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"16"
strokes=
"3"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"17"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"18"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
</round>
<round
no=
"2"
matchnumber=
"14"
matchnumberindex=
"2"
teetime=
"00:00"
startingtee=
"1"
thru=
"18"
today=
"3"
total=
"76"
round-status=
"finished"
player-status=
"competing"
>
<score
hole=
"1"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"2"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"3"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"4"
strokes=
"6"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"5"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"6"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"7"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"8"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"9"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"10"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"11"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"12"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"13"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"14"
strokes=
"5"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"15"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"16"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"17"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"18"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
</round>
</player>
<player
id=
"17"
pl_tvlname=
"王义"
pl_tvsname=
"王义"
pl_sex=
"1"
firstname=
""
lastname=
""
en-name=
""
cn-name=
"王义"
country=
"CHN"
pro-am=
"PRO"
status=
"competing"
position=
"T3"
score=
"6"
strokes=
"152"
>
<round
no=
"1"
matchnumber=
"21"
matchnumberindex=
"1"
teetime=
"00:00"
startingtee=
"10"
thru=
"18"
today=
"0"
total=
"73"
round-status=
"finished"
player-status=
"competing"
>
<score
hole=
"1"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"2"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"3"
strokes=
"3"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"4"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"5"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"6"
strokes=
"4"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"7"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"8"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"9"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"10"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"11"
strokes=
"4"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"12"
strokes=
"6"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"13"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"14"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"15"
strokes=
"4"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"16"
strokes=
"3"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"17"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"18"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
</round>
<round
no=
"2"
matchnumber=
"20"
matchnumberindex=
"3"
teetime=
"00:00"
startingtee=
"10"
thru=
"18"
today=
"6"
total=
"79"
round-status=
"finished"
player-status=
"competing"
>
<score
hole=
"1"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"2"
strokes=
"6"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"3"
strokes=
"6"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"4"
strokes=
"5"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"5"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"6"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"7"
strokes=
"5"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"8"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"9"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"10"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"11"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"12"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"13"
strokes=
"6"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"14"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"15"
strokes=
"2"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"16"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"17"
strokes=
"5"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"18"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
</round>
</player>
<player
id=
"18"
pl_tvlname=
"郭立新"
pl_tvsname=
"郭立新"
pl_sex=
"1"
firstname=
""
lastname=
""
en-name=
""
cn-name=
"郭立新"
country=
"CHN"
pro-am=
"PRO"
status=
"competing"
position=
"T3"
score=
"6"
strokes=
"152"
>
<round
no=
"1"
matchnumber=
"21"
matchnumberindex=
"1"
teetime=
"00:00"
startingtee=
"10"
thru=
"18"
today=
"0"
total=
"73"
round-status=
"finished"
player-status=
"competing"
>
<score
hole=
"1"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"2"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"3"
strokes=
"3"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"4"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"5"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"6"
strokes=
"4"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"7"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"8"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"9"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"10"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"11"
strokes=
"4"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"12"
strokes=
"6"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"13"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"14"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"15"
strokes=
"4"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"16"
strokes=
"3"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"17"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"18"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
</round>
<round
no=
"2"
matchnumber=
"20"
matchnumberindex=
"3"
teetime=
"00:00"
startingtee=
"10"
thru=
"18"
today=
"6"
total=
"79"
round-status=
"finished"
player-status=
"competing"
>
<score
hole=
"1"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"2"
strokes=
"6"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"3"
strokes=
"6"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"4"
strokes=
"5"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"5"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"6"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"7"
strokes=
"5"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"8"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"9"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"10"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"11"
strokes=
"3"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"12"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"13"
strokes=
"6"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"14"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"15"
strokes=
"2"
par=
"3"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"16"
strokes=
"4"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"17"
strokes=
"5"
par=
"4"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
<score
hole=
"18"
strokes=
"5"
par=
"5"
bunkers=
""
putts=
""
drive=
""
fairway=
""
/>
</round>
</player>
</players>
</tournament>
\ No newline at end of file
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