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
b6196506
Commit
b6196506
authored
Mar 15, 2023
by
wangonghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交修改bug和足球数据模板
parent
d4b6ec97
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
585 additions
and
83 deletions
+585
-83
VIZ.TVP.FTB.Module/Common/JsonModel.cs
+7
-2
VIZ.TVP.FTB.Module/HeaderPage/ViewModel/DateHeaderViewModel.cs
+2
-42
VIZ.TVP.FTB.Module/Main/View/MainView.xaml
+5
-0
VIZ.TVP.FTB.Module/Setting/httpUrl/ViewModel/HttpUrlConfigViewModel.cs
+56
-35
VIZ.TVP.FTB.Module/ShootPlayerRank/Model/ShootPlayerRank.cs
+7
-0
VIZ.TVP.FTB.Module/ShootPlayerRank/ShootPlayerRankPluginLifeCycle.cs
+49
-0
VIZ.TVP.FTB.Module/ShootPlayerRank/View/ShootPlayerRankView.xaml
+110
-0
VIZ.TVP.FTB.Module/ShootPlayerRank/View/ShootPlayerRankView.xaml.cs
+125
-0
VIZ.TVP.FTB.Module/ShootPlayerRank/ViewModel/ShootPlayerRankViewModel.cs
+214
-0
VIZ.TVP.FTB.Module/VIZ.TVP.FTB.Module.csproj
+10
-4
No files found.
VIZ.TVP.FTB.Module/Common/JsonModel.cs
View file @
b6196506
...
...
@@ -179,16 +179,21 @@ namespace VIZ.TVP.FTB.Module
string
newKey
=
Utils
.
GetKey
(
appID
,
appKey
);
Log
.
Info
(
"访问接口开始时间"
);
string
result
=
JsonHelper
.
Post
(
shootPath
,
dict
,
newKey
);
Log
.
Info
(
"足球球员射手排行==>"
+
result
);
Log
.
Info
(
"足球球员射手排行==>"
+
result
);
JsonSerializerSettings
settings
=
new
JsonSerializerSettings
();
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
Log
.
Info
(
"序列化json开始时间"
);
ShootPlayerRanks
shootPlayerRanks
=
JsonConvert
.
DeserializeObject
<
ShootPlayerRanks
>(
result
,
settings
);
var
sortPlayerShoot
=
shootPlayerRanks
.
playerstats
.
OrderBy
(
a
=>
a
.
rank
).
Take
(
5
).
ToList
();
Log
.
Info
(
"序列化结束时间"
);
var
sortPlayerShoot
=
shootPlayerRanks
.
playerstats
.
Take
(
5
).
ToList
();
shootPlayerRanks
.
playerstats
=
sortPlayerShoot
;
...
...
VIZ.TVP.FTB.Module/HeaderPage/ViewModel/DateHeaderViewModel.cs
View file @
b6196506
...
...
@@ -119,53 +119,13 @@ namespace VIZ.TVP.FTB.Module
selectFootballType
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectFootballType
));
//if(string.IsNullOrEmpty(selectFootballType))
//{
// FDayMatchViewModel.FDayMatchViewModelInstance.FoolballType = "";
// FTeamStandingViewModel.FTeamStandingViewModelInstance.FoolballType = "";
// SeasonId = "";
// FoolballType = "";
// return;
//}
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
"CBA查看选择比赛类型:"
+
selectFootballType
);
FDayMatchViewModel
.
FDayMatchViewModelInstance
.
FoolballType
=
selectFootballType
;
FTeamStandingViewModel
.
FTeamStandingViewModelInstance
.
FoolballType
=
selectFootballType
;
ShootPlayerRankViewModel
.
ShootPlayerRanklInstance
.
FoolballType
=
selectFootballType
;
FoolballType
=
selectFootballType
;
//if (selectFootballType=="英超")
//{
// FDayMatchViewModel.FDayMatchViewModelInstance.SeasonId = AppSetup_InitLiteDB.HttpUrlConfigEntity.EPCSeasonId;
// FTeamStandingViewModel.FTeamStandingViewModelInstance.SeasonId = AppSetup_InitLiteDB.HttpUrlConfigEntity.EPCSeasonId;
// SeasonId= AppSetup_InitLiteDB.HttpUrlConfigEntity.EPCSeasonId;
//}
//else if(selectFootballType == "法甲")
//{
// FDayMatchViewModel.FDayMatchViewModelInstance.SeasonId = AppSetup_InitLiteDB.HttpUrlConfigEntity.FL1SeasonId;
// FTeamStandingViewModel.FTeamStandingViewModelInstance.SeasonId = AppSetup_InitLiteDB.HttpUrlConfigEntity.FL1SeasonId;
// SeasonId = AppSetup_InitLiteDB.HttpUrlConfigEntity.FL1SeasonId;
//}
//else if(selectFootballType == "意甲")
//{
// FDayMatchViewModel.FDayMatchViewModelInstance.SeasonId = AppSetup_InitLiteDB.HttpUrlConfigEntity.ISASeasonId;
// FTeamStandingViewModel.FTeamStandingViewModelInstance.SeasonId = AppSetup_InitLiteDB.HttpUrlConfigEntity.ISASeasonId;
// SeasonId= AppSetup_InitLiteDB.HttpUrlConfigEntity.ISASeasonId;
//}
//else if(selectFootballType == "德甲")
//{
// FDayMatchViewModel.FDayMatchViewModelInstance.SeasonId = AppSetup_InitLiteDB.HttpUrlConfigEntity.LIGASeasonId;
// FTeamStandingViewModel.FTeamStandingViewModelInstance.SeasonId = AppSetup_InitLiteDB.HttpUrlConfigEntity.LIGASeasonId;
// SeasonId= AppSetup_InitLiteDB.HttpUrlConfigEntity.LIGASeasonId;
//}
//else if(selectFootballType == "西甲")
//{
// FDayMatchViewModel.FDayMatchViewModelInstance.SeasonId = AppSetup_InitLiteDB.HttpUrlConfigEntity.SLPSeasonId;
// FTeamStandingViewModel.FTeamStandingViewModelInstance.SeasonId = AppSetup_InitLiteDB.HttpUrlConfigEntity.SLPSeasonId;
// SeasonId = AppSetup_InitLiteDB.HttpUrlConfigEntity.SLPSeasonId;
//}
}
}
...
...
VIZ.TVP.FTB.Module/Main/View/MainView.xaml
View file @
b6196506
...
...
@@ -25,6 +25,11 @@
</module:HttpUrlConfigView>
</TabItem>
<TabItem Header="射手榜">
<module:ShootPlayerRankView>
</module:ShootPlayerRankView>
</TabItem>
</TabControl>
</Grid>
</UserControl>
VIZ.TVP.FTB.Module/Setting/httpUrl/ViewModel/HttpUrlConfigViewModel.cs
View file @
b6196506
...
...
@@ -589,82 +589,103 @@ namespace VIZ.TVP.FTB.Module
{
var
EPCDictSeasons
=
JsonModel
.
Post_MatchSeasonData_Path
(
"英超"
);
foreach
(
var
dict
in
EPCDictSeasons
.
matchseason
)
if
(
EPCDictSeasons
!=
null
)
{
string
seasonNameKey
=
$"
{
dict
.
seasonName
}
_
{
dict
.
seasonId
}
"
;
if
(!
EPCSeasonDict
.
ContainsKey
(
seasonNameKey
))
foreach
(
var
dict
in
EPCDictSeasons
.
matchseason
)
{
EPCSeasonDict
.
Add
(
seasonNameKey
,
dict
.
seasonId
);
string
seasonNameKey
=
$"
{
dict
.
seasonName
}
_
{
dict
.
seasonId
}
"
;
if
(!
EPCSeasonDict
.
ContainsKey
(
seasonNameKey
))
{
EPCSeasonDict
.
Add
(
seasonNameKey
,
dict
.
seasonId
);
}
}
}
EPCSeasons
=
new
ObservableCollection
<
string
>();
EPCSeasons
=
new
ObservableCollection
<
string
>();
EPCSeasons
=
EPCSeasonDict
.
Keys
.
ToObservableCollection
();
}
EPCSeasons
=
EPCSeasonDict
.
Keys
.
ToObservableCollection
();
var
FL1DictSeasons
=
JsonModel
.
Post_MatchSeasonData_Path
(
"法甲"
);
foreach
(
var
dict
in
FL1DictSeasons
.
matchseason
)
if
(
FL1DictSeasons
!=
null
)
{
string
seasonNameKey
=
$"
{
dict
.
seasonName
}
_
{
dict
.
seasonId
}
"
;
if
(!
FL1SeasonDict
.
ContainsKey
(
seasonNameKey
)
)
foreach
(
var
dict
in
FL1DictSeasons
.
matchseason
)
{
FL1SeasonDict
.
Add
(
seasonNameKey
,
dict
.
seasonId
);
string
seasonNameKey
=
$"
{
dict
.
seasonName
}
_
{
dict
.
seasonId
}
"
;
if
(!
FL1SeasonDict
.
ContainsKey
(
seasonNameKey
))
{
FL1SeasonDict
.
Add
(
seasonNameKey
,
dict
.
seasonId
);
}
}
}
FL1Seasons
=
new
ObservableCollection
<
string
>();
FL1Seasons
=
new
ObservableCollection
<
string
>();
FL1Seasons
=
FL1SeasonDict
.
Keys
.
ToObservableCollection
();
}
FL1Seasons
=
FL1SeasonDict
.
Keys
.
ToObservableCollection
();
var
ISADictSeasons
=
JsonModel
.
Post_MatchSeasonData_Path
(
"意甲"
);
foreach
(
var
dict
in
ISADictSeasons
.
matchseason
)
if
(
ISADictSeasons
!=
null
)
{
string
seasonNameKey
=
$"
{
dict
.
seasonName
}
_
{
dict
.
seasonId
}
"
;
if
(!
ISASeasonDict
.
ContainsKey
(
seasonNameKey
))
foreach
(
var
dict
in
ISADictSeasons
.
matchseason
)
{
ISASeasonDict
.
Add
(
seasonNameKey
,
dict
.
seasonId
);
string
seasonNameKey
=
$"
{
dict
.
seasonName
}
_
{
dict
.
seasonId
}
"
;
if
(!
ISASeasonDict
.
ContainsKey
(
seasonNameKey
))
{
ISASeasonDict
.
Add
(
seasonNameKey
,
dict
.
seasonId
);
}
}
}
ISASeasons
=
new
ObservableCollection
<
string
>();
ISASeasons
=
new
ObservableCollection
<
string
>();
ISASeasons
=
ISASeasonDict
.
Keys
.
ToObservableCollection
();
}
ISASeasons
=
ISASeasonDict
.
Keys
.
ToObservableCollection
();
var
LIGADictSeasons
=
JsonModel
.
Post_MatchSeasonData_Path
(
"德甲"
);
foreach
(
var
dict
in
LIGADictSeasons
.
matchseason
)
if
(
LIGADictSeasons
!=
null
)
{
string
seasonNameKey
=
$"
{
dict
.
seasonName
}
_
{
dict
.
seasonId
}
"
;
if
(!
LIGASeasonDict
.
ContainsKey
(
seasonNameKey
))
foreach
(
var
dict
in
LIGADictSeasons
.
matchseason
)
{
LIGASeasonDict
.
Add
(
seasonNameKey
,
dict
.
seasonId
);
string
seasonNameKey
=
$"
{
dict
.
seasonName
}
_
{
dict
.
seasonId
}
"
;
if
(!
LIGASeasonDict
.
ContainsKey
(
seasonNameKey
))
{
LIGASeasonDict
.
Add
(
seasonNameKey
,
dict
.
seasonId
);
}
}
}
LIGASeasons
=
new
ObservableCollection
<
string
>();
LIGASeasons
=
LIGASeasonDict
.
Keys
.
ToObservableCollection
();
LIGASeasons
=
new
ObservableCollection
<
string
>();
LIGASeasons
=
LIGASeasonDict
.
Keys
.
ToObservableCollection
();
}
var
SLPDictSeasons
=
JsonModel
.
Post_MatchSeasonData_Path
(
"西甲"
);
foreach
(
var
dict
in
SLPDictSeasons
.
matchseason
)
if
(
SLPDictSeasons
!=
null
)
{
string
seasonNameKey
=
$"
{
dict
.
seasonName
}
_
{
dict
.
seasonId
}
"
;
if
(!
SLPSeasonDict
.
ContainsKey
(
seasonNameKey
))
foreach
(
var
dict
in
SLPDictSeasons
.
matchseason
)
{
SLPSeasonDict
.
Add
(
seasonNameKey
,
dict
.
seasonId
);
string
seasonNameKey
=
$"
{
dict
.
seasonName
}
_
{
dict
.
seasonId
}
"
;
if
(!
SLPSeasonDict
.
ContainsKey
(
seasonNameKey
))
{
SLPSeasonDict
.
Add
(
seasonNameKey
,
dict
.
seasonId
);
}
}
SLPSeasons
=
new
ObservableCollection
<
string
>();
SLPSeasons
=
SLPSeasonDict
.
Keys
.
ToObservableCollection
();
}
SLPSeasons
=
new
ObservableCollection
<
string
>();
SLPSeasons
=
SLPSeasonDict
.
Keys
.
ToObservableCollection
();
}
catch
(
Exception
ex
)
{
...
...
VIZ.TVP.FTB.Module/ShootPlayerRank/Model/ShootPlayerRank.cs
View file @
b6196506
...
...
@@ -43,5 +43,11 @@ namespace VIZ.TVP.FTB.Module
/// </summary>
public
string
rank
{
get
;
set
;
}
/// <summary>
/// 点球数量
/// </summary>
public
string
PenaltyGoal
{
get
;
set
;
}
=
"0"
;
}
}
\ No newline at end of file
VIZ.TVP.FTB.Module/ShootPlayerRank/ShootPlayerRankPluginLifeCycle.cs
0 → 100644
View file @
b6196506
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
VIZ.Package.Domain
;
namespace
VIZ.TVP.FTB.Module
{
public
class
ShootPlayerRankPluginLifeCycle
:
IPluginLifeCycle
{
/// <summary>
/// 插件ID
/// </summary>
/// <remarks>
/// 插件ID不能包含点号
/// </remarks>
public
const
string
PLUGIN_ID
=
"ShootPlayerRankView"
;
/// <summary>
/// 插件显示名称
/// </summary>
public
const
string
PLUGIN_NAME
=
"射手榜"
;
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
(
ShootPlayerRankView
);
//info.SettingViewType = typeof(DayMatchUI);
return
info
;
}
}
}
VIZ.TVP.FTB.Module/ShootPlayerRank/View/ShootPlayerRankView.xaml
0 → 100644
View file @
b6196506
<UserControl x:Class="VIZ.TVP.FTB.Module.ShootPlayerRankView"
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.FTB.Module"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="650">
<UserControl.Resources>
<ResourceDictionary>
<Style x:Name="gridCenter" TargetType = "{x:Type dxg:GridColumn}" >
<!--列头居中-->
<Setter Property = "HorizontalHeaderContentAlignment" Value = "Center" />
<!--列值居中-->
<Setter Property = "EditSettings" >
<Setter.Value >
<dxe:TextEditSettings HorizontalContentAlignment = "Center" />
</Setter.Value >
</Setter >
</Style >
</ResourceDictionary>
</UserControl.Resources>
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="197*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Width="650" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="70"/>
<ColumnDefinition Width="285"/>
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="140"/>
<!--<ColumnDefinition Width="120"/>-->
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="标题:" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<dxe:TextEdit Grid.Column="1" Width="280" FontSize="16" HorizontalContentAlignment="Left"
HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding Title,Mode=TwoWay }"></dxe:TextEdit>
<WrapPanel Grid.Row="0" Grid.Column="4" HorizontalAlignment="Center" VerticalAlignment="Center">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="30"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Content="加载数据" FontSize="14" Width="90" Height="30" Command="{Binding BtnCmd}" />
<dx:SimpleButton Grid.Row="0" Grid.Column="1" Glyph='/VIZ.TVP.FTB.Module;component/Image/FT/Prompt2525.png' FontSize="16"
Command="{Binding PromptCommand}" HorizontalContentAlignment="Center" Width="30" Height="30" />
</Grid>
</WrapPanel>
</Grid>
</WrapPanel>
<DockPanel Grid.Row="1">
<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= ShootPlayerModel,Mode=TwoWay}">
<dxg:GridColumn FieldName="rank" Header="排名" Width="112" />
<dxg:GridColumn FieldName="playerLogo" Header="球员图片" Width="112"/>
<dxg:GridColumn FieldName="teamLogo" Header="球队国旗" Width="112"/>
<dxg:GridColumn FieldName="figureName" Header="球员名称" Width="112" />
<dxg:GridColumn FieldName="goals" Header="进球数" Width="180" />
<dxg:GridColumn FieldName="PenaltyGoal" Header="点球" Width="100" />
<dxg:GridControl.View>
<dxg:TableView AutoWidth="True" ShowGroupPanel="False"
BorderThickness="0"
ShowFilterPanelMode="Never"
AllowColumnFiltering="False"
AllowSorting="False"
IsColumnMenuEnabled="False" >
</dxg:TableView>
</dxg:GridControl.View>
</dxg:GridControl>
</DockPanel>
</Grid>
</UserControl>
VIZ.TVP.FTB.Module/ShootPlayerRank/View/ShootPlayerRankView.xaml.cs
0 → 100644
View file @
b6196506
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.Service
;
using
VIZ.Package.Storage
;
namespace
VIZ.TVP.FTB.Module
{
/// <summary>
/// Interaction logic for ShootPlayerRankView.xaml
/// </summary>
public
partial
class
ShootPlayerRankView
:
UserControl
,
IPluginView
{
ShootPlayerRankViewModel
vm
=
new
ShootPlayerRankViewModel
();
/// <summary>
/// 操作日志服务
/// </summary>
private
RecordLogService
recordLogService
=
new
RecordLogService
();
public
ShootPlayerRankView
()
{
InitializeComponent
();
WPFHelper
.
BindingViewModel
(
this
,
vm
);
ShootPlayerRankViewModel
.
ShootPlayerRanklInstance
=
vm
;
}
public
void
Dispose
()
{
}
public
void
PageOpend
(
ConnModel
conn
,
PageModel
page
)
{
if
(
conn
.
IsConnected
&&
vm
.
ShootPlayerModel
!=
null
)
{
conn
.
EndpointManager
.
Send
(
String
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"Data"
,
vm
.
CombineData
()));
}
}
public
void
PreviewContinue
(
ConnModel
conn
)
{
}
public
void
PreviewIn
(
ConnModel
conn
)
{
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_PREVIEW_PLAY
);
if
(
conn
.
IsConnected
&&
vm
.
ShootPlayerModel
!=
null
)
{
conn
.
EndpointManager
.
Send
(
String
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"Data"
,
vm
.
CombineData
()));
}
}
public
void
PreviewOut
(
ConnModel
conn
)
{
}
public
void
PreviewUpdate
(
ConnModel
conn
)
{
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_PREVIEW_UPDATE
);
if
(
conn
.
IsConnected
&&
vm
.
ShootPlayerModel
!=
null
)
{
conn
.
EndpointManager
.
Send
(
String
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"Data"
,
vm
.
CombineData
()));
}
}
public
void
TakeContinue
(
ConnModel
conns
)
{
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_TAKE_CONTINUE
);
if
(
conns
.
IsConnected
&&
vm
.
ShootPlayerModel
!=
null
)
{
conns
.
EndpointManager
.
Send
(
VizEngineCommands
.
STAGE_CONTINUE
);
}
}
public
void
TakeOut
(
ConnModel
conns
)
{
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_TAKE_OUT
);
if
(
conns
.
IsConnected
&&
vm
.
ShootPlayerModel
!=
null
)
{
conns
.
EndpointManager
.
Send
(
VizEngineCommands
.
STAGE_CONTINUE
);
}
}
public
void
TakeUpdate
(
ConnModel
conns
)
{
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_TAKE_UPDATE
);
if
(
conns
.
IsConnected
&&
vm
.
ShootPlayerModel
!=
null
)
{
conns
.
EndpointManager
.
Send
(
String
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"Data"
,
vm
.
CombineData
()));
}
}
public
void
TakIn
(
ConnModel
conns
)
{
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
OPERATE_TAKE_TAKE
);
if
(
conns
.
IsConnected
&&
vm
.
ShootPlayerModel
!=
null
)
{
conns
.
EndpointManager
.
Send
(
String
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"Data"
,
vm
.
CombineData
()));
}
}
}
}
VIZ.TVP.FTB.Module/ShootPlayerRank/ViewModel/ShootPlayerRankViewModel.cs
0 → 100644
View file @
b6196506
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
VIZ.Framework.Core
;
namespace
VIZ.TVP.FTB.Module
{
public
class
ShootPlayerRankViewModel
:
ViewModelBase
{
/// <summary>
/// 日志
/// </summary>
private
static
ILog
Log
=
LogManager
.
GetLogger
(
typeof
(
ShootPlayerRankViewModel
));
/// <summary>
///
/// </summary>
public
static
ShootPlayerRankViewModel
ShootPlayerRanklInstance
=
new
ShootPlayerRankViewModel
();
/// <summary>
/// 初始话
/// </summary>
public
ShootPlayerRankViewModel
()
{
Init
();
}
/// <summary>
/// 球员射手榜绑定数据集合
/// </summary>
private
ObservableCollection
<
ShootPlayerRank
>
shootPlayerModel
;
public
ObservableCollection
<
ShootPlayerRank
>
ShootPlayerModel
{
get
{
return
shootPlayerModel
;
}
set
{
shootPlayerModel
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
ShootPlayerModel
));
}
}
public
VCommand
BtnCmd
{
get
;
set
;
}
ShootPlayerRanks
shootPlayerRanks
=
null
;
/// <summary>
/// 刷新球队积分排名
/// </summary>
private
void
BtmCommand
()
{
shootPlayerRanks
=
new
ShootPlayerRanks
();
if
(
FoolballType
==
"英超"
)
{
SeasonId
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
EPCSeasonId
;
}
else
if
(
FoolballType
==
"法甲"
)
{
SeasonId
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
FL1SeasonId
;
}
else
if
(
FoolballType
==
"意甲"
)
{
SeasonId
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
ISASeasonId
;
}
else
if
(
FoolballType
==
"德甲"
)
{
SeasonId
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
LIGASeasonId
;
}
else
if
(
FoolballType
==
"西甲"
)
{
SeasonId
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
SLPSeasonId
;
}
shootPlayerRanks
=
JsonModel
.
Post_ShootPlayerRankData
(
FoolballType
,
SeasonId
);
if
(
shootPlayerRanks
==
null
)
return
;
ShootPlayerModel
=
new
ObservableCollection
<
ShootPlayerRank
>();
foreach
(
var
playerRank
in
shootPlayerRanks
.
playerstats
)
{
playerRank
.
playerLogo
=
playerRank
.
figureName
;
playerRank
.
teamLogo
=
playerRank
.
teamName
;
ShootPlayerModel
.
Add
(
playerRank
);
}
}
/// <summary>
/// 组装积分排名数据上传
/// </summary>
/// <returns></returns>
public
string
CombineData
()
{
try
{
string
data
=
""
;
data
+=
title
;
data
+=
"&"
;
foreach
(
var
tempTeamRankModel
in
ShootPlayerModel
)
{
data
+=
tempTeamRankModel
.
rank
.
ToString
().
Replace
(
" "
,
""
);
data
+=
"*"
;
data
+=
tempTeamRankModel
.
playerLogo
.
Replace
(
" "
,
""
);
data
+=
"*"
;
data
+=
tempTeamRankModel
.
teamLogo
.
Replace
(
" "
,
""
);
data
+=
"*"
;
data
+=
tempTeamRankModel
.
figureName
.
ToString
().
Replace
(
" "
,
""
);
data
+=
"*"
;
data
+=
tempTeamRankModel
.
goals
.
ToString
().
Replace
(
" "
,
""
);
data
+=
"*"
;
data
+=
tempTeamRankModel
.
PenaltyGoal
.
ToString
().
Replace
(
" "
,
""
);
data
+=
";"
;
}
return
data
;
}
catch
(
Exception
ex
)
{
Log
.
Error
(
ex
.
Message
);
return
""
;
}
}
private
string
title
=
"22/23赛季意大利足球超级联赛射手榜"
;
public
string
Title
{
get
{
return
title
;
}
set
{
title
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Title
));
}
}
/// <summary>
/// 足球赛事类型
/// </summary>
public
string
FoolballType
=
""
;
/// <summary>
/// 赛季ID
/// </summary>
public
string
SeasonId
=
""
;
/// <summary>
/// 初始话
/// </summary>
private
void
Init
()
{
BtnCmd
=
new
VCommand
(
BtmCommand
);
PromptCommand
=
new
VCommand
(
PromptCmd
);
FoolballType
=
DateHeaderViewModel
.
FoolballType
;
SeasonId
=
DateHeaderViewModel
.
SeasonId
;
}
#
region
打开更新数据时间日志
/// <summary>
/// 打开数据更新日志
/// </summary>
public
VCommand
PromptCommand
{
get
;
set
;
}
MessageLastRecordDate
messageLastRecordDate
=
new
MessageLastRecordDate
();
private
void
PromptCmd
()
{
MessageLRDateViewModel
vm
=
messageLastRecordDate
.
DataContext
as
MessageLRDateViewModel
;
if
(
shootPlayerRanks
!=
null
)
{
string
LastDate
=
$"射手榜积分接口更新时间:
{
shootPlayerRanks
.
LastPushDataDateTime
}
"
;
vm
.
OnErrorLogMessage
(
LastDate
);
}
messageLastRecordDate
.
Visibility
=
System
.
Windows
.
Visibility
.
Visible
;
messageLastRecordDate
.
WindowState
=
System
.
Windows
.
WindowState
.
Normal
;
}
#
endregion
}
}
VIZ.TVP.FTB.Module/VIZ.TVP.FTB.Module.csproj
View file @
b6196506
...
...
@@ -130,6 +130,11 @@
</Compile>
<Compile Include="ShootPlayerRank\Model\ShootPlayerRank.cs" />
<Compile Include="ShootPlayerRank\Model\ShootPlayerRanks.cs" />
<Compile Include="ShootPlayerRank\ShootPlayerRankPluginLifeCycle.cs" />
<Compile Include="ShootPlayerRank\ViewModel\ShootPlayerRankViewModel.cs" />
<Compile Include="ShootPlayerRank\View\ShootPlayerRankView.xaml.cs">
<DependentUpon>ShootPlayerRankView.xaml</DependentUpon>
</Compile>
<Compile Include="Storge\AppSetup_InitLiteDB.cs" />
<Compile Include="Storge\HttpUrlConfigEntity.cs" />
<Compile Include="Storge\LocalDbContext.cs" />
...
...
@@ -196,10 +201,7 @@
<Name>VIZ.Package.Storage</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="ShootPlayerRank\ViewModel\" />
<Folder Include="ShootPlayerRank\View\" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Page Include="FDayMatch\View\FDayMatchView.xaml">
<SubType>Designer</SubType>
...
...
@@ -225,6 +227,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ShootPlayerRank\View\ShootPlayerRankView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
...
...
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