Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.TVP.CBA
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.CBA
Commits
5ab0a699
Commit
5ab0a699
authored
Feb 21, 2023
by
wangonghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加MVP板子的数据模板和插件
parent
34889442
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
2714 additions
and
1 deletions
+2714
-1
VIZ.MIGU.CBA.Module/Common/Utils.cs
+114
-0
VIZ.MIGU.CBA.Module/HeaderPage/ViewModel/DateHeaderViewModel.cs
+22
-1
VIZ.MIGU.CBA.Module/MVPPlayer/MvpPlayerPlugin.cs
+49
-0
VIZ.MIGU.CBA.Module/MVPPlayer/View/MvpPlayerView.xaml
+306
-0
VIZ.MIGU.CBA.Module/MVPPlayer/View/MvpPlayerView.xaml.cs
+226
-0
VIZ.MIGU.CBA.Module/MVPPlayer/ViewModel/MvpPlayerViewModel.cs
+1981
-0
VIZ.MIGU.CBA.Module/Main/MainView.xaml
+7
-0
VIZ.MIGU.CBA.Module/VIZ.TVP.CBA.Module.csproj
+9
-0
No files found.
VIZ.MIGU.CBA.Module/Common/Utils.cs
View file @
5ab0a699
...
...
@@ -169,6 +169,120 @@ namespace VIZ.TVP.CBA.Module
}
/// <summary>
/// 设置MVP球员主队和客队球员技术数据统计
/// </summary>
/// <param name="mainViewModel"></param>
/// <param name="selectIndex"></param>
/// <param name="teamLiveH"></param>
/// <param name="teamLiveV"></param>
public
static
void
SetTechStatsInfo
(
MvpPlayerViewModel
mainViewModel
,
int
selectIndex
,
LivePlayerStatH
teamLiveH
,
LivePlayerStatV
teamLiveV
)
{
if
(
selectIndex
==
0
)
{
//foreach (var teamLive in mainViewModel.onAirDataModel.livePlayerStatH)
//{
Dictionary
<
string
,
string
>
CompareItemToNumber
=
new
Dictionary
<
string
,
string
>();
CompareItemToNumber
.
Add
(
"得分"
,
teamLiveH
.
Points
);
CompareItemToNumber
.
Add
(
"篮板"
,
teamLiveH
.
Rebounds
);
CompareItemToNumber
.
Add
(
"助攻"
,
teamLiveH
.
Assists
);
CompareItemToNumber
.
Add
(
"抢断"
,
teamLiveH
.
Steals
);
CompareItemToNumber
.
Add
(
"盖帽"
,
teamLiveH
.
Blocked
);
CompareItemToNumber
.
Add
(
"上场时间"
,
teamLiveH
.
Minutes
);
CompareItemToNumber
.
Add
(
"投篮命中率"
,
(
teamLiveH
.
FieldGoalsPercentage
*
100
).
ToString
(
"F1"
)
+
"%"
);
CompareItemToNumber
.
Add
(
"两分命中率"
,
(
teamLiveH
.
TwoPointPercentage
).
ToString
(
"F1"
)
+
"%"
);
CompareItemToNumber
.
Add
(
"三分命中率"
,
(
teamLiveH
.
ThreePointPercentage
*
100
).
ToString
(
"F1"
)
+
"%"
);
CompareItemToNumber
.
Add
(
"罚球命中率"
,
(
teamLiveH
.
FreeThrowsPercentage
*
100
).
ToString
(
"F1"
)
+
"%"
);
CompareItemToNumber
.
Add
(
"篮下投篮命中率"
,
(
teamLiveH
.
FieldGoalsAtRimPercentage
*
100
).
ToString
(
"F1"
)
+
"%"
);
CompareItemToNumber
.
Add
(
"中距离投篮命中率"
,
(
teamLiveH
.
FieldGoalsMidRangePercentage
*
100
).
ToString
(
"F1"
)
+
"%"
);
CompareItemToNumber
.
Add
(
"三分"
,
teamLiveH
.
ThreePointGoals
+
"/"
+
teamLiveH
.
ThreePointAttempted
);
CompareItemToNumber
.
Add
(
"两分"
,
teamLiveH
.
TwoPointGoals
+
"/"
+
teamLiveH
.
TwoPointAttempted
);
CompareItemToNumber
.
Add
(
"两分区"
,
teamLiveH
.
TwoPointGoals
+
"/"
+
teamLiveH
.
TwoPointAttempted
);
CompareItemToNumber
.
Add
(
"三分区"
,
teamLiveH
.
ThreePointGoals
+
"/"
+
teamLiveH
.
ThreePointAttempted
);
//CompareItemToNumber.Add("ThreeArea",);
CompareItemToNumber
.
Add
(
"罚球"
,
teamLiveH
.
FreeThrows
+
"/"
+
teamLiveH
.
FreeThrowsAttempted
);
CompareItemToNumber
.
Add
(
"失误.g"
,
teamLiveH
.
Turnovers
);
if
(!
mainViewModel
.
MvpHomePlayerCompareNumDictionary
.
ContainsKey
(
teamLiveH
.
CNAlias
))
{
mainViewModel
.
MvpHomePlayerCompareNumDictionary
.
Add
(
teamLiveH
.
CNAlias
,
CompareItemToNumber
);
}
//}
}
else
{
//foreach (var teamLive in mainViewModel.onAirDataModel.livePlayerStatV)
//{
Dictionary
<
string
,
string
>
CompareItemToNumber
=
new
Dictionary
<
string
,
string
>();
CompareItemToNumber
.
Add
(
"得分"
,
teamLiveV
.
Points
);
CompareItemToNumber
.
Add
(
"篮板"
,
teamLiveV
.
Rebounds
);
CompareItemToNumber
.
Add
(
"助攻"
,
teamLiveV
.
Assists
);
CompareItemToNumber
.
Add
(
"抢断"
,
teamLiveV
.
Steals
);
CompareItemToNumber
.
Add
(
"盖帽"
,
teamLiveV
.
Blocked
);
CompareItemToNumber
.
Add
(
"上场时间"
,
teamLiveV
.
Minutes
);
CompareItemToNumber
.
Add
(
"投篮命中率"
,
(
teamLiveV
.
FieldGoalsPercentage
).
ToString
(
"F1"
)
+
"%"
);
CompareItemToNumber
.
Add
(
"两分命中率"
,
(
teamLiveV
.
TwoPointPercentage
).
ToString
(
"F1"
)
+
"%"
);
CompareItemToNumber
.
Add
(
"三分命中率"
,
(
teamLiveV
.
ThreePointPercentage
).
ToString
(
"F1"
)
+
"%"
);
CompareItemToNumber
.
Add
(
"罚球命中率"
,
(
teamLiveV
.
FreeThrowsPercentage
).
ToString
(
"F1"
)
+
"%"
);
CompareItemToNumber
.
Add
(
"篮下投篮命中率"
,
(
teamLiveV
.
FieldGoalsAtRimPercentage
*
100
).
ToString
(
"F1"
)
+
"%"
);
CompareItemToNumber
.
Add
(
"中距离投篮命中率"
,
(
teamLiveV
.
FieldGoalsMidRangePercentage
*
100
).
ToString
(
"F1"
)
+
"%"
);
CompareItemToNumber
.
Add
(
"三分"
,
teamLiveV
.
ThreePointGoals
+
"/"
+
teamLiveV
.
ThreePointAttempted
);
CompareItemToNumber
.
Add
(
"两分"
,
teamLiveV
.
TwoPointGoals
+
"/"
+
teamLiveV
.
TwoPointAttempted
);
CompareItemToNumber
.
Add
(
"两分区"
,
teamLiveV
.
TwoPointGoals
+
"/"
+
teamLiveV
.
TwoPointAttempted
);
CompareItemToNumber
.
Add
(
"三分区"
,
teamLiveV
.
ThreePointGoals
+
"/"
+
teamLiveV
.
ThreePointAttempted
);
//CompareItemToNumber.Add("ThreeArea",);
CompareItemToNumber
.
Add
(
"罚球"
,
teamLiveV
.
FreeThrows
+
"/"
+
teamLiveV
.
FreeThrowsAttempted
);
CompareItemToNumber
.
Add
(
"失误"
,
teamLiveV
.
Turnovers
);
if
(!
mainViewModel
.
MvpVisitPlayerCompareNumDictionary
.
ContainsKey
(
teamLiveV
.
CNAlias
))
{
mainViewModel
.
MvpVisitPlayerCompareNumDictionary
.
Add
(
teamLiveV
.
CNAlias
,
CompareItemToNumber
);
}
// }
}
}
/// <summary>
/// 设置新的主队和客队球员技术数据统计
/// </summary>
...
...
VIZ.MIGU.CBA.Module/HeaderPage/ViewModel/DateHeaderViewModel.cs
View file @
5ab0a699
...
...
@@ -356,6 +356,27 @@ namespace VIZ.TVP.CBA.Module
}
#
endregion
#
region
Mvp
球员信息
if
(
MvpPlayerViewModel
.
MvpPlayerViewModelInstance
.
Count
>
0
)
{
foreach
(
var
tempSinglePlayerViewModel
in
MvpPlayerViewModel
.
MvpPlayerViewModelInstance
)
{
tempSinglePlayerViewModel
.
ScheduleID
=
selectMatchData
.
ScheduleID
;
tempSinglePlayerViewModel
.
Matchtypeid
=
selectMatchData
.
ScheduleTypeID
;
if
(
tempSinglePlayerViewModel
.
page
!=
null
&&
ApplicationDomainEx
.
CurrentPage
==
tempSinglePlayerViewModel
.
page
)
{
tempSinglePlayerViewModel
.
SetSingleData
();
}
}
}
#
endregion
#
region
球员对比信息
...
...
@@ -374,7 +395,7 @@ namespace VIZ.TVP.CBA.Module
//}
if
(
NewPlayerComPareViewModel
.
PlayerCompareViewModelInstance
.
Count
>
0
)
if
(
NewPlayerComPareViewModel
.
PlayerCompareViewModelInstance
.
Count
>
0
)
{
foreach
(
var
playerCompareViewModel
in
NewPlayerComPareViewModel
.
PlayerCompareViewModelInstance
)
{
...
...
VIZ.MIGU.CBA.Module/MVPPlayer/MvpPlayerPlugin.cs
0 → 100644
View file @
5ab0a699
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
VIZ.Package.Domain
;
namespace
VIZ.TVP.CBA.Module
{
public
class
MvpPlayerPlugin
:
IPluginLifeCycle
{
/// <summary>
/// 插件ID
/// </summary>
/// <remarks>
/// 插件ID不能包含点号
/// </remarks>
public
const
string
PLUGIN_ID
=
"MvpPlayerView"
;
/// <summary>
/// 插件显示名称
/// </summary>
public
const
string
PLUGIN_NAME
=
"MVP球员"
;
public
void
Dispose
()
{
}
public
void
Initialize
()
{
}
public
PluginInfo
Register
()
{
PluginInfo
info
=
new
PluginInfo
();
info
.
Group
=
PluginConstant
.
GroupName
;
info
.
ID
=
PLUGIN_ID
;
info
.
Name
=
PLUGIN_NAME
;
info
.
PluginType
=
PluginType
.
Page
;
info
.
ViewType
=
typeof
(
MvpPlayerView
);
//info.SettingViewType = typeof(DayMatchUI);
return
info
;
}
}
}
VIZ.MIGU.CBA.Module/MVPPlayer/View/MvpPlayerView.xaml
0 → 100644
View file @
5ab0a699
<UserControl x:Class="VIZ.TVP.CBA.Module.MvpPlayerView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dxrudex="http://schemas.devexpress.com/winfx/2008/xaml/reports/userdesignerextensions"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:storage="clr-namespace:VIZ.TVP.CBA.Module">
<Grid>
<ScrollViewer HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto"
Name="PART_Options"
DockPanel.Dock="Right"
dx:ScrollBarExtensions.ScrollBarMode="TouchOverlap"
Focusable="False">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="197*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0"/>
<RowDefinition Height="60"/>
<RowDefinition Height="40"/>
<!--<RowDefinition Height="160"/>-->
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<WrapPanel Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Width="760" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="122"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="50"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="50"/>
<ColumnDefinition Width="50"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="50"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="球队:" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Right"/>
<dxe:ComboBoxEdit Grid.Column="1" Name="com_TeamItem" Width="135" HorizontalAlignment="Left" VerticalAlignment="Center"
ItemsSource="{Binding Path=TeamItems,Mode=TwoWay}" SelectedItem="{Binding Path=SelectTeamItem,Mode=TwoWay}" SelectedIndex="{Binding SelectedIndex}"
FontSize="16">
</dxe:ComboBoxEdit>
<TextBlock Text="球员:" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right" FontSize="16" />
<dxe:ComboBoxEdit Grid.Column="3" x:Name="com_players"
HorizontalAlignment="Left" VerticalAlignment="Center" Width="135"
ItemsSource="{Binding Path=PlayerItems,Mode=TwoWay}"
SelectedItem="{Binding Path=SelectPlayer,Mode=TwoWay}" FontSize="16" />
<TextBlock Text="球衣号:" Grid.Column="4" VerticalAlignment="Center" HorizontalAlignment="Right" FontSize="16" />
<dxe:TextEdit Text="{Binding PlayNum,Mode=TwoWay}" Grid.Column="5" VerticalAlignment="Center" HorizontalAlignment="Right" FontSize="16" Width="50" ></dxe:TextEdit>
<TextBlock Text="项数:" Grid.Column="6" VerticalAlignment="Center" HorizontalAlignment="Right" FontSize="16" />
<dxe:ComboBoxEdit Grid.Column="7" x:Name="com_matchStatsId" HorizontalAlignment="Center" VerticalAlignment="Center" Width="80"
ItemsSource="{Binding Path=MatchStatsIds,Mode=TwoWay}"
SelectedItem="{Binding Path=MatchStatsId,Mode=TwoWay}" FontSize="16">
</dxe:ComboBoxEdit>
</Grid>
</WrapPanel>
<WrapPanel Grid.Row="1" HorizontalAlignment="Left" Width="760" VerticalAlignment="Center" Margin="0,0,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="175"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="160"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="标题:" FontSize="16" HorizontalAlignment="Right" VerticalAlignment="Center"/>
<dxe:TextEdit Grid.Column="1" Width="170" FontSize="16" HorizontalContentAlignment="Left"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Title,Mode=TwoWay }"></dxe:TextEdit>
<Button Content="任务开始" Name="task_Start" Click="task_Start_Click" Grid.Column="2" FontSize="14" Height="30" Width="90"/>
<Button Content="任务暂停" Name="task_continue" Click="task_continue_Click" Grid.Column="3" FontSize="14" Height="30" Width="90"/>
<Button Content="任务停止" Name="task_Stop" Click="task_Stop_Click" Grid.Column="4" FontSize="14" Height="30" Width="90"/>
<dx:SimpleButton Grid.Row="0" Grid.Column="5" Content="刷新" Glyph='/VIZ.TVP.CBA.Module;component/Image/CBAPng/refresh2525.png' FontSize="16"
Command="{Binding BtnCmd}" HorizontalContentAlignment="Center" Width="95" Height="30" />
</Grid>
</WrapPanel>
<WrapPanel Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Center" Width="650" Margin="150,0,0,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="34"/>
<RowDefinition Height="34"/>
<RowDefinition Height="34"/>
<RowDefinition Height="34"/>
<RowDefinition Height="34"/>
<RowDefinition Height="34"/>
<RowDefinition Height="34"/>
<RowDefinition Height="34"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="90"/>
<ColumnDefinition Width="127"/>
<ColumnDefinition Width="115"/>
<ColumnDefinition Width="120"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="2" Text="本场" FontSize="12" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBlock Grid.Row="0" Grid.Column="3" Text="赛季" FontSize="12" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<!--第一项-->
<!--<dxe:CheckEdit Grid.Row="1" HorizontalAlignment="Center" IsChecked="{Binding IsHeight}" Visibility="{Binding IsCheckVisible,Mode=TwoWay}"/>-->
<dxe:ComboBoxEdit Grid.Row="1" Grid.Column="1" x:Name="com_techStats" HorizontalAlignment="Center" VerticalAlignment="Center" Width="120" FontSize="16"
ItemsSource="{Binding Path=TechStats,Mode=TwoWay}"
SelectedItem="{Binding Path=SelectTechStats,Mode=TwoWay}" Visibility="{Binding TechStatsVisible,Mode=TwoWay}">
</dxe:ComboBoxEdit>
<dxe:TextEdit Grid.Row="1" Grid.Column="2" Width="110"
FontSize="16" HorizontalContentAlignment="Center"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Score,Mode=TwoWay }" Visibility="{Binding ScoreVisible,Mode=TwoWay}" />
<dxe:TextEdit Grid.Row="1" Grid.Column="3" Width="110"
FontSize="16" HorizontalContentAlignment="Center"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding SeasonScore,Mode=TwoWay }" Visibility="{Binding SeasonScoreVisible,Mode=TwoWay}" />
<!--第二项-->
<!--<dxe:CheckEdit Grid.Row="2" HorizontalAlignment="Center" IsChecked="{Binding IsHeight1}" Visibility="{Binding IsCheckVisible1,Mode=TwoWay}"/>-->
<dxe:ComboBoxEdit Grid.Row="2" Grid.Column="1" x:Name="com_techStats1" HorizontalAlignment="Center" VerticalAlignment="Center" Width="120" FontSize="16"
ItemsSource="{Binding Path=TechStats1,Mode=TwoWay}"
SelectedItem="{Binding Path=SelectTechStats1,Mode=TwoWay}" Visibility="{Binding TechStatsVisible1,Mode=TwoWay}">
</dxe:ComboBoxEdit>
<dxe:TextEdit Grid.Row="2" Grid.Column="2" Width="110"
FontSize="16" HorizontalContentAlignment="Center"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Score1,Mode=TwoWay }" Visibility="{Binding ScoreVisible1,Mode=TwoWay}" />
<dxe:TextEdit Grid.Row="2" Grid.Column="3" Width="110"
FontSize="16" HorizontalContentAlignment="Center"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding SeasonScore1,Mode=TwoWay }" Visibility="{Binding SeasonScoreVisible1,Mode=TwoWay}" />
<!--第三项-->
<!--<dxe:CheckEdit Grid.Row="3" HorizontalAlignment="Center" IsChecked="{Binding IsHeight2}" Visibility="{Binding IsCheckVisible2,Mode=TwoWay}"/>-->
<dxe:ComboBoxEdit Grid.Row="3" Grid.Column="1" x:Name="com_techStats2" HorizontalAlignment="Center" VerticalAlignment="Center" Width="120" FontSize="16"
ItemsSource="{Binding Path=TechStats2,Mode=TwoWay}"
SelectedItem="{Binding Path=SelectTechStats2,Mode=TwoWay}" Visibility="{Binding TechStatsVisible2,Mode=TwoWay}">
</dxe:ComboBoxEdit>
<dxe:TextEdit Grid.Row="3" Grid.Column="2" Width="110"
FontSize="16" HorizontalContentAlignment="Center"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Score2,Mode=TwoWay }" Visibility="{Binding ScoreVisible2,Mode=TwoWay}" />
<dxe:TextEdit Grid.Row="3" Grid.Column="3" Width="110"
FontSize="16" HorizontalContentAlignment="Center"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding SeasonScore2,Mode=TwoWay }" Visibility="{Binding SeasonScoreVisible2,Mode=TwoWay}" />
<!--第四项-->
<!--<dxe:CheckEdit Grid.Row="4" HorizontalAlignment="Center" IsChecked="{Binding IsHeight3}" Visibility="{Binding IsCheckVisible3,Mode=TwoWay}"/>-->
<dxe:ComboBoxEdit Grid.Row="4" Grid.Column="1" x:Name="com_techStats3" HorizontalAlignment="Center" VerticalAlignment="Center" Width="120" FontSize="16"
ItemsSource="{Binding Path=TechStats3,Mode=TwoWay}"
SelectedItem="{Binding Path=SelectTechStats3,Mode=TwoWay}" Visibility="{Binding TechStatsVisible3,Mode=TwoWay}">
</dxe:ComboBoxEdit>
<dxe:TextEdit Grid.Row="4" Grid.Column="2" Width="110"
FontSize="16" HorizontalContentAlignment="Center"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Score3,Mode=TwoWay }" Visibility="{Binding ScoreVisible3,Mode=TwoWay}" />
<dxe:TextEdit Grid.Row="4" Grid.Column="3" Width="110"
FontSize="16" HorizontalContentAlignment="Center"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding SeasonScore3,Mode=TwoWay }" Visibility="{Binding SeasonScoreVisible3,Mode=TwoWay}" />
<!--第五项-->
<!--<dxe:CheckEdit Grid.Row="5" HorizontalAlignment="Center" IsChecked="{Binding IsHeight4}" Visibility="{Binding IsCheckVisible4,Mode=TwoWay}"/>-->
<dxe:ComboBoxEdit Grid.Row="5" Grid.Column="1" x:Name="com_techStats4" HorizontalAlignment="Center" VerticalAlignment="Center" Width="120" FontSize="16"
ItemsSource="{Binding Path=TechStats4,Mode=TwoWay}"
SelectedItem="{Binding Path=SelectTechStats4,Mode=TwoWay}" Visibility="{Binding TechStatsVisible4,Mode=TwoWay}">
</dxe:ComboBoxEdit>
<dxe:TextEdit Grid.Row="5" Grid.Column="2" Width="110"
FontSize="16" HorizontalContentAlignment="Center"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Score4,Mode=TwoWay }" Visibility="{Binding ScoreVisible4,Mode=TwoWay}" />
<dxe:TextEdit Grid.Row="5" Grid.Column="3" Width="110"
FontSize="16" HorizontalContentAlignment="Center"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding SeasonScore4,Mode=TwoWay }" Visibility="{Binding SeasonScoreVisible4,Mode=TwoWay}" />
<!--第六项--><!--
<dxe:CheckEdit Grid.Row="6" HorizontalAlignment="Center" IsChecked="{Binding IsHeight5}" Visibility="{Binding IsCheckVisible5,Mode=TwoWay}"/>
<dxe:ComboBoxEdit Grid.Row="6" Grid.Column="1" x:Name="com_techStats5" HorizontalAlignment="Center" VerticalAlignment="Center" Width="120" FontSize="16"
ItemsSource="{Binding Path=TechStats5,Mode=TwoWay}"
SelectedItem="{Binding Path=SelectTechStats5,Mode=TwoWay}" Visibility="{Binding TechStatsVisible5,Mode=TwoWay}">
</dxe:ComboBoxEdit>
<dxe:TextEdit Grid.Row="6" Grid.Column="2" Width="110"
FontSize="16" HorizontalContentAlignment="Center"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Score5,Mode=TwoWay }" Visibility="{Binding ScoreVisible5,Mode=TwoWay}" />
<dxe:TextEdit Grid.Row="6" Grid.Column="3" Width="110"
FontSize="16" HorizontalContentAlignment="Center"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding SeasonScore5,Mode=TwoWay }" Visibility="{Binding SeasonScoreVisible5,Mode=TwoWay}" />
--><!--第七项--><!--
<dxe:CheckEdit Grid.Row="7" HorizontalAlignment="Center" IsChecked="{Binding IsHeight6}" Visibility="{Binding IsCheckVisible6,Mode=TwoWay}"/>
<dxe:ComboBoxEdit Grid.Row="7" Grid.Column="1" x:Name="com_techStats6" HorizontalAlignment="Center" VerticalAlignment="Center" Width="120" FontSize="16"
ItemsSource="{Binding Path=TechStats6,Mode=TwoWay}"
SelectedItem="{Binding Path=SelectTechStats6,Mode=TwoWay}" Visibility="{Binding TechStatsVisible6,Mode=TwoWay}">
</dxe:ComboBoxEdit>
<dxe:TextEdit Grid.Row="7" Grid.Column="2" Width="110"
FontSize="16" HorizontalContentAlignment="Center"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Score6,Mode=TwoWay }" Visibility="{Binding ScoreVisible6,Mode=TwoWay}" />
<dxe:TextEdit Grid.Row="7" Grid.Column="3" Width="110"
FontSize="16" HorizontalContentAlignment="Center"
HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding SeasonScore6,Mode=TwoWay }" Visibility="{Binding SeasonScoreVisible6,Mode=TwoWay}" />-->
</Grid>
</WrapPanel>
<!--<DockPanel Grid.Row="4">
<ScrollViewer HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto"
Name="PART_Options"
DockPanel.Dock="Right"
dx:ScrollBarExtensions.ScrollBarMode="TouchOverlap"
Focusable="False">
</ScrollViewer>
<dxg:GridControl x:Name="grid" ShowBorder="False" ItemsSource="{Binding Path= SinglePlayerData,Mode=TwoWay}">
<dxg:GridColumn FieldName="SelectLight" Header="" Width="112">
<dxg:GridColumn.EditSettings>
<dxe:ComboBoxEditSettings
ItemsSource="{Binding Source={x:Static Member=storage:StaticEnumInfos.EnumDescriptions}}" IsTextEditable="False" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="TechStatsName" Header="" Width="112">
<dxg:GridColumn.EditSettings>
<dxe:ComboBoxEditSettings
ItemsSource="{Binding Source={x:Static Member=storage:StaticEnumInfos.EnumTechStatsDescriptions}}" IsTextEditable="False" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="Score" Header="本场" Width="112" />
<dxg:GridColumn FieldName="SeasonScore" Header="赛季" Width="112" />
-->
<!--#endregion-->
<!--
<dxg:GridControl.View>
<dxg:TableView AutoWidth="True" ShowGroupPanel="False"
BorderThickness="0"
ShowFilterPanelMode="Never"
AllowColumnFiltering="False"
AllowSorting="False"
IsColumnMenuEnabled="False" >
-->
<!--<dxg:TableView.RowStyle>
<Style TargetType="{x:Type dxg:RowControl}" >
<Setter Property="Visibility" Value="{Binding IsVisiblity,Mode=TwoWay}"/>
</Style>
</dxg:TableView.RowStyle>-->
<!--
</dxg:TableView>
</dxg:GridControl.View>
</dxg:GridControl>
</DockPanel>-->
</Grid>
</ScrollViewer>
</Grid>
</UserControl>
VIZ.MIGU.CBA.Module/MVPPlayer/View/MvpPlayerView.xaml.cs
0 → 100644
View file @
5ab0a699
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
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
;
using
VIZ.Package.Domain
;
using
VIZ.Package.Module
;
namespace
VIZ.TVP.CBA.Module
{
/// <summary>
/// Interaction logic for MvpPlayerView.xaml
/// </summary>
public
partial
class
MvpPlayerView
:
UserControl
,
IPluginView
{
MvpPlayerViewModel
vm
=
new
MvpPlayerViewModel
();
public
MvpPlayerView
()
{
InitializeComponent
();
//vm = new SinglePlayerViewModel(); dqyData
MvpPlayerViewModel
.
MvpPlayerViewModelInstance
.
Add
(
vm
);
WPFHelper
.
BindingViewModel
(
this
,
vm
);
task_Start
.
Visibility
=
Visibility
.
Hidden
;
task_Stop
.
Visibility
=
Visibility
.
Hidden
;
task_continue
.
Visibility
=
Visibility
.
Hidden
;
task_Start
.
IsEnabled
=
true
;
task_Stop
.
IsEnabled
=
false
;
task_continue
.
IsEnabled
=
false
;
this
.
Loaded
+=
NewSinglePlayerView_Loaded
;
this
.
IsVisibleChanged
+=
MvplePlayerView_IsVisibleChanged
;
}
private
void
MvplePlayerView_IsVisibleChanged
(
object
sender
,
DependencyPropertyChangedEventArgs
e
)
{
if
(!
string
.
IsNullOrEmpty
(
vm
.
ScheduleID
)
&&
!
string
.
IsNullOrEmpty
(
vm
.
Matchtypeid
))
{
vm
.
SetSingleData
();
}
}
private
void
NewSinglePlayerView_Loaded
(
object
sender
,
RoutedEventArgs
e
)
{
var
service
=
ApplicationDomainEx
.
ServiceManager
.
GetService
<
IPluginService
>(
ViewServiceKeys
.
PLUGIN_SERVICE
);
if
(
service
==
null
)
return
;
vm
.
page
=
service
.
GetPageModelFromView
(
this
);
}
public
void
Dispose
()
{
}
public
void
PreviewContinue
(
ConnModel
conn
)
{
}
public
void
PreviewIn
(
ConnModel
conn
)
{
if
(
conn
.
IsConnected
)
{
conn
.
EndpointManager
.
Send
(
String
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"mvpData"
,
vm
.
CombineSingleData
()));
}
}
public
void
PreviewOut
(
ConnModel
conn
)
{
//if(conn.IsConnected)
// {
// conn.EndpointManager.Send(VizEngineCommands.STAGE_CONTINUE);
// }
}
public
void
TakeContinue
(
ConnModel
conns
)
{
}
public
void
TakeOut
(
ConnModel
conns
)
{
if
(
conns
.
IsConnected
)
{
conns
.
EndpointManager
.
Send
(
VizEngineCommands
.
STAGE_CONTINUE
);
}
}
public
void
TakeUpdate
(
ConnModel
conns
)
{
if
(
conns
.
IsConnected
)
{
conns
.
EndpointManager
.
Send
(
String
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"mvpData"
,
vm
.
CombineSingleData
()));
}
}
public
void
TakIn
(
ConnModel
conns
)
{
if
(
conns
.
IsConnected
)
{
conns
.
EndpointManager
.
Send
(
String
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"mvpData"
,
vm
.
CombineSingleData
()));
}
}
/// <summary>
/// 注册任务
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private
void
SinglePlayerView_Init
()
{
if
(
task
!=
null
)
return
;
task
=
new
PackageTaskModel
(
this
);
task
.
PreviewUpdateAction
=
OnPreviewUpdate
;
task
.
TakeUpdateAction
=
OnTakeUpdate
;
task
.
IsPreviewEnabled
=
true
;
task
.
IsTakeEnabled
=
true
;
task
.
IsRunning
=
true
;
task
.
Name
=
"MVP球员数据"
;
service
=
ApplicationDomainEx
.
ServiceManager
.
GetService
<
IPackageTaskService
>(
ViewServiceKeys
.
PACKAGE_TASK_SERVICE
);
if
(
service
==
null
)
return
;
service
.
Register
(
task
);
}
/// <summary>
/// 任务模型
/// </summary>
public
PackageTaskModel
task
;
IPackageTaskService
service
;
private
void
OnPreviewUpdate
(
ConnModel
conn
)
{
if
(
conn
.
IsConnected
)
{
vm
.
BtnCommand
();
if
(
vm
.
onAirDataModel
!=
null
)
{
conn
.
EndpointManager
.
Send
(
String
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"mvpData"
,
vm
.
CombineSingleData
()));
}
//task.CanExecute = vm.flag;
//SCRIPT_INVOKE
}
}
private
void
OnTakeUpdate
(
ConnModel
conn
)
{
if
(
conn
.
IsConnected
)
{
vm
.
BtnCommand
();
//SCRIPT_INVOKE
if
(
vm
.
onAirDataModel
!=
null
)
{
conn
.
EndpointManager
.
Send
(
String
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"mvpData"
,
vm
.
CombineSingleData
()));
}
}
}
private
void
task_Start_Click
(
object
sender
,
RoutedEventArgs
e
)
{
SinglePlayerView_Init
();
task_Start
.
IsEnabled
=
false
;
task_Stop
.
IsEnabled
=
true
;
task_continue
.
IsEnabled
=
true
;
}
private
void
task_continue_Click
(
object
sender
,
RoutedEventArgs
e
)
{
if
(
task
.
IsRunning
)
{
task
.
IsRunning
=
false
;
task_continue
.
Content
=
"任务继续"
;
}
else
{
task
.
IsRunning
=
true
;
task_continue
.
Content
=
"任务暂停"
;
}
task_Start
.
IsEnabled
=
false
;
task_Stop
.
IsEnabled
=
true
;
}
private
void
task_Stop_Click
(
object
sender
,
RoutedEventArgs
e
)
{
service
.
Cancel
(
task
);
task
=
null
;
task_Start
.
IsEnabled
=
true
;
task_continue
.
Content
=
"任务暂停"
;
task_continue
.
IsEnabled
=
false
;
task_Stop
.
IsEnabled
=
false
;
}
}
}
VIZ.MIGU.CBA.Module/MVPPlayer/ViewModel/MvpPlayerViewModel.cs
0 → 100644
View file @
5ab0a699
using
DevExpress.Mvvm.POCO
;
using
log4net
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.ObjectModel
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Media.Imaging
;
using
System.Windows
;
using
VIZ.Framework.Core
;
using
VIZ.Package.Domain
;
using
System.Windows.Media
;
using
System.IO
;
namespace
VIZ.TVP.CBA.Module
{
public
class
MvpPlayerViewModel
:
ViewModelBase
{
private
static
ILog
Log
=
LogManager
.
GetLogger
(
typeof
(
NewSinglePlayerViewModel
));
//private static SinglePlayerViewModel _createInstance = null;
public
static
List
<
MvpPlayerViewModel
>
MvpPlayerViewModelInstance
=
new
List
<
MvpPlayerViewModel
>();
//{
// get
// {
// if (null == _createInstance)
// {
// _createInstance = new SinglePlayerViewModel();
// }
// return _createInstance;
// }
//}
public
MvpPlayerViewModel
()
{
matchStatsIds
=
new
ObservableCollection
<
int
>()
{
3
,
4
,
5
};
BtnCmd
=
new
VCommand
(
BtnCommand
);
ScheduleID
=
DateHeaderViewModel
.
ScheduleID
;
Matchtypeid
=
DateHeaderViewModel
.
Matchtypeid
;
SetSingleData
();
//GetSchedule();
}
//初始话界面
public
PageModel
page
=
null
;
public
ObservableCollection
<
string
>
PlayerDataCompareOptionChinese
=
new
ObservableCollection
<
string
>
{
"得分"
,
"篮板"
,
"助攻"
,
"抢断"
,
"盖帽"
,
"上场时间"
,
"投篮命中率"
,
"两分命中率"
,
"三分命中率"
,
"罚球命中率"
,
"篮下投篮命中率"
,
"中距离投篮命中率"
,
"三分"
,
"两分"
,
"两分区"
,
"三分区"
,
"三秒区"
,
"罚球"
,
"失误"
};
private
int
matchStatsId
=
5
;
public
int
MatchStatsId
{
get
{
return
matchStatsId
;
}
set
{
matchStatsId
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
MatchStatsId
));
SetTechStats
();
}
}
private
ObservableCollection
<
int
>
matchStatsIds
;
public
ObservableCollection
<
int
>
MatchStatsIds
{
get
{
return
matchStatsIds
;
}
set
{
matchStatsIds
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
MatchStatsIds
));
}
}
private
SinglePlayerModel
singlePlayer
;
public
SinglePlayerModel
SinglePlayer
{
get
{
return
singlePlayer
;
}
set
{
singlePlayer
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SinglePlayer
));
}
}
public
ObservableCollection
<
string
>
playerItems
;
public
ObservableCollection
<
string
>
PlayerItems
{
get
{
return
playerItems
;
}
set
{
playerItems
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
PlayerItems
));
}
}
private
string
selectPlayer
;
public
string
SelectPlayer
{
get
{
return
selectPlayer
;
}
set
{
selectPlayer
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectPlayer
));
if
(
selectedIndex
<
0
||
selectPlayer
==
null
)
return
;
string
baesePath
=
AppDomain
.
CurrentDomain
.
BaseDirectory
;
if
(
selectedIndex
==
0
)
{
if
(
HNameNums
.
ContainsKey
(
selectPlayer
))
{
PlayNum
=
HNameNums
[
selectPlayer
];
if
(
TeamItems
[
selectedIndex
]
==
"北京控股666"
)
{
if
(
File
.
Exists
(
string
.
Format
(
"{0}Image\\Teamlogo\\{1}.png"
,
baesePath
,
"北京控股"
)))
{
PlayerLogo
=
new
BitmapImage
(
new
Uri
(
string
.
Format
(
"{0}Image\\Teamlogo\\{1}.png"
,
baesePath
,
"北京控股"
)));
}
}
else
{
if
(
File
.
Exists
(
string
.
Format
(
"{0}Image\\Teamlogo\\{1}.png"
,
baesePath
,
TeamItems
[
selectedIndex
])))
{
PlayerLogo
=
new
BitmapImage
(
new
Uri
(
string
.
Format
(
"{0}Image\\Teamlogo\\{1}.png"
,
baesePath
,
TeamItems
[
selectedIndex
])));
}
}
}
}
else
{
if
(
VNameNums
.
ContainsKey
(
selectPlayer
))
{
PlayNum
=
VNameNums
[
selectPlayer
];
if
(
TeamItems
[
selectedIndex
]
==
"北京控股666"
)
{
if
(
File
.
Exists
(
string
.
Format
(
"{0}Image\\Teamlogo\\{1}.png"
,
baesePath
,
"北京控股"
)))
{
PlayerLogo
=
new
BitmapImage
(
new
Uri
(
string
.
Format
(
"{0}Image\\Teamlogo\\{1}.png"
,
baesePath
,
"北京控股"
)));
}
}
else
{
if
(
File
.
Exists
(
string
.
Format
(
"{0}Image\\Teamlogo\\{1}.png"
,
baesePath
,
TeamItems
[
selectedIndex
])))
{
PlayerLogo
=
new
BitmapImage
(
new
Uri
(
string
.
Format
(
"{0}Image\\Teamlogo\\{1}.png"
,
baesePath
,
TeamItems
[
selectedIndex
])));
}
}
}
}
SetData
(
0
);
}
}
private
ObservableCollection
<
string
>
teamItems
;
public
ObservableCollection
<
string
>
TeamItems
{
get
{
return
teamItems
;
}
set
{
teamItems
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TeamItems
));
}
}
private
string
selectTeamItem
;
public
string
SelectTeamItem
{
get
{
return
selectTeamItem
;
}
set
{
selectTeamItem
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectTeamItem
));
}
}
private
string
playNum
;
public
string
PlayNum
{
get
{
return
playNum
;
}
set
{
playNum
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
PlayNum
));
}
}
private
int
selectedIndex
;
/// <summary>
/// 0 是主队 1 是客队
/// </summary>
public
int
SelectedIndex
{
get
{
return
selectedIndex
;
}
set
{
selectedIndex
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectedIndex
));
SetPlayer
(
selectedIndex
);
}
}
private
ImageSource
playerLogo
;
public
ImageSource
PlayerLogo
{
get
{
return
playerLogo
;
}
set
{
playerLogo
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
PlayerLogo
));
}
}
public
VCommand
BtnCmd
{
get
;
set
;
}
public
VCommand
TeamSelectCommand
{
get
;
set
;
}
private
string
title
=
"MVP球员"
;
public
string
Title
{
get
{
return
title
;
}
set
{
title
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Title
));
}
}
public
VCommand
SingleCommand
{
get
;
set
;
}
public
VCommand
MVPCommand
{
get
;
set
;
}
public
Dictionary
<
string
,
string
>
HNameNums
=
new
Dictionary
<
string
,
string
>();
public
Dictionary
<
string
,
string
>
VNameNums
=
new
Dictionary
<
string
,
string
>();
/// <summary>
/// 主队球员技术统计数据
/// </summary>
public
Dictionary
<
string
,
Dictionary
<
string
,
string
>>
MvpHomePlayerCompareNumDictionary
=
new
Dictionary
<
string
,
Dictionary
<
string
,
string
>>();
/// <summary>
/// 客队球员技术统计数据
/// </summary>
public
Dictionary
<
string
,
Dictionary
<
string
,
string
>>
MvpVisitPlayerCompareNumDictionary
=
new
Dictionary
<
string
,
Dictionary
<
string
,
string
>>();
//向字典中个人选手增加整个赛季的分数值
public
Dictionary
<
string
,
Dictionary
<
string
,
string
>>
CNAliasPlayerSportsDictionary
=
new
Dictionary
<
string
,
Dictionary
<
string
,
string
>>();
private
void
SetPlayer
(
int
index
)
{
if
(
index
<
0
)
return
;
MvpHomePlayerCompareNumDictionary
.
Clear
();
MvpVisitPlayerCompareNumDictionary
.
Clear
();
PlayerItems
=
new
System
.
Collections
.
ObjectModel
.
ObservableCollection
<
string
>();
if
(
index
==
0
)
{
foreach
(
var
teamLive
in
onAirDataModel
.
livePlayerStatH
)
{
PlayerItems
.
Add
(
teamLive
.
CNAlias
);
if
(!
HNameNums
.
ContainsKey
(
teamLive
.
CNAlias
))
{
HNameNums
.
Add
(
teamLive
.
CNAlias
,
teamLive
.
Number
);
}
Utils
.
SetTechStatsInfo
(
this
,
index
,
teamLive
,
null
);
}
}
else
{
foreach
(
var
teamLive
in
onAirDataModel
.
livePlayerStatV
)
{
PlayerItems
.
Add
(
teamLive
.
CNAlias
);
if
(!
VNameNums
.
ContainsKey
(
teamLive
.
CNAlias
))
{
VNameNums
.
Add
(
teamLive
.
CNAlias
,
teamLive
.
Number
);
}
Utils
.
SetTechStatsInfo
(
this
,
index
,
null
,
teamLive
);
}
}
}
private
void
SetTechStats
()
{
if
(
matchStatsId
==
3
)
{
IsCheckVisible3
=
Visibility
.
Hidden
;
TechStatsVisible3
=
Visibility
.
Hidden
;
ScoreVisible3
=
Visibility
.
Hidden
;
SeasonScoreVisible3
=
Visibility
.
Hidden
;
IsCheckVisible4
=
Visibility
.
Hidden
;
TechStatsVisible4
=
Visibility
.
Hidden
;
ScoreVisible4
=
Visibility
.
Hidden
;
SeasonScoreVisible4
=
Visibility
.
Hidden
;
}
else
if
(
matchStatsId
==
4
)
{
IsCheckVisible3
=
Visibility
.
Visible
;
TechStatsVisible3
=
Visibility
.
Visible
;
ScoreVisible3
=
Visibility
.
Visible
;
SeasonScoreVisible3
=
Visibility
.
Visible
;
IsCheckVisible4
=
Visibility
.
Hidden
;
TechStatsVisible4
=
Visibility
.
Hidden
;
ScoreVisible4
=
Visibility
.
Hidden
;
SeasonScoreVisible4
=
Visibility
.
Hidden
;
}
else
if
(
matchStatsId
==
5
)
{
IsCheckVisible3
=
Visibility
.
Visible
;
TechStatsVisible3
=
Visibility
.
Visible
;
ScoreVisible3
=
Visibility
.
Visible
;
SeasonScoreVisible3
=
Visibility
.
Visible
;
IsCheckVisible4
=
Visibility
.
Visible
;
TechStatsVisible4
=
Visibility
.
Visible
;
ScoreVisible4
=
Visibility
.
Visible
;
SeasonScoreVisible4
=
Visibility
.
Visible
;
}
SetData
(
0
);
}
//球员赛季数据
public
string
Matchtypeid
=
""
;
//比赛赛程Id
public
string
ScheduleID
=
""
;
/// <summary>
/// 球员赛季数据
/// </summary>
public
PlayerSeasonData
PlayerSeasonData
=
new
PlayerSeasonData
();
/// <summary>
/// 队伍赛程信息
/// </summary>
public
TeamSeasonData
TeamSeasonData
=
new
TeamSeasonData
();
public
OnAirDataModel
onAirDataModel
=
new
OnAirDataModel
();
/// <summary>
/// 设置一个比赛赛程集合
/// </summary>
public
Dictionary
<
string
,
string
>
SetMatchDict
=
new
Dictionary
<
string
,
string
>();
/// <summary>
/// 设置单个球员相关的信息
/// </summary>
public
void
SetSingleData
()
{
GetSeasonData
();
onAirDataModel
=
JsonModel
.
PostOnAirData_Path
(
ScheduleID
);
if
(
onAirDataModel
==
null
)
return
;
TeamItems
=
new
System
.
Collections
.
ObjectModel
.
ObservableCollection
<
string
>();
TeamItems
.
Add
(
onAirDataModel
.
liveTeamInfo
.
HomeTeamCNAlias
);
TeamItems
.
Add
(
onAirDataModel
.
liveTeamInfo
.
VisitingTeamCNAlias
);
SetPlayer
(
selectedIndex
);
}
/// <summary>
/// 获得赛季数据
/// </summary>
private
async
void
GetSeasonData
()
{
try
{
PlayerSeasonData
=
await
JsonModel
.
PostPlayerSeasonData_Path
(
Matchtypeid
);
TeamSeasonData
=
await
JsonModel
.
PostTeamSeasonData_Path
(
Matchtypeid
);
if
(
PlayerSeasonData
==
null
)
return
;
CNAliasPlayerSportsDictionary
.
Clear
();
foreach
(
var
tempSeasonData
in
PlayerSeasonData
.
playerstats
)
{
Dictionary
<
string
,
string
>
CompareItemToNumber
=
new
Dictionary
<
string
,
string
>();
CompareItemToNumber
.
Add
(
"得分"
,
tempSeasonData
.
PointsAverage
);
CompareItemToNumber
.
Add
(
"篮板"
,
tempSeasonData
.
ReboundsAverage
);
CompareItemToNumber
.
Add
(
"助攻"
,
tempSeasonData
.
AssistsAverage
);
CompareItemToNumber
.
Add
(
"抢断"
,
tempSeasonData
.
StealsAverage
);
CompareItemToNumber
.
Add
(
"盖帽"
,
tempSeasonData
.
BlockedAverage
);
CompareItemToNumber
.
Add
(
"上场时间"
,
tempSeasonData
.
MinutesAverage
);
CompareItemToNumber
.
Add
(
"投篮命中率"
,
(
tempSeasonData
.
FieldGoalsPercentageAverage
).
ToString
(
"F1"
)
+
"%"
);
CompareItemToNumber
.
Add
(
"两分命中率"
,
(
tempSeasonData
.
TwoPointPercentageAverage
).
ToString
(
"F1"
)
+
"%"
);
CompareItemToNumber
.
Add
(
"三分命中率"
,
(
tempSeasonData
.
ThreePointPercentageAverage
).
ToString
(
"F1"
)
+
"%"
);
CompareItemToNumber
.
Add
(
"罚球命中率"
,
(
tempSeasonData
.
FreeThrowsPercentageAverage
).
ToString
(
"F1"
)
+
"%"
);
CompareItemToNumber
.
Add
(
"篮下投篮命中率"
,
(
tempSeasonData
.
FieldGoalsAtRimPercentageAverage
*
100
).
ToString
(
"F1"
)
+
"%"
);
CompareItemToNumber
.
Add
(
"中距离投篮命中率"
,
(
tempSeasonData
.
FieldGoalsMidRangePercentageAverage
*
100
).
ToString
(
"F1"
)
+
"%"
);
CompareItemToNumber
.
Add
(
"三分"
,
tempSeasonData
.
ThreePointGoalsAverage
+
"/"
+
tempSeasonData
.
ThreePointAttemptedAverage
);
CompareItemToNumber
.
Add
(
"两分"
,
tempSeasonData
.
TwoPointGoalsAverage
+
"/"
+
tempSeasonData
.
TwoPointAttemptedAverage
);
CompareItemToNumber
.
Add
(
"两分区"
,
tempSeasonData
.
TwoPointGoalsAverage
+
"/"
+
tempSeasonData
.
TwoPointAttemptedAverage
);
CompareItemToNumber
.
Add
(
"三分区"
,
tempSeasonData
.
ThreePointGoalsAverage
+
"/"
+
tempSeasonData
.
ThreePointAttemptedAverage
);
//CompareItemToNumber.Add("ThreeArea",);
CompareItemToNumber
.
Add
(
"罚球"
,
tempSeasonData
.
FreeThrowsAverage
+
"/"
+
tempSeasonData
.
FreeThrowsAttemptedAverage
);
CompareItemToNumber
.
Add
(
"失误"
,
tempSeasonData
.
TurnoversAverage
);
if
(!
CNAliasPlayerSportsDictionary
.
ContainsKey
(
tempSeasonData
.
CNAlias
))
{
CNAliasPlayerSportsDictionary
.
Add
(
tempSeasonData
.
CNAlias
,
CompareItemToNumber
);
}
}
}
catch
(
Exception
ex
)
{
Log
.
Error
(
ex
.
Message
);
}
}
/// <summary>
/// 组装数据
/// </summary>
/// <returns></returns>
public
string
CombineSingleData
()
{
try
{
string
data
=
""
;
if
(
matchStatsId
!=
0
)
{
data
+=
matchStatsId
.
ToString
().
Replace
(
" "
,
""
)
+
"*"
;
}
else
{
data
+=
"7*"
;
}
data
+=
title
.
Replace
(
" "
,
""
)
+
"*"
;
if
(!
string
.
IsNullOrEmpty
(
selectTeamItem
))
{
data
+=
selectTeamItem
.
Replace
(
" "
,
""
)
+
"*"
;
}
else
{
data
+=
""
+
"*"
;
}
if
(!
string
.
IsNullOrEmpty
(
SelectPlayer
))
{
data
+=
SelectPlayer
.
Replace
(
" "
,
""
)
+
"&"
;
}
else
{
data
+=
""
+
"&"
;
}
if
(
matchStatsId
==
5
)
{
//第一项
if
(
IsHeight
==
false
)
{
data
+=
"0"
+
"*"
;
}
else
{
data
+=
"1"
+
"*"
;
}
data
+=
selectTechStats
.
Replace
(
" "
,
""
)
+
"*"
;
if
(!
string
.
IsNullOrEmpty
(
Score
))
{
data
+=
Score
.
Replace
(
" "
,
""
)
+
"*"
;
}
else
{
data
+=
""
+
"*"
;
}
if
(!
string
.
IsNullOrEmpty
(
SeasonScore
))
{
data
+=
SeasonScore
.
Replace
(
" "
,
""
)
+
";"
;
}
else
{
data
+=
""
+
";"
;
}
//第二项
if
(
IsHeight1
==
false
)
{
data
+=
"0"
+
"*"
;
}
else
{
data
+=
"1"
+
"*"
;
}
data
+=
selectTechStats1
.
Replace
(
" "
,
""
)
+
"*"
;
if
(!
string
.
IsNullOrEmpty
(
Score1
))
{
data
+=
Score1
.
Replace
(
" "
,
""
)
+
"*"
;
}
else
{
data
+=
""
+
"*"
;
}
if
(!
string
.
IsNullOrEmpty
(
SeasonScore1
))
{
data
+=
SeasonScore1
.
Replace
(
" "
,
""
)
+
";"
;
}
else
{
data
+=
""
+
";"
;
}
//第三项
if
(
IsHeight2
==
false
)
{
data
+=
"0"
+
"*"
;
}
else
{
data
+=
"1"
+
"*"
;
}
data
+=
selectTechStats2
.
Replace
(
" "
,
""
)
+
"*"
;
if
(!
string
.
IsNullOrEmpty
(
Score2
))
{
data
+=
Score2
.
Replace
(
" "
,
""
)
+
"*"
;
}
else
{
data
+=
""
+
"*"
;
}
if
(!
string
.
IsNullOrEmpty
(
SeasonScore2
))
{
data
+=
SeasonScore2
.
Replace
(
" "
,
""
)
+
";"
;
}
else
{
data
+=
""
+
";"
;
}
//第四项
if
(
IsHeight3
==
false
)
{
data
+=
"0"
+
"*"
;
}
else
{
data
+=
"1"
+
"*"
;
}
data
+=
selectTechStats3
.
Replace
(
" "
,
""
)
+
"*"
;
if
(!
string
.
IsNullOrEmpty
(
Score3
))
{
data
+=
Score3
.
Replace
(
" "
,
""
)
+
"*"
;
}
else
{
data
+=
""
+
"*"
;
}
if
(!
string
.
IsNullOrEmpty
(
SeasonScore3
))
{
data
+=
SeasonScore3
.
Replace
(
" "
,
""
)
+
";"
;
}
else
{
data
+=
""
+
";"
;
}
//第五项
if
(
IsHeight4
==
false
)
{
data
+=
"0"
+
"*"
;
}
else
{
data
+=
"1"
+
"*"
;
}
data
+=
selectTechStats4
.
Replace
(
" "
,
""
)
+
"*"
;
if
(!
string
.
IsNullOrEmpty
(
Score4
))
{
data
+=
Score4
.
Replace
(
" "
,
""
)
+
"*"
;
}
else
{
data
+=
""
+
"*"
;
}
if
(!
string
.
IsNullOrEmpty
(
SeasonScore4
))
{
data
+=
SeasonScore4
.
Replace
(
" "
,
""
)
+
";"
;
}
else
{
data
+=
""
+
";"
;
}
}
else
if
(
matchStatsId
==
4
)
{
//第一项
if
(
IsHeight
==
false
)
{
data
+=
"0"
+
"*"
;
}
else
{
data
+=
"1"
+
"*"
;
}
data
+=
selectTechStats
.
Replace
(
" "
,
""
)
+
"*"
;
if
(!
string
.
IsNullOrEmpty
(
Score
))
{
data
+=
Score
.
Replace
(
" "
,
""
)
+
"*"
;
}
else
{
data
+=
""
+
"*"
;
}
if
(!
string
.
IsNullOrEmpty
(
SeasonScore
))
{
data
+=
SeasonScore
.
Replace
(
" "
,
""
)
+
";"
;
}
else
{
data
+=
""
+
";"
;
}
//第二项
if
(
IsHeight1
==
false
)
{
data
+=
"0"
+
"*"
;
}
else
{
data
+=
"1"
+
"*"
;
}
data
+=
selectTechStats1
.
Replace
(
" "
,
""
)
+
"*"
;
if
(!
string
.
IsNullOrEmpty
(
Score1
))
{
data
+=
Score1
.
Replace
(
" "
,
""
)
+
"*"
;
}
else
{
data
+=
""
+
"*"
;
}
if
(!
string
.
IsNullOrEmpty
(
SeasonScore1
))
{
data
+=
SeasonScore1
.
Replace
(
" "
,
""
)
+
";"
;
}
else
{
data
+=
""
+
";"
;
}
//第三项
if
(
IsHeight2
==
false
)
{
data
+=
"0"
+
"*"
;
}
else
{
data
+=
"1"
+
"*"
;
}
data
+=
selectTechStats2
.
Replace
(
" "
,
""
)
+
"*"
;
if
(!
string
.
IsNullOrEmpty
(
Score2
))
{
data
+=
Score2
.
Replace
(
" "
,
""
)
+
"*"
;
}
else
{
data
+=
""
+
"*"
;
}
if
(!
string
.
IsNullOrEmpty
(
SeasonScore2
))
{
data
+=
SeasonScore2
.
Replace
(
" "
,
""
)
+
";"
;
}
else
{
data
+=
""
+
";"
;
}
//第四项
if
(
IsHeight3
==
false
)
{
data
+=
"0"
+
"*"
;
}
else
{
data
+=
"1"
+
"*"
;
}
data
+=
selectTechStats3
.
Replace
(
" "
,
""
)
+
"*"
;
if
(!
string
.
IsNullOrEmpty
(
Score3
))
{
data
+=
Score3
.
Replace
(
" "
,
""
)
+
"*"
;
}
else
{
data
+=
""
+
"*"
;
}
if
(!
string
.
IsNullOrEmpty
(
SeasonScore3
))
{
data
+=
SeasonScore3
.
Replace
(
" "
,
""
)
+
";"
;
}
else
{
data
+=
""
+
";"
;
}
}
else
if
(
matchStatsId
==
3
)
{
//第一项
if
(
IsHeight
==
false
)
{
data
+=
"0"
+
"*"
;
}
else
{
data
+=
"1"
+
"*"
;
}
data
+=
selectTechStats
.
Replace
(
" "
,
""
)
+
"*"
;
if
(!
string
.
IsNullOrEmpty
(
Score
))
{
data
+=
Score
.
Replace
(
" "
,
""
)
+
"*"
;
}
else
{
data
+=
""
+
"*"
;
}
if
(!
string
.
IsNullOrEmpty
(
SeasonScore
))
{
data
+=
SeasonScore
.
Replace
(
" "
,
""
)
+
";"
;
}
else
{
data
+=
""
+
";"
;
}
//第二项
if
(
IsHeight1
==
false
)
{
data
+=
"0"
+
"*"
;
}
else
{
data
+=
"1"
+
"*"
;
}
data
+=
selectTechStats1
.
Replace
(
" "
,
""
)
+
"*"
;
if
(!
string
.
IsNullOrEmpty
(
Score1
))
{
data
+=
Score1
.
Replace
(
" "
,
""
)
+
"*"
;
}
else
{
data
+=
""
+
"*"
;
}
if
(!
string
.
IsNullOrEmpty
(
SeasonScore1
))
{
data
+=
SeasonScore1
.
Replace
(
" "
,
""
)
+
";"
;
}
else
{
data
+=
""
+
";"
;
}
//第三项
if
(
IsHeight2
==
false
)
{
data
+=
"0"
+
"*"
;
}
else
{
data
+=
"1"
+
"*"
;
}
data
+=
selectTechStats2
.
Replace
(
" "
,
""
)
+
"*"
;
if
(!
string
.
IsNullOrEmpty
(
Score2
))
{
data
+=
Score2
.
Replace
(
" "
,
""
)
+
"*"
;
}
else
{
data
+=
""
+
"*"
;
}
if
(!
string
.
IsNullOrEmpty
(
SeasonScore2
))
{
data
+=
SeasonScore2
.
Replace
(
" "
,
""
)
+
";"
;
}
else
{
data
+=
""
+
";"
;
}
}
return
data
;
}
catch
(
Exception
ex
)
{
Log
.
Error
(
ex
.
Message
);
return
""
;
}
}
/// <summary>
/// 刷新数据
/// </summary>
public
void
BtnCommand
()
{
onAirDataModel
=
JsonModel
.
PostOnAirData_Path
(
ScheduleID
);
if
(
onAirDataModel
==
null
)
return
;
MvpHomePlayerCompareNumDictionary
.
Clear
();
MvpVisitPlayerCompareNumDictionary
.
Clear
();
if
(
SelectedIndex
==
0
)
{
foreach
(
var
teamLive
in
onAirDataModel
.
livePlayerStatH
)
{
Utils
.
SetTechStatsInfo
(
this
,
SelectedIndex
,
teamLive
,
null
);
}
}
else
{
foreach
(
var
teamLive
in
onAirDataModel
.
livePlayerStatV
)
{
Utils
.
SetTechStatsInfo
(
this
,
SelectedIndex
,
null
,
teamLive
);
}
}
SetData
(
0
);
}
/// <summary>
/// 设置数据得分
/// </summary>
private
void
SetData
(
int
index
)
{
if
(
SelectPlayer
==
null
)
return
;
if
(
SelectedIndex
==
0
)
{
if
(
MvpHomePlayerCompareNumDictionary
.
ContainsKey
(
SelectPlayer
))
{
var
playSeaSonData
=
MvpHomePlayerCompareNumDictionary
[
SelectPlayer
];
if
(
index
==
1
)
{
//第一项
if
(
playSeaSonData
.
ContainsKey
(
SelectTechStats
))
{
Score
=
playSeaSonData
[
SelectTechStats
];
}
else
{
Score
=
"0"
;
}
}
else
if
(
index
==
2
)
{
//第二项
if
(
playSeaSonData
.
ContainsKey
(
SelectTechStats1
))
{
Score1
=
playSeaSonData
[
SelectTechStats1
];
}
else
{
Score1
=
"0"
;
}
}
else
if
(
index
==
3
)
{
//第三项
if
(
playSeaSonData
.
ContainsKey
(
SelectTechStats2
))
{
Score2
=
playSeaSonData
[
SelectTechStats2
];
}
else
{
Score2
=
"0"
;
}
}
else
if
(
index
==
4
)
{
//第四项
if
(
playSeaSonData
.
ContainsKey
(
SelectTechStats3
))
{
Score3
=
playSeaSonData
[
SelectTechStats3
];
}
else
{
Score3
=
"0"
;
}
}
else
if
(
index
==
5
)
{
//第五项
if
(
playSeaSonData
.
ContainsKey
(
SelectTechStats4
))
{
Score4
=
playSeaSonData
[
SelectTechStats4
];
}
else
{
Score4
=
"0"
;
}
}
else
{
//第一项
if
(
playSeaSonData
.
ContainsKey
(
SelectTechStats
))
{
Score
=
playSeaSonData
[
SelectTechStats
];
}
else
{
Score
=
"0"
;
}
//第二项
if
(
playSeaSonData
.
ContainsKey
(
SelectTechStats1
))
{
Score1
=
playSeaSonData
[
SelectTechStats1
];
}
else
{
Score1
=
"0"
;
}
//第三项
if
(
playSeaSonData
.
ContainsKey
(
SelectTechStats2
))
{
Score2
=
playSeaSonData
[
SelectTechStats2
];
}
else
{
Score2
=
"0"
;
}
//第四项
if
(
playSeaSonData
.
ContainsKey
(
SelectTechStats3
))
{
Score3
=
playSeaSonData
[
SelectTechStats3
];
}
else
{
Score3
=
"0"
;
}
//第五项
if
(
playSeaSonData
.
ContainsKey
(
SelectTechStats4
))
{
Score4
=
playSeaSonData
[
SelectTechStats4
];
}
else
{
Score4
=
"0"
;
}
}
}
}
else
{
if
(
MvpVisitPlayerCompareNumDictionary
.
ContainsKey
(
SelectPlayer
))
{
var
playSeaSonData
=
MvpVisitPlayerCompareNumDictionary
[
SelectPlayer
];
if
(
index
==
1
)
{
//第一项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats
))
{
Score
=
playSeaSonData
[
selectTechStats
];
}
else
{
Score
=
"0"
;
}
}
else
if
(
index
==
2
)
{
//第二项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats1
))
{
Score1
=
playSeaSonData
[
selectTechStats1
];
}
else
{
Score1
=
"0"
;
}
}
else
if
(
index
==
3
)
{
//第三项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats2
))
{
Score2
=
playSeaSonData
[
selectTechStats2
];
}
else
{
Score2
=
"0"
;
}
}
else
if
(
index
==
4
)
{
//第四项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats3
))
{
Score3
=
playSeaSonData
[
selectTechStats3
];
}
else
{
Score3
=
"0"
;
}
}
else
if
(
index
==
5
)
{
//第五项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats4
))
{
Score4
=
playSeaSonData
[
selectTechStats4
];
}
else
{
Score4
=
"0"
;
}
}
else
{
//第一项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats
))
{
Score
=
playSeaSonData
[
selectTechStats
];
}
else
{
Score
=
"0"
;
}
//第二项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats1
))
{
Score1
=
playSeaSonData
[
selectTechStats1
];
}
else
{
Score1
=
"0"
;
}
//第三项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats2
))
{
Score2
=
playSeaSonData
[
selectTechStats2
];
}
else
{
Score2
=
"0"
;
}
//第四项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats3
))
{
Score3
=
playSeaSonData
[
selectTechStats3
];
}
else
{
Score3
=
"0"
;
}
//第五项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats4
))
{
Score4
=
playSeaSonData
[
selectTechStats4
];
}
else
{
Score4
=
"0"
;
}
}
}
}
if
(
SelectPlayer
!=
null
)
{
if
(
CNAliasPlayerSportsDictionary
.
ContainsKey
(
SelectPlayer
))
{
var
playSeaSonData
=
CNAliasPlayerSportsDictionary
[
SelectPlayer
];
if
(
index
==
1
)
{
//第一项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats
))
{
SeasonScore
=
playSeaSonData
[
selectTechStats
];
}
else
{
SeasonScore
=
"0"
;
}
}
else
if
(
index
==
2
)
{
//第二项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats1
))
{
SeasonScore1
=
playSeaSonData
[
selectTechStats1
];
}
else
{
SeasonScore1
=
"0"
;
}
}
else
if
(
index
==
3
)
{
//第三项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats2
))
{
SeasonScore2
=
playSeaSonData
[
selectTechStats2
];
}
else
{
SeasonScore2
=
"0"
;
}
}
else
if
(
index
==
4
)
{
//第四项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats3
))
{
SeasonScore3
=
playSeaSonData
[
selectTechStats3
];
}
else
{
SeasonScore3
=
"0"
;
}
}
else
if
(
index
==
5
)
{
//第五项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats4
))
{
SeasonScore4
=
playSeaSonData
[
selectTechStats4
];
}
else
{
SeasonScore4
=
"0"
;
}
}
else
{
//第一项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats
))
{
SeasonScore
=
playSeaSonData
[
selectTechStats
];
}
else
{
SeasonScore
=
"0"
;
}
//第二项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats1
))
{
SeasonScore1
=
playSeaSonData
[
selectTechStats1
];
}
else
{
SeasonScore1
=
"0"
;
}
//第三项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats2
))
{
SeasonScore2
=
playSeaSonData
[
selectTechStats2
];
}
else
{
SeasonScore2
=
"0"
;
}
//第四项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats3
))
{
SeasonScore3
=
playSeaSonData
[
selectTechStats3
];
}
else
{
SeasonScore3
=
"0"
;
}
//第五项
if
(
playSeaSonData
.
ContainsKey
(
selectTechStats4
))
{
SeasonScore4
=
playSeaSonData
[
selectTechStats4
];
}
else
{
SeasonScore4
=
"0"
;
}
}
}
}
}
static
ObservableCollection
<
string
>
listTechStats
=
new
ObservableCollection
<
string
>()
{
"得分"
,
"篮板"
,
"助攻"
,
"抢断"
,
"盖帽"
,
"上场时间"
,
"投篮命中率"
,
"两分命中率"
,
"三分命中率"
,
"罚球命中率"
,
"篮下投篮命中率"
,
"中距离投篮命中率"
,
"三分"
,
"两分"
,
"两分区"
,
"三分区"
,
"三秒区"
,
"罚球"
,
"失误"
,
"犯规"
,
"三分得分"
};
#
region
第一项数据
/// <summary>
/// 是否高亮
/// </summary>
private
bool
isHeight
;
public
bool
IsHeight
{
get
{
return
isHeight
;
}
set
{
isHeight
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
IsHeight
));
}
}
/// <summary>
/// 是否显示
/// </summary>
private
Visibility
isCheckVisible
;
public
Visibility
IsCheckVisible
{
get
{
return
isCheckVisible
;
}
set
{
isCheckVisible
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
IsCheckVisible
));
}
}
/// <summary>
/// 技术统计
/// </summary>
private
ObservableCollection
<
string
>
techStats
=
listTechStats
;
public
ObservableCollection
<
string
>
TechStats
{
get
{
return
techStats
;
}
set
{
techStats
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TechStats
));
}
}
/// <summary>
/// 选中的值
/// </summary>
private
string
selectTechStats
=
"得分"
;
public
string
SelectTechStats
{
get
{
return
selectTechStats
;
}
set
{
selectTechStats
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectTechStats
));
SetData
(
1
);
}
}
/// <summary>
/// 技术统计是否可见
/// </summary>
private
Visibility
techStatsVisible
;
public
Visibility
TechStatsVisible
{
get
{
return
techStatsVisible
;
}
set
{
techStatsVisible
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TechStatsVisible
));
}
}
/// <summary>
/// 得分
/// </summary>
private
string
score
;
public
string
Score
{
get
{
return
score
;
}
set
{
score
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Score
));
}
}
/// <summary>
/// 得分是否可见
/// </summary>
private
Visibility
scoreVisible
;
public
Visibility
ScoreVisible
{
get
{
return
scoreVisible
;
}
set
{
scoreVisible
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
ScoreVisible
));
}
}
/// <summary>
/// 赛季得分
/// </summary>
private
string
seasonScore
;
public
string
SeasonScore
{
get
{
return
seasonScore
;
}
set
{
seasonScore
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SeasonScore
));
}
}
/// <summary>
/// 赛季得分是否可见
/// </summary>
private
Visibility
seasonScoreVisible
;
public
Visibility
SeasonScoreVisible
{
get
{
return
seasonScoreVisible
;
}
set
{
seasonScoreVisible
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SeasonScoreVisible
));
}
}
#
endregion
#
region
第二项数据
/// <summary>
/// 是否高亮
/// </summary>
private
bool
isHeight1
;
public
bool
IsHeight1
{
get
{
return
isHeight1
;
}
set
{
isHeight1
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
IsHeight1
));
}
}
/// <summary>
/// 是否显示
/// </summary>
private
Visibility
isCheckVisible1
;
public
Visibility
IsCheckVisible1
{
get
{
return
isCheckVisible1
;
}
set
{
isCheckVisible1
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
IsCheckVisible1
));
}
}
/// <summary>
/// 技术统计
/// </summary>
private
ObservableCollection
<
string
>
techStats1
=
listTechStats
;
public
ObservableCollection
<
string
>
TechStats1
{
get
{
return
techStats1
;
}
set
{
techStats1
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TechStats1
));
}
}
/// <summary>
/// 选中的值
/// </summary>
private
string
selectTechStats1
=
"篮板"
;
public
string
SelectTechStats1
{
get
{
return
selectTechStats1
;
}
set
{
selectTechStats1
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectTechStats1
));
SetData
(
2
);
}
}
/// <summary>
/// 技术统计是否可见
/// </summary>
private
Visibility
techStatsVisible1
;
public
Visibility
TechStatsVisible1
{
get
{
return
techStatsVisible1
;
}
set
{
techStatsVisible1
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TechStatsVisible1
));
}
}
/// <summary>
/// 得分
/// </summary>
private
string
score1
;
public
string
Score1
{
get
{
return
score1
;
}
set
{
score1
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Score1
));
}
}
/// <summary>
/// 得分是否可见
/// </summary>
private
Visibility
scoreVisible1
;
public
Visibility
ScoreVisible1
{
get
{
return
scoreVisible1
;
}
set
{
scoreVisible1
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
ScoreVisible1
));
}
}
/// <summary>
/// 赛季得分
/// </summary>
private
string
seasonScore1
;
public
string
SeasonScore1
{
get
{
return
seasonScore1
;
}
set
{
seasonScore1
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SeasonScore1
));
}
}
/// <summary>
/// 赛季得分是否可见
/// </summary>
private
Visibility
seasonScoreVisible1
;
public
Visibility
SeasonScoreVisible1
{
get
{
return
seasonScoreVisible1
;
}
set
{
seasonScoreVisible1
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SeasonScoreVisible1
));
}
}
#
endregion
#
region
第三项数据
/// <summary>
/// 是否高亮
/// </summary>
private
bool
isHeight2
;
public
bool
IsHeight2
{
get
{
return
isHeight2
;
}
set
{
isHeight2
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
IsHeight2
));
}
}
/// <summary>
/// 是否显示
/// </summary>
private
Visibility
isCheckVisible2
;
public
Visibility
IsCheckVisible2
{
get
{
return
isCheckVisible2
;
}
set
{
isCheckVisible2
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
IsCheckVisible2
));
}
}
/// <summary>
/// 技术统计
/// </summary>
private
ObservableCollection
<
string
>
techStats2
=
listTechStats
;
public
ObservableCollection
<
string
>
TechStats2
{
get
{
return
techStats2
;
}
set
{
techStats2
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TechStats2
));
}
}
/// <summary>
/// 选中的值
/// </summary>
private
string
selectTechStats2
=
"助攻"
;
public
string
SelectTechStats2
{
get
{
return
selectTechStats2
;
}
set
{
selectTechStats2
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectTechStats2
));
SetData
(
3
);
}
}
/// <summary>
/// 技术统计是否可见
/// </summary>
private
Visibility
techStatsVisible2
;
public
Visibility
TechStatsVisible2
{
get
{
return
techStatsVisible2
;
}
set
{
techStatsVisible2
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TechStatsVisible2
));
}
}
/// <summary>
/// 得分
/// </summary>
private
string
score2
;
public
string
Score2
{
get
{
return
score2
;
}
set
{
score2
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Score2
));
}
}
/// <summary>
/// 得分是否可见
/// </summary>
private
Visibility
scoreVisible2
;
public
Visibility
ScoreVisible2
{
get
{
return
scoreVisible2
;
}
set
{
scoreVisible2
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
ScoreVisible2
));
}
}
/// <summary>
/// 赛季得分
/// </summary>
private
string
seasonScore2
;
public
string
SeasonScore2
{
get
{
return
seasonScore2
;
}
set
{
seasonScore2
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SeasonScore2
));
}
}
/// <summary>
/// 赛季得分是否可见
/// </summary>
private
Visibility
seasonScoreVisible2
;
public
Visibility
SeasonScoreVisible2
{
get
{
return
seasonScoreVisible2
;
}
set
{
seasonScoreVisible2
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SeasonScoreVisible2
));
}
}
#
endregion
#
region
第四项数据
/// <summary>
/// 是否高亮
/// </summary>
private
bool
isHeight3
;
public
bool
IsHeight3
{
get
{
return
isHeight3
;
}
set
{
isHeight3
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
IsHeight3
));
}
}
/// <summary>
/// 是否显示
/// </summary>
private
Visibility
isCheckVisible3
;
public
Visibility
IsCheckVisible3
{
get
{
return
isCheckVisible3
;
}
set
{
isCheckVisible3
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
IsCheckVisible3
));
}
}
/// <summary>
/// 技术统计
/// </summary>
private
ObservableCollection
<
string
>
techStats3
=
listTechStats
;
public
ObservableCollection
<
string
>
TechStats3
{
get
{
return
techStats3
;
}
set
{
techStats3
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TechStats3
));
}
}
/// <summary>
/// 选中的值
/// </summary>
private
string
selectTechStats3
=
"盖帽"
;
public
string
SelectTechStats3
{
get
{
return
selectTechStats3
;
}
set
{
selectTechStats3
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectTechStats3
));
SetData
(
4
);
}
}
/// <summary>
/// 技术统计是否可见
/// </summary>
private
Visibility
techStatsVisible3
;
public
Visibility
TechStatsVisible3
{
get
{
return
techStatsVisible3
;
}
set
{
techStatsVisible3
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TechStatsVisible3
));
}
}
/// <summary>
/// 得分
/// </summary>
private
string
score3
;
public
string
Score3
{
get
{
return
score3
;
}
set
{
score3
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Score3
));
}
}
/// <summary>
/// 得分是否可见
/// </summary>
private
Visibility
scoreVisible3
;
public
Visibility
ScoreVisible3
{
get
{
return
scoreVisible3
;
}
set
{
scoreVisible3
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
ScoreVisible3
));
}
}
/// <summary>
/// 赛季得分
/// </summary>
private
string
seasonScore3
;
public
string
SeasonScore3
{
get
{
return
seasonScore3
;
}
set
{
seasonScore3
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SeasonScore3
));
}
}
/// <summary>
/// 赛季得分是否可见
/// </summary>
private
Visibility
seasonScoreVisible3
;
public
Visibility
SeasonScoreVisible3
{
get
{
return
seasonScoreVisible3
;
}
set
{
seasonScoreVisible3
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SeasonScoreVisible3
));
}
}
#
endregion
#
region
第五项数据
/// <summary>
/// 是否高亮
/// </summary>
private
bool
isHeight4
;
public
bool
IsHeight4
{
get
{
return
isHeight4
;
}
set
{
isHeight4
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
IsHeight4
));
}
}
/// <summary>
/// 是否显示
/// </summary>
private
Visibility
isCheckVisible4
;
public
Visibility
IsCheckVisible4
{
get
{
return
isCheckVisible4
;
}
set
{
isCheckVisible4
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
IsCheckVisible4
));
}
}
/// <summary>
/// 技术统计
/// </summary>
private
ObservableCollection
<
string
>
techStats4
=
listTechStats
;
public
ObservableCollection
<
string
>
TechStats4
{
get
{
return
techStats4
;
}
set
{
techStats4
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TechStats4
));
}
}
/// <summary>
/// 选中的值
/// </summary>
private
string
selectTechStats4
=
"抢断"
;
public
string
SelectTechStats4
{
get
{
return
selectTechStats4
;
}
set
{
selectTechStats4
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectTechStats4
));
SetData
(
5
);
}
}
/// <summary>
/// 技术统计是否可见
/// </summary>
private
Visibility
techStatsVisible4
;
public
Visibility
TechStatsVisible4
{
get
{
return
techStatsVisible4
;
}
set
{
techStatsVisible4
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TechStatsVisible4
));
}
}
/// <summary>
/// 得分
/// </summary>
private
string
score4
;
public
string
Score4
{
get
{
return
score4
;
}
set
{
score4
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Score4
));
}
}
/// <summary>
/// 得分是否可见
/// </summary>
private
Visibility
scoreVisible4
;
public
Visibility
ScoreVisible4
{
get
{
return
scoreVisible4
;
}
set
{
scoreVisible4
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
ScoreVisible4
));
}
}
/// <summary>
/// 赛季得分
/// </summary>
private
string
seasonScore4
;
public
string
SeasonScore4
{
get
{
return
seasonScore4
;
}
set
{
seasonScore4
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SeasonScore4
));
}
}
/// <summary>
/// 赛季得分是否可见
/// </summary>
private
Visibility
seasonScoreVisible4
;
public
Visibility
SeasonScoreVisible4
{
get
{
return
seasonScoreVisible4
;
}
set
{
seasonScoreVisible4
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SeasonScoreVisible4
));
}
}
#
endregion
}
}
VIZ.MIGU.CBA.Module/Main/MainView.xaml
View file @
5ab0a699
...
...
@@ -230,6 +230,13 @@
</moduel:NewSinglePlayerView>
</Grid>
</TabItem>
<TabItem Header="MVP球员" FontSize="20">
<Grid>
<moduel:MvpPlayerView>
</moduel:MvpPlayerView>
</Grid>
</TabItem>
...
...
VIZ.MIGU.CBA.Module/VIZ.TVP.CBA.Module.csproj
View file @
5ab0a699
...
...
@@ -131,6 +131,11 @@
<DependentUpon>DateHeaderView.xaml</DependentUpon>
</Compile>
<Compile Include="Main\ViewModel\MainViewModel.cs" />
<Compile Include="MVPPlayer\MvpPlayerPlugin.cs" />
<Compile Include="MVPPlayer\ViewModel\MvpPlayerViewModel.cs" />
<Compile Include="MVPPlayer\View\MvpPlayerView.xaml.cs">
<DependentUpon>MvpPlayerView.xaml</DependentUpon>
</Compile>
<Compile Include="OnAirData\Events.cs" />
<Compile Include="OnAirData\LivePlayerStatH.cs" />
<Compile Include="OnAirData\LivePlayerStatV.cs" />
...
...
@@ -309,6 +314,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MVPPlayer\View\MvpPlayerView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="PlayerCompare\View\NewPlayerComPareView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
...
...
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