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
28be732c
Commit
28be732c
authored
Nov 22, 2022
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加版子
parent
96cb7990
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
542 additions
and
271 deletions
+542
-271
VIZ.TVP.Golf.Domain/Enum/ViewKeys.cs
+16
-0
VIZ.TVP.Golf.Domain/Model/TempModel/GroupTempModel.cs
+14
-0
VIZ.TVP.Golf.Module/Main/View/MainView.xaml
+16
-5
VIZ.TVP.Golf.Module/Package/CenterTeamRanking/ViewModel/CenterTeamRankingViewModel.cs
+0
-136
VIZ.TVP.Golf.Module/Package/GroupHoleInfo/ViewModel/GroupHoleInfoViewModel.cs
+3
-0
VIZ.TVP.Golf.Module/Package/GroupRanking/AfterMatchGroupRanking/View/AfterMatchGroupRankingView.xaml
+121
-0
VIZ.TVP.Golf.Module/Package/GroupRanking/AfterMatchGroupRanking/View/AfterMatchGroupRankingView.xaml.cs
+31
-0
VIZ.TVP.Golf.Module/Package/GroupRanking/AfterMatchGroupRanking/ViewModel/AfterMatchGroupRankingViewModel.cs
+37
-0
VIZ.TVP.Golf.Module/Package/GroupRanking/GroupRankingViewModelBase.cs
+80
-51
VIZ.TVP.Golf.Module/Package/TeamRanking/AfterMatchTeamRanking/View/AfterMatchTeamRankingView.xaml
+1
-1
VIZ.TVP.Golf.Module/Package/TeamRanking/AfterMatchTeamRanking/View/AfterMatchTeamRankingView.xaml.cs
+0
-0
VIZ.TVP.Golf.Module/Package/TeamRanking/AfterMatchTeamRanking/ViewModel/AfterMatchTeamRankingViewModel.cs
+0
-0
VIZ.TVP.Golf.Module/Package/TeamRanking/BeforeMatchTeamRanking/View/BeforeMatchTeamRankingView.xaml
+1
-1
VIZ.TVP.Golf.Module/Package/TeamRanking/BeforeMatchTeamRanking/View/BeforeMatchTeamRankingView.xaml.cs
+0
-0
VIZ.TVP.Golf.Module/Package/TeamRanking/BeforeMatchTeamRanking/ViewModel/BeforeMatchTeamRankingViewModel.cs
+0
-0
VIZ.TVP.Golf.Module/Package/TeamRanking/LongTeamRanking/View/LongTeamRankingView.xaml
+51
-34
VIZ.TVP.Golf.Module/Package/TeamRanking/LongTeamRanking/View/LongTeamRankingView.xaml.cs
+4
-4
VIZ.TVP.Golf.Module/Package/TeamRanking/LongTeamRanking/ViewModel/LongTeamRankingViewModel.cs
+37
-0
VIZ.TVP.Golf.Module/Package/TeamRanking/ShortTeamRanking/View/ShortTeamRankingView.xaml
+0
-0
VIZ.TVP.Golf.Module/Package/TeamRanking/ShortTeamRanking/View/ShortTeamRankingView.xaml.cs
+4
-4
VIZ.TVP.Golf.Module/Package/TeamRanking/ShortTeamRanking/ViewModel/ShortTeamRankingViewModel.cs
+65
-0
VIZ.TVP.Golf.Module/Package/TeamRanking/TeamRankingViewModelBase.cs
+13
-12
VIZ.TVP.Golf.Module/VIZ.TVP.Golf.Module.csproj
+32
-23
VIZ.TVP.Golf/VIZ.TVP.Golf.csproj
+16
-0
VIZ.TVP.Golf/images/AfterMatchGroupRanking.jpg
+0
-0
VIZ.TVP.Golf/images/BeforeMatchGroupRanking.jpg
+0
-0
VIZ.TVP.Golf/images/LongTeamRanking.jpg
+0
-0
No files found.
VIZ.TVP.Golf.Domain/Enum/ViewKeys.cs
View file @
28be732c
...
@@ -70,6 +70,22 @@ namespace VIZ.TVP.Golf.Domain
...
@@ -70,6 +70,22 @@ namespace VIZ.TVP.Golf.Domain
public
const
string
AfterMatchTeamRanking
=
"AfterMatchTeamRanking"
;
public
const
string
AfterMatchTeamRanking
=
"AfterMatchTeamRanking"
;
/// <summary>
/// <summary>
/// 短板球队排名
/// </summary>
public
const
string
ShortTeamRanking
=
"ShortTeamRanking"
;
/// <summary>
/// 长版球队排名
/// </summary>
public
const
string
LongTeamRankingView
=
"LongTeamRankingView"
;
/// <summary>
/// 赛后
/// </summary>
public
const
string
AfterMatchGroupRanking
=
"AfterMatchGroupRanking"
;
/// <summary>
/// 人名条
/// 人名条
/// </summary>
/// </summary>
public
const
string
NameBarView
=
"NameBarView"
;
public
const
string
NameBarView
=
"NameBarView"
;
...
...
VIZ.TVP.Golf.Domain/Model/TempModel/GroupTempModel.cs
View file @
28be732c
...
@@ -41,6 +41,20 @@ namespace VIZ.TVP.Golf.Domain
...
@@ -41,6 +41,20 @@ namespace VIZ.TVP.Golf.Domain
#
endregion
#
endregion
#
region
Position
--
排名
private
string
position
;
/// <summary>
/// 排名
/// </summary>
public
string
Position
{
get
{
return
position
;
}
set
{
position
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Position
));
}
}
#
endregion
#
region
Players
--
球员信息
#
region
Players
--
球员信息
private
ObservableCollection
<
PlayerInfoModel
>
players
=
new
ObservableCollection
<
PlayerInfoModel
>();
private
ObservableCollection
<
PlayerInfoModel
>
players
=
new
ObservableCollection
<
PlayerInfoModel
>();
...
...
VIZ.TVP.Golf.Module/Main/View/MainView.xaml
View file @
28be732c
...
@@ -64,11 +64,21 @@
...
@@ -64,11 +64,21 @@
Content="分组洞信息版"></RadioButton>
Content="分组洞信息版"></RadioButton>
<RadioButton x:Name="rb_BottomHoleInfoView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
<RadioButton x:Name="rb_BottomHoleInfoView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="底部洞信息版"></RadioButton>
Content="底部洞信息版"></RadioButton>
<!-- 队伍排名 -->
<Rectangle Height="1" Fill="#44000000" Margin="0,5,0,5"></Rectangle>
<RadioButton x:Name="rb_BeforeMatchTeamRankingView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
<RadioButton x:Name="rb_BeforeMatchTeamRankingView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="赛前队伍排名"></RadioButton>
Content="赛前队伍排名"></RadioButton>
<RadioButton x:Name="rb_AfterMatchTeamRankingView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
<RadioButton x:Name="rb_AfterMatchTeamRankingView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="赛后队伍排名"></RadioButton>
Content="赛后队伍排名"></RadioButton>
<RadioButton x:Name="rb_ShortTeamRankingView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="短版队伍排名"></RadioButton>
<RadioButton x:Name="rb_LongTeamRankingView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="长版队伍排名"></RadioButton>
<Rectangle Height="1" Fill="#44000000" Margin="0,5,0,5"></Rectangle>
<RadioButton x:Name="rb_AfterMatchGroupRankingView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="赛后分组排名"></RadioButton>
<Rectangle Height="1" Fill="#44000000" Margin="0,5,0,5"></Rectangle>
<RadioButton x:Name="rb_NameBarView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
<RadioButton x:Name="rb_NameBarView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="人名条"></RadioButton>
Content="人名条"></RadioButton>
<RadioButton x:Name="rb_NameBarBottomView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
<RadioButton x:Name="rb_NameBarBottomView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
...
@@ -105,17 +115,18 @@
...
@@ -105,17 +115,18 @@
IsSelected="{Binding ElementName=rb_BeforeMatchTeamRankingView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
IsSelected="{Binding ElementName=rb_BeforeMatchTeamRankingView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.AfterMatchTeamRanking}" ViewType="{x:Type local:AfterMatchTeamRankingView}"
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.AfterMatchTeamRanking}" ViewType="{x:Type local:AfterMatchTeamRankingView}"
IsSelected="{Binding ElementName=rb_AfterMatchTeamRankingView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
IsSelected="{Binding ElementName=rb_AfterMatchTeamRankingView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.ShortTeamRanking}" ViewType="{x:Type local:ShortTeamRankingView}"
IsSelected="{Binding ElementName=rb_ShortTeamRankingView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.LongTeamRankingView}" ViewType="{x:Type local:LongTeamRankingView}"
IsSelected="{Binding ElementName=rb_LongTeamRankingView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.AfterMatchGroupRanking}" ViewType="{x:Type local:AfterMatchGroupRankingView}"
IsSelected="{Binding ElementName=rb_AfterMatchGroupRankingView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.NameBarView}" ViewType="{x:Type local:NameBarView}"
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.NameBarView}" ViewType="{x:Type local:NameBarView}"
IsSelected="{Binding ElementName=rb_NameBarView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
IsSelected="{Binding ElementName=rb_NameBarView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.NameBarBottomView}" ViewType="{x:Type local:NameBarBottomView}"
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.NameBarBottomView}" ViewType="{x:Type local:NameBarBottomView}"
IsSelected="{Binding ElementName=rb_NameBarBottomView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
IsSelected="{Binding ElementName=rb_NameBarBottomView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.CenterPlayerRanking}" ViewType="{x:Type local:CenterPlayerRankingView}"
IsSelected="{Binding ElementName=rb_CenterPlayerRanking,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.CenterTeamRanking}" ViewType="{x:Type local:CenterTeamRankingView}"
IsSelected="{Binding ElementName=rb_CenterTeamRanking,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
</fcommon:NavigationControl>
</fcommon:NavigationControl>
</Border>
</Border>
</Grid>
</Grid>
...
...
VIZ.TVP.Golf.Module/Package/CenterTeamRanking/ViewModel/CenterTeamRankingViewModel.cs
deleted
100644 → 0
View file @
96cb7990
using
System
;
using
System.Collections.Generic
;
using
System.Collections.ObjectModel
;
using
System.IO
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Xml.Linq
;
using
VIZ.Framework.Core
;
using
VIZ.TVP.Golf.Domain
;
using
VIZ.TVP.Golf.Storage
;
using
Xceed.Wpf.Toolkit
;
namespace
VIZ.TVP.Golf.Module
{
/// <summary>
/// 包装视图模型 -- 中间队伍排名版
/// </summary>
public
class
CenterTeamRankingViewModel
:
PackageViewModelBase
{
public
CenterTeamRankingViewModel
()
{
// 初始化命令
this
.
InitCommand
();
}
/// <summary>
/// 初始化命令
/// </summary>
private
void
InitCommand
()
{
this
.
LoadLocalDataCommand
=
new
VCommand
(
this
.
LoadLocalData
);
}
// ===================================================================================
// Property
// ===================================================================================
#
region
CurrentRound
--
当前轮次
private
int
currentRound
;
/// <summary>
/// 当前轮次
/// </summary>
public
int
CurrentRound
{
get
{
return
currentRound
;
}
set
{
currentRound
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
CurrentRound
));
}
}
#
endregion
#
region
TotalHole
--
总洞数
private
int
totalHole
;
/// <summary>
/// 总洞数
/// </summary>
public
int
TotalHole
{
get
{
return
totalHole
;
}
set
{
totalHole
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TotalHole
));
}
}
#
endregion
#
region
TeamRankings
--
队伍排名
private
ObservableCollection
<
TeamRealModel
>
teamRankings
;
/// <summary>
/// 队伍排名
/// </summary>
public
ObservableCollection
<
TeamRealModel
>
TeamRankings
{
get
{
return
teamRankings
;
}
set
{
teamRankings
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TeamRankings
));
}
}
#
endregion
#
region
SelectedTeamRanking
--
当前选中的队伍
private
TeamRealModel
selectedTeamRanking
;
/// <summary>
/// 当前选中的队伍
/// </summary>
public
TeamRealModel
SelectedTeamRanking
{
get
{
return
selectedTeamRanking
;
}
set
{
selectedTeamRanking
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectedTeamRanking
));
}
}
#
endregion
// ===================================================================================
// Command
// ===================================================================================
#
region
SendCommand
--
发送命令
/// <summary>
/// 执行发送命令
/// </summary>
protected
override
void
Send
()
{
}
#
endregion
#
region
LoadLocalDataCommand
--
加载本地数据命令
/// <summary>
/// 加载本地数据
/// </summary>
protected
override
void
LoadLocalData
()
{
}
#
endregion
#
region
LoadRemoteDataCommand
--
加载远程数据命令
/// <summary>
/// 加载远程数据
/// </summary>
protected
override
void
LoadRemoteData
()
{
}
#
endregion
}
}
VIZ.TVP.Golf.Module/Package/GroupHoleInfo/ViewModel/GroupHoleInfoViewModel.cs
View file @
28be732c
...
@@ -264,6 +264,9 @@ namespace VIZ.TVP.Golf.Module
...
@@ -264,6 +264,9 @@ namespace VIZ.TVP.Golf.Module
}
}
this
.
GroupHoleTempModels
=
groupHoleTempModels
;
this
.
GroupHoleTempModels
=
groupHoleTempModels
;
// 统计
this
.
Summary
();
}
}
}
}
}
}
VIZ.TVP.Golf.Module/Package/GroupRanking/AfterMatchGroupRanking/View/AfterMatchGroupRankingView.xaml
0 → 100644
View file @
28be732c
<UserControl x:Class="VIZ.TVP.Golf.Module.AfterMatchGroupRankingView"
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"
xmlns:resource="clr-namespace:VIZ.TVP.Golf.Module.Resource;assembly=VIZ.TVP.Golf.Module.Resource"
d:Background="White"
d:DataContext="{d:DesignInstance Type=local:AfterMatchGroupRankingViewModel}"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="1700">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.TVP.Golf.Module.Resource;component/Style/IconButton/IconButton_Default.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
<resource:Round2RoundDetailConverter x:Key="Round2RoundDetailConverter"></resource:Round2RoundDetailConverter>
</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="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>
<TextBlock Text="排名" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Image Width="16" Height="16" Source="/VIZ.TVP.Golf.Module.Resource;component/Icons/refresh_16x16.png"
VerticalAlignment="Top" Margin="0,5,0,0"></Image>
<DataGrid Grid.Column="1" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserSortColumns="False"
ItemsSource="{Binding Path=GroupTempModels}">
<DataGrid.Columns>
<DataGridTextColumn Header="排名" Width="100" Binding="{Binding Path=Position}" IsReadOnly="True"></DataGridTextColumn>
<DataGridTextColumn Header="成员" Width="200" Binding="{Binding Path=PlayersDisplayName}"></DataGridTextColumn>
<DataGridTextColumn Header="总杆数" Width="100" Binding="{Binding Path=PlayersStrokes}"></DataGridTextColumn>
<DataGridComboBoxColumn x:Name="Logo" Header="Logo" Width="240"
ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.TeamLogos}}"
SelectedValueBinding="{Binding Path=TeamLogo}"></DataGridComboBoxColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</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/AfterMatchGroupRanking.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/GroupRanking/AfterMatchGroupRanking/View/AfterMatchGroupRankingView.xaml.cs
0 → 100644
View file @
28be732c
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>
/// AfterMatchGroupRankingView.xaml 的交互逻辑
/// </summary>
public
partial
class
AfterMatchGroupRankingView
:
UserControl
{
public
AfterMatchGroupRankingView
()
{
InitializeComponent
();
WPFHelper
.
BindingViewModel
(
this
,
new
AfterMatchGroupRankingViewModel
());
}
}
}
VIZ.TVP.Golf.Module/Package/GroupRanking/AfterMatchGroupRanking/ViewModel/AfterMatchGroupRankingViewModel.cs
0 → 100644
View file @
28be732c
using
System
;
using
System.Collections.Generic
;
using
System.Collections.ObjectModel
;
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
AfterMatchGroupRankingViewModel
:
GroupRankingViewModelBase
{
public
AfterMatchGroupRankingViewModel
()
{
}
// ===================================================================================
// Property
// ===================================================================================
// ===================================================================================
// Command
// ===================================================================================
// ===================================================================================
// Private Function
// ===================================================================================
}
}
\ No newline at end of file
VIZ.TVP.Golf.Module/Package/
CenterPlayerRanking/ViewModel/CenterPlayerRankingViewModel
.cs
→
VIZ.TVP.Golf.Module/Package/
GroupRanking/GroupRankingViewModelBase
.cs
View file @
28be732c
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Collections.ObjectModel
;
using
System.Collections.ObjectModel
;
using
System.IO
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
System.
Xml.Linq
;
using
System.
Windows
;
using
VIZ.Framework.Core
;
using
VIZ.Framework.Core
;
using
VIZ.TVP.Golf.Domain
;
using
VIZ.TVP.Golf.Domain
;
using
VIZ.TVP.Golf.Storage
;
using
Xceed.Wpf.Toolkit
;
namespace
VIZ.TVP.Golf.Module
namespace
VIZ.TVP.Golf.Module
{
{
/// <summary>
/// <summary>
///
包装视图模型 -- 中间球员排名版
///
分组排名视图模型基类
/// </summary>
/// </summary>
public
class
CenterPlayerRankingViewModel
:
PackageViewModelBase
public
abstract
class
GroupRankingViewModelBase
:
PackageViewModelBase
{
{
public
CenterPlayerRankingViewModel
()
{
// 初始化命令
this
.
InitCommand
();
}
/// <summary>
/// 初始化命令
/// </summary>
private
void
InitCommand
()
{
this
.
LoadLocalDataCommand
=
new
VCommand
(
this
.
LoadLocalData
);
}
// ===================================================================================
// ===================================================================================
// Property
// Property
// ===================================================================================
// ===================================================================================
#
region
CurrentRound
--
当前轮次
#
region
GroupTempModels
--
分组临时模型集合
private
int
currentRound
;
private
ObservableCollection
<
GroupTempModel
>
groupTempModels
;
/// <summary>
/// <summary>
///
当前轮次
///
分组临时模型集合
/// </summary>
/// </summary>
public
int
CurrentRound
public
ObservableCollection
<
GroupTempModel
>
GroupTempModels
{
{
get
{
return
currentRound
;
}
get
{
return
groupTempModels
;
}
set
{
currentRound
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
CurrentRound
));
}
set
{
groupTempModels
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
GroupTempModels
));
}
}
}
#
endregion
#
endregion
#
region
TotalHole
--
总洞数
#
region
SelectedRound
--
选中的轮次
private
int
totalHole
;
private
int
selectedRound
;
/// <summary>
/// <summary>
///
总洞数
///
选中的轮次信息
/// </summary>
/// </summary>
public
int
TotalHole
public
int
SelectedRound
{
{
get
{
return
totalHole
;
}
get
{
return
selectedRound
;
}
set
{
totalHole
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TotalHole
));
}
set
{
selectedRound
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectedRound
));
}
}
}
#
endregion
#
endregion
#
region
PlayerRankings
--
球员排名
private
ObservableCollection
<
PlayerRealModel
>
playerRankings
;
/// <summary>
/// 球员排名
/// </summary>
public
ObservableCollection
<
PlayerRealModel
>
PlayerRankings
{
get
{
return
playerRankings
;
}
set
{
playerRankings
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
PlayerRankings
));
}
}
#
endregion
// ===================================================================================
// Command
// ===================================================================================
// ===================================================================================
// ===================================================================================
// Command
// Command
// ===================================================================================
// ===================================================================================
...
@@ -98,7 +63,6 @@ namespace VIZ.TVP.Golf.Module
...
@@ -98,7 +63,6 @@ namespace VIZ.TVP.Golf.Module
#
endregion
#
endregion
#
region
LoadLocalDataCommand
--
加载本地数据命令
#
region
LoadLocalDataCommand
--
加载本地数据命令
/// <summary>
/// <summary>
...
@@ -106,7 +70,19 @@ namespace VIZ.TVP.Golf.Module
...
@@ -106,7 +70,19 @@ namespace VIZ.TVP.Golf.Module
/// </summary>
/// </summary>
protected
override
void
LoadLocalData
()
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
.
UpdateGroupTempModels
(
list
);
}
}
#
endregion
#
endregion
...
@@ -118,9 +94,62 @@ namespace VIZ.TVP.Golf.Module
...
@@ -118,9 +94,62 @@ namespace VIZ.TVP.Golf.Module
/// </summary>
/// </summary>
protected
override
void
LoadRemoteData
()
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
.
UpdateGroupTempModels
(
list
);
});
});
}
}
#
endregion
#
endregion
// ===================================================================================
// Private Function
// ===================================================================================
/// <summary>
/// 更新组临时模型
/// </summary>
/// <param name="list">球员真实模型</param>
protected
virtual
void
UpdateGroupTempModels
(
List
<
PlayerRealModel
>
list
)
{
ObservableCollection
<
GroupTempModel
>
groupTempModels
=
new
ObservableCollection
<
GroupTempModel
>();
var
groups
=
ApplicationDomainEx
.
PlayerInfos
.
GroupBy
(
p
=>
p
.
Group
);
foreach
(
var
group
in
groups
)
{
foreach
(
var
team_group
in
group
.
GroupBy
(
p
=>
p
.
TeamID
))
{
GroupTempModel
temp_model
=
new
GroupTempModel
();
temp_model
.
Group
=
group
.
Key
;
foreach
(
PlayerInfoModel
player
in
team_group
)
{
temp_model
.
Players
.
Add
(
player
);
}
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
.
PlayersStrokes
=
list
.
Where
(
p
=>
player_ids
.
Contains
(
p
.
PlayerID
)).
Sum
(
p
=>
p
.
Strokes
).
ToString
();
temp_model
.
TeamLogo
=
ApplicationDomainEx
.
TeamInfos
.
FirstOrDefault
(
p
=>
p
.
TeamID
==
team_group
.
Key
)?.
Logo
;
groupTempModels
.
Add
(
temp_model
);
}
}
this
.
GroupTempModels
=
groupTempModels
;
}
}
}
}
}
VIZ.TVP.Golf.Module/Package/AfterMatchTeamRanking/View/AfterMatchTeamRankingView.xaml
→
VIZ.TVP.Golf.Module/Package/
TeamRanking/
AfterMatchTeamRanking/View/AfterMatchTeamRankingView.xaml
View file @
28be732c
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
<Image Width="16" Height="16" Source="/VIZ.TVP.Golf.Module.Resource;component/Icons/refresh_16x16.png"
<Image Width="16" Height="16" Source="/VIZ.TVP.Golf.Module.Resource;component/Icons/refresh_16x16.png"
VerticalAlignment="Top" Margin="0,5,0,0"></Image>
VerticalAlignment="Top" Margin="0,5,0,0"></Image>
<DataGrid Grid.Column="1" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserSortColumns="False"
<DataGrid Grid.Column="1" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserSortColumns="False"
ItemsSource="{Binding Path=
Group
TempModels}">
ItemsSource="{Binding Path=
Team
TempModels}">
<DataGrid.Columns>
<DataGrid.Columns>
<DataGridTextColumn Header="排名" Width="100" Binding="{Binding Path=Position}" IsReadOnly="True"></DataGridTextColumn>
<DataGridTextColumn Header="排名" Width="100" Binding="{Binding Path=Position}" IsReadOnly="True"></DataGridTextColumn>
<DataGridTextColumn Header="队伍名称" Width="100" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="队伍名称" Width="100" Binding="{Binding Path=Name}"></DataGridTextColumn>
...
...
VIZ.TVP.Golf.Module/Package/AfterMatchTeamRanking/View/AfterMatchTeamRankingView.xaml.cs
→
VIZ.TVP.Golf.Module/Package/
TeamRanking/
AfterMatchTeamRanking/View/AfterMatchTeamRankingView.xaml.cs
View file @
28be732c
File moved
VIZ.TVP.Golf.Module/Package/AfterMatchTeamRanking/ViewModel/AfterMatchTeamRankingViewModel.cs
→
VIZ.TVP.Golf.Module/Package/
TeamRanking/
AfterMatchTeamRanking/ViewModel/AfterMatchTeamRankingViewModel.cs
View file @
28be732c
File moved
VIZ.TVP.Golf.Module/Package/BeforeMatchTeamRanking/View/BeforeMatchTeamRankingView.xaml
→
VIZ.TVP.Golf.Module/Package/
TeamRanking/
BeforeMatchTeamRanking/View/BeforeMatchTeamRankingView.xaml
View file @
28be732c
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
<Image Width="16" Height="16" Source="/VIZ.TVP.Golf.Module.Resource;component/Icons/refresh_16x16.png"
<Image Width="16" Height="16" Source="/VIZ.TVP.Golf.Module.Resource;component/Icons/refresh_16x16.png"
VerticalAlignment="Top" Margin="0,5,0,0"></Image>
VerticalAlignment="Top" Margin="0,5,0,0"></Image>
<DataGrid Grid.Column="1" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserSortColumns="False"
<DataGrid Grid.Column="1" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserSortColumns="False"
ItemsSource="{Binding Path=
Group
TempModels}">
ItemsSource="{Binding Path=
Team
TempModels}">
<DataGrid.Columns>
<DataGrid.Columns>
<DataGridTextColumn Header="排名" Width="100" Binding="{Binding Path=Position}" IsReadOnly="True"></DataGridTextColumn>
<DataGridTextColumn Header="排名" Width="100" Binding="{Binding Path=Position}" IsReadOnly="True"></DataGridTextColumn>
<DataGridTextColumn Header="队伍名称" Width="100" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="队伍名称" Width="100" Binding="{Binding Path=Name}"></DataGridTextColumn>
...
...
VIZ.TVP.Golf.Module/Package/BeforeMatchTeamRanking/View/BeforeMatchTeamRankingView.xaml.cs
→
VIZ.TVP.Golf.Module/Package/
TeamRanking/
BeforeMatchTeamRanking/View/BeforeMatchTeamRankingView.xaml.cs
View file @
28be732c
File moved
VIZ.TVP.Golf.Module/Package/BeforeMatchTeamRanking/ViewModel/BeforeMatchTeamRankingViewModel.cs
→
VIZ.TVP.Golf.Module/Package/
TeamRanking/
BeforeMatchTeamRanking/ViewModel/BeforeMatchTeamRankingViewModel.cs
View file @
28be732c
File moved
VIZ.TVP.Golf.Module/Package/
CenterPlayerRanking/View/CenterPlayer
RankingView.xaml
→
VIZ.TVP.Golf.Module/Package/
TeamRanking/LongTeamRanking/View/LongTeam
RankingView.xaml
View file @
28be732c
<UserControl x:Class="VIZ.TVP.Golf.Module.
CenterPlayer
RankingView"
<UserControl x:Class="VIZ.TVP.Golf.Module.
LongTeam
RankingView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
...
@@ -6,16 +6,19 @@
...
@@ -6,16 +6,19 @@
xmlns:local="clr-namespace:VIZ.TVP.Golf.Module"
xmlns:local="clr-namespace:VIZ.TVP.Golf.Module"
xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
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"
xmlns:resource="clr-namespace:VIZ.TVP.Golf.Module.Resource;assembly=VIZ.TVP.Golf.Module.Resource"
d:Background="White"
d:Background="White"
d:DataContext="{d:DesignInstance Type=local:
CenterPlayer
RankingViewModel}"
d:DataContext="{d:DesignInstance Type=local:
LongTeam
RankingViewModel}"
mc:Ignorable="d"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="1
2
00">
d:DesignHeight="800" d:DesignWidth="1
7
00">
<UserControl.Resources>
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.TVP.Golf.Module.Resource;component/Style/IconButton/IconButton_Default.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.TVP.Golf.Module.Resource;component/Style/IconButton/IconButton_Default.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.Framework.Common.Resource;component/Style/ListBox/ListBox_None.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary.MergedDictionaries>
<resource:Round2RoundDetailConverter x:Key="Round2RoundDetailConverter"></resource:Round2RoundDetailConverter>
</ResourceDictionary>
</ResourceDictionary>
</UserControl.Resources>
</UserControl.Resources>
...
@@ -32,54 +35,68 @@
...
@@ -32,54 +35,68 @@
<Border Grid.Row="0" Grid.ColumnSpan="2" BorderBrush="#44000000" Background="#66b6f2e3" BorderThickness="1" Margin="5" Padding="5">
<Border Grid.Row="0" Grid.ColumnSpan="2" BorderBrush="#44000000" Background="#66b6f2e3" BorderThickness="1" Margin="5" Padding="5">
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal">
<fcommon:IconButton Style="{StaticResource IconButton_Default}"
<fcommon:IconButton Style="{StaticResource IconButton_Default}"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/remote_16x16.png"
Content="加载远程数据"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/db_16x16.png"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/db_16x16.png"
Content="加载本地数据"
Content="加载本地数据" Command="{Binding Path=LoadLocalDataCommand}"></fcommon:IconButton>
Command="{Binding Path=LoadLocalDataCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
<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"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/refresh_16x16.png"
Content="刷新
排名
"></fcommon:IconButton>
Content="刷新
实时数据" Command="{Binding Path=LoadRemoteDataCommand}
"></fcommon:IconButton>
</StackPanel>
</StackPanel>
</Border>
</Border>
<!-- 版子信息 -->
<!-- 版子信息 -->
<Border Grid.Row="1" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Border Grid.Row="1" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid>
<Grid>
<Grid.RowDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="100"></RowDefinition>
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<!-- 轮次信息 -->
<GroupBox Padding="10">
<GroupBox.Header>
<TextBlock Text="轮次信息" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<Grid>
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="8
0"></ColumnDefinition>
<ColumnDefinition Width="3
0"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<!-- 轮次 -->
<TextBlock Text="轮次:" VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="1"></TextBlock>
<TextBlock Text="轮次:" HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,10,0" Grid.Row="0"></TextBlock>
<StackPanel Grid.Column="1" Margin="10,0,10,0" HorizontalAlignment="Left" Orientation="Horizontal">
<TextBox Grid.Column="1" Padding="3" AcceptsReturn="False" Margin="5" Height="30"
<ComboBox Height="30" Width="220" VerticalContentAlignment="Center"
TextWrapping="NoWrap" VerticalContentAlignment="Center"
SelectedValue="{Binding Path=SelectedRound,Mode=TwoWay}"
Text="{Binding Path=Text,Mode=TwoWay}"></TextBox>
ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.Rounds}}"></ComboBox>
<!-- 总洞数 -->
</StackPanel>
<TextBlock Text="总洞数:" HorizontalAlignment="Right" VerticalAlignment="Center"
</Grid>
Margin="0,0,10,0" Grid.Row="1"></TextBlock>
</GroupBox>
<toolkit:IntegerUpDown Grid.Column="1" Grid.Row="1" Padding="3" Margin="5" Height="30"
VerticalContentAlignment="Center"
Value="{Binding Path=Text,Mode=TwoWay}"></toolkit:IntegerUpDown>
<!-- 排名 -->
<!-- 排名 -->
<TextBlock Text="排名:" HorizontalAlignment="Right" VerticalAlignment="Top"
<GroupBox Padding="10" Grid.Row="1">
Margin="0,10,10,0" Grid.Row="2"></TextBlock>
<GroupBox.Header>
<DataGrid Grid.Row="2" Grid.Column="1" Margin="5,0,5,0" AutoGenerateColumns="False"
<TextBlock Text="排名" FontSize="18" FontWeight="Bold"></TextBlock>
ItemsSource="{Binding Path=PlayerRankings}" SelectionMode="Single">
</GroupBox.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Image Width="16" Height="16" Source="/VIZ.TVP.Golf.Module.Resource;component/Icons/refresh_16x16.png"
VerticalAlignment="Top" Margin="0,5,0,0"></Image>
<DataGrid Grid.Column="1" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserSortColumns="False"
ItemsSource="{Binding Path=TeamTempModels}">
<DataGrid.Columns>
<DataGrid.Columns>
<DataGridTextColumn Header="排名" Width="80" Binding="{Binding Path=Position}" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="排名" Width="100" Binding="{Binding Path=Position}" IsReadOnly="True"></DataGridTextColumn>
<DataGridTextColumn Header="Logo" Width="120" Binding="{Binding Path=TeamLogo}" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="队伍名称" Width="100" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="名字" Width="120" Binding="{Binding Path=Name}" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="总杆数" Width="100" Binding="{Binding Path=TotalStrokes}"></DataGridTextColumn>
<DataGridTextColumn Header="杆数" Width="80" Binding="{Binding Path=Strokes}" CanUserSort="False"></DataGridTextColumn>
<DataGridComboBoxColumn x:Name="c1" Header="Logo" Width="240"
ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.TeamLogos}}"
SelectedValueBinding="{Binding Path=Logo}"></DataGridComboBoxColumn>
</DataGrid.Columns>
</DataGrid.Columns>
</DataGrid>
</DataGrid>
</Grid>
</Grid>
</GroupBox>
</Grid>
</Border>
</Border>
<!-- 示意图 -->
<!-- 示意图 -->
<Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
...
@@ -88,7 +105,7 @@
...
@@ -88,7 +105,7 @@
<RowDefinition Height="300"></RowDefinition>
<RowDefinition Height="300"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<Image Source="pack://SiteOfOrigin:,,,/images/
CenterPlayer
Ranking.jpg" />
<Image Source="pack://SiteOfOrigin:,,,/images/
LongTeam
Ranking.jpg" />
<StackPanel Orientation="Horizontal" Grid.Row="1">
<StackPanel Orientation="Horizontal" Grid.Row="1">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
...
...
VIZ.TVP.Golf.Module/Package/
CenterPlayerRanking/View/CenterPlayer
RankingView.xaml.cs
→
VIZ.TVP.Golf.Module/Package/
TeamRanking/LongTeamRanking/View/LongTeam
RankingView.xaml.cs
View file @
28be732c
...
@@ -17,15 +17,15 @@ using VIZ.Framework.Core;
...
@@ -17,15 +17,15 @@ using VIZ.Framework.Core;
namespace
VIZ.TVP.Golf.Module
namespace
VIZ.TVP.Golf.Module
{
{
/// <summary>
/// <summary>
///
CenterPlayer
RankingView.xaml 的交互逻辑
///
ShortTeam
RankingView.xaml 的交互逻辑
/// </summary>
/// </summary>
public
partial
class
CenterPlayer
RankingView
:
UserControl
public
partial
class
LongTeam
RankingView
:
UserControl
{
{
public
CenterPlayer
RankingView
()
public
LongTeam
RankingView
()
{
{
InitializeComponent
();
InitializeComponent
();
WPFHelper
.
BindingViewModel
(
this
,
new
CenterPlayer
RankingViewModel
());
WPFHelper
.
BindingViewModel
(
this
,
new
LongTeam
RankingViewModel
());
}
}
}
}
}
}
VIZ.TVP.Golf.Module/Package/TeamRanking/LongTeamRanking/ViewModel/LongTeamRankingViewModel.cs
0 → 100644
View file @
28be732c
using
System
;
using
System.Collections.Generic
;
using
System.Collections.ObjectModel
;
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
LongTeamRankingViewModel
:
TeamRankingViewModelBase
{
public
LongTeamRankingViewModel
()
{
}
// ===================================================================================
// Property
// ===================================================================================
// ===================================================================================
// Command
// ===================================================================================
// ===================================================================================
// Private Function
// ===================================================================================
}
}
VIZ.TVP.Golf.Module/Package/
CenterTeamRanking/View/Center
TeamRankingView.xaml
→
VIZ.TVP.Golf.Module/Package/
TeamRanking/ShortTeamRanking/View/Short
TeamRankingView.xaml
View file @
28be732c
This diff is collapsed.
Click to expand it.
VIZ.TVP.Golf.Module/Package/
CenterTeamRanking/View/Center
TeamRankingView.xaml.cs
→
VIZ.TVP.Golf.Module/Package/
TeamRanking/ShortTeamRanking/View/Short
TeamRankingView.xaml.cs
View file @
28be732c
...
@@ -17,15 +17,15 @@ using VIZ.Framework.Core;
...
@@ -17,15 +17,15 @@ using VIZ.Framework.Core;
namespace
VIZ.TVP.Golf.Module
namespace
VIZ.TVP.Golf.Module
{
{
/// <summary>
/// <summary>
///
Center
TeamRankingView.xaml 的交互逻辑
///
Short
TeamRankingView.xaml 的交互逻辑
/// </summary>
/// </summary>
public
partial
class
Center
TeamRankingView
:
UserControl
public
partial
class
Short
TeamRankingView
:
UserControl
{
{
public
Center
TeamRankingView
()
public
Short
TeamRankingView
()
{
{
InitializeComponent
();
InitializeComponent
();
WPFHelper
.
BindingViewModel
(
this
,
new
Center
TeamRankingViewModel
());
WPFHelper
.
BindingViewModel
(
this
,
new
Short
TeamRankingViewModel
());
}
}
}
}
}
}
VIZ.TVP.Golf.Module/Package/TeamRanking/ShortTeamRanking/ViewModel/ShortTeamRankingViewModel.cs
0 → 100644
View file @
28be732c
using
System
;
using
System.Collections.Generic
;
using
System.Collections.ObjectModel
;
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
ShortTeamRankingViewModel
:
TeamRankingViewModelBase
{
public
ShortTeamRankingViewModel
()
{
}
// ===================================================================================
// Property
// ===================================================================================
// ===================================================================================
// Command
// ===================================================================================
// ===================================================================================
// Private Function
// ===================================================================================
/// <summary>
/// 更新组临时模型
/// </summary>
/// <param name="list">球员真实模型</param>
protected
void
UpdateGroupTempModels
(
List
<
PlayerRealModel
>
list
)
{
ObservableCollection
<
TeamTempModel
>
teamTempModels
=
new
ObservableCollection
<
TeamTempModel
>();
List
<
TeamTempModel
>
temp_list
=
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
();
temp_model
.
TotalStrokes
=
real_players
.
Sum
(
p
=>
p
.
Strokes
).
ToString
();
temp_list
.
Add
(
temp_model
);
}
temp_list
=
temp_list
.
Take
(
5
).
ToList
();
foreach
(
TeamTempModel
temp
in
temp_list
)
{
teamTempModels
.
Add
(
temp
);
}
this
.
TeamTempModels
=
teamTempModels
;
}
}
}
VIZ.TVP.Golf.Module/Package/TeamRankingViewModelBase.cs
→
VIZ.TVP.Golf.Module/Package/TeamRanking
/TeamRanking
ViewModelBase.cs
View file @
28be732c
...
@@ -34,16 +34,16 @@ namespace VIZ.TVP.Golf.Module
...
@@ -34,16 +34,16 @@ namespace VIZ.TVP.Golf.Module
#
endregion
#
endregion
#
region
GroupTempModels
--
分组
临时模型集合
#
region
TeamTempModels
--
队伍
临时模型集合
private
ObservableCollection
<
TeamTempModel
>
group
TempModels
;
private
ObservableCollection
<
TeamTempModel
>
team
TempModels
;
/// <summary>
/// <summary>
/// 分组临时模型集合
/// 分组临时模型集合
/// </summary>
/// </summary>
public
ObservableCollection
<
TeamTempModel
>
Group
TempModels
public
ObservableCollection
<
TeamTempModel
>
Team
TempModels
{
{
get
{
return
group
TempModels
;
}
get
{
return
team
TempModels
;
}
set
{
groupTempModels
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Group
TempModels
));
}
set
{
teamTempModels
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Team
TempModels
));
}
}
}
#
endregion
#
endregion
...
@@ -83,7 +83,7 @@ namespace VIZ.TVP.Golf.Module
...
@@ -83,7 +83,7 @@ namespace VIZ.TVP.Golf.Module
List
<
PlayerRealModel
>
list
=
this
.
realDataService
.
LoadPlayerRealModelFormLocal
(
vm
.
SelectedFile
.
FileName
);
List
<
PlayerRealModel
>
list
=
this
.
realDataService
.
LoadPlayerRealModelFormLocal
(
vm
.
SelectedFile
.
FileName
);
this
.
Update
Group
TempModels
(
list
);
this
.
Update
Team
TempModels
(
list
);
}
}
#
endregion
#
endregion
...
@@ -110,7 +110,7 @@ namespace VIZ.TVP.Golf.Module
...
@@ -110,7 +110,7 @@ namespace VIZ.TVP.Golf.Module
{
{
List
<
PlayerRealModel
>
list
=
this
.
realDataService
.
LoadPlayerRealModelFormLocal
(
fileName
);
List
<
PlayerRealModel
>
list
=
this
.
realDataService
.
LoadPlayerRealModelFormLocal
(
fileName
);
this
.
Update
Group
TempModels
(
list
);
this
.
Update
Team
TempModels
(
list
);
});
});
});
});
}
}
...
@@ -122,12 +122,12 @@ namespace VIZ.TVP.Golf.Module
...
@@ -122,12 +122,12 @@ namespace VIZ.TVP.Golf.Module
// ===================================================================================
// ===================================================================================
/// <summary>
/// <summary>
/// 更新
组
临时模型
/// 更新
队伍
临时模型
/// </summary>
/// </summary>
/// <param name="list">球员真实模型</param>
/// <param name="list">球员真实模型</param>
pr
ivate
void
UpdateGroup
TempModels
(
List
<
PlayerRealModel
>
list
)
pr
otected
virtual
void
UpdateTeam
TempModels
(
List
<
PlayerRealModel
>
list
)
{
{
ObservableCollection
<
TeamTempModel
>
group
TempModels
=
new
ObservableCollection
<
TeamTempModel
>();
ObservableCollection
<
TeamTempModel
>
team
TempModels
=
new
ObservableCollection
<
TeamTempModel
>();
foreach
(
TeamInfoModel
info_model
in
ApplicationDomainEx
.
TeamInfos
)
foreach
(
TeamInfoModel
info_model
in
ApplicationDomainEx
.
TeamInfos
)
{
{
...
@@ -137,10 +137,10 @@ namespace VIZ.TVP.Golf.Module
...
@@ -137,10 +137,10 @@ namespace VIZ.TVP.Golf.Module
var
real_players
=
list
.
Where
(
p
=>
p
.
TeamInfoModel
!=
null
&&
p
.
TeamInfoModel
.
TeamID
==
temp_model
.
TeamID
).
ToList
();
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_model
.
TotalStrokes
=
real_players
.
Sum
(
p
=>
p
.
Strokes
).
ToString
();
group
TempModels
.
Add
(
temp_model
);
team
TempModels
.
Add
(
temp_model
);
}
}
this
.
GroupTempModels
=
group
TempModels
;
this
.
TeamTempModels
=
team
TempModels
;
}
}
}
}
}
}
\ No newline at end of file
VIZ.TVP.Golf.Module/VIZ.TVP.Golf.Module.csproj
View file @
28be732c
...
@@ -93,7 +93,19 @@
...
@@ -93,7 +93,19 @@
</Reference>
</Reference>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Page Include="Package\AfterMatchTeamRanking\View\AfterMatchTeamRankingView.xaml">
<Page Include="Package\GroupRanking\AfterMatchGroupRanking\View\AfterMatchGroupRankingView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Package\TeamRanking\LongTeamRanking\View\LongTeamRankingView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Package\TeamRanking\ShortTeamRanking\View\ShortTeamRankingView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Package\TeamRanking\AfterMatchTeamRanking\View\AfterMatchTeamRankingView.xaml">
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<SubType>Designer</SubType>
</Page>
</Page>
...
@@ -157,7 +169,7 @@
...
@@ -157,7 +169,7 @@
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<SubType>Designer</SubType>
</Page>
</Page>
<Page Include="Package\BeforeMatchTeamRanking\View\BeforeMatchTeamRankingView.xaml">
<Page Include="Package\
TeamRanking\
BeforeMatchTeamRanking\View\BeforeMatchTeamRankingView.xaml">
<SubType>Designer</SubType>
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
</Page>
</Page>
...
@@ -177,14 +189,6 @@
...
@@ -177,14 +189,6 @@
<SubType>Designer</SubType>
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
</Page>
</Page>
<Page Include="Package\CenterPlayerRanking\View\CenterPlayerRankingView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Package\CenterTeamRanking\View\CenterTeamRankingView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\Generic.xaml">
<Page Include="Themes\Generic.xaml">
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<SubType>Designer</SubType>
...
@@ -203,8 +207,21 @@
...
@@ -203,8 +207,21 @@
</Page>
</Page>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile Include="Package\AfterMatchTeamRanking\ViewModel\AfterMatchTeamRankingViewModel.cs" />
<Compile Include="Package\GroupRanking\AfterMatchGroupRanking\View\AfterMatchGroupRankingView.xaml.cs">
<Compile Include="Package\AfterMatchTeamRanking\View\AfterMatchTeamRankingView.xaml.cs">
<DependentUpon>AfterMatchGroupRankingView.xaml</DependentUpon>
</Compile>
<Compile Include="Package\GroupRanking\AfterMatchGroupRanking\ViewModel\AfterMatchGroupRankingViewModel.cs" />
<Compile Include="Package\GroupRanking\GroupRankingViewModelBase.cs" />
<Compile Include="Package\TeamRanking\LongTeamRanking\ViewModel\LongTeamRankingViewModel.cs" />
<Compile Include="Package\TeamRanking\LongTeamRanking\View\LongTeamRankingView.xaml.cs">
<DependentUpon>LongTeamRankingView.xaml</DependentUpon>
</Compile>
<Compile Include="Package\TeamRanking\ShortTeamRanking\ViewModel\ShortTeamRankingViewModel.cs" />
<Compile Include="Package\TeamRanking\ShortTeamRanking\View\ShortTeamRankingView.xaml.cs">
<DependentUpon>ShortTeamRankingView.xaml</DependentUpon>
</Compile>
<Compile Include="Package\TeamRanking\AfterMatchTeamRanking\ViewModel\AfterMatchTeamRankingViewModel.cs" />
<Compile Include="Package\TeamRanking\AfterMatchTeamRanking\View\AfterMatchTeamRankingView.xaml.cs">
<DependentUpon>AfterMatchTeamRankingView.xaml</DependentUpon>
<DependentUpon>AfterMatchTeamRankingView.xaml</DependentUpon>
</Compile>
</Compile>
<Compile Include="Package\GroupHoleInfo\ViewModel\GroupHoleInfoViewModel.cs" />
<Compile Include="Package\GroupHoleInfo\ViewModel\GroupHoleInfoViewModel.cs" />
...
@@ -227,7 +244,7 @@
...
@@ -227,7 +244,7 @@
<Compile Include="Package\NameBar\View\NameBarBottomView.xaml.cs">
<Compile Include="Package\NameBar\View\NameBarBottomView.xaml.cs">
<DependentUpon>NameBarBottomView.xaml</DependentUpon>
<DependentUpon>NameBarBottomView.xaml</DependentUpon>
</Compile>
</Compile>
<Compile Include="Package\TeamRankingViewModelBase.cs" />
<Compile Include="Package\TeamRanking
\TeamRanking
ViewModelBase.cs" />
<Compile Include="Widgets\Detail\DetailPanel.xaml.cs">
<Compile Include="Widgets\Detail\DetailPanel.xaml.cs">
<DependentUpon>DetailPanel.xaml</DependentUpon>
<DependentUpon>DetailPanel.xaml</DependentUpon>
</Compile>
</Compile>
...
@@ -264,8 +281,8 @@
...
@@ -264,8 +281,8 @@
<Compile Include="Package\BottomHoleInfo\View\BottomHoleInfoView.xaml.cs">
<Compile Include="Package\BottomHoleInfo\View\BottomHoleInfoView.xaml.cs">
<DependentUpon>BottomHoleInfoView.xaml</DependentUpon>
<DependentUpon>BottomHoleInfoView.xaml</DependentUpon>
</Compile>
</Compile>
<Compile Include="Package\BeforeMatchTeamRanking\ViewModel\BeforeMatchTeamRankingViewModel.cs" />
<Compile Include="Package\
TeamRanking\
BeforeMatchTeamRanking\ViewModel\BeforeMatchTeamRankingViewModel.cs" />
<Compile Include="Package\BeforeMatchTeamRanking\View\BeforeMatchTeamRankingView.xaml.cs">
<Compile Include="Package\
TeamRanking\
BeforeMatchTeamRanking\View\BeforeMatchTeamRankingView.xaml.cs">
<DependentUpon>BeforeMatchTeamRankingView.xaml</DependentUpon>
<DependentUpon>BeforeMatchTeamRankingView.xaml</DependentUpon>
</Compile>
</Compile>
<Compile Include="Information\Hole\Controller\HoleListController.cs" />
<Compile Include="Information\Hole\Controller\HoleListController.cs" />
...
@@ -284,14 +301,6 @@
...
@@ -284,14 +301,6 @@
<DependentUpon>PlayerListView.xaml</DependentUpon>
<DependentUpon>PlayerListView.xaml</DependentUpon>
</Compile>
</Compile>
<Compile Include="Information\Player\ViewModel\PlayerListViewModel.cs" />
<Compile Include="Information\Player\ViewModel\PlayerListViewModel.cs" />
<Compile Include="Package\CenterPlayerRanking\ViewModel\CenterPlayerRankingViewModel.cs" />
<Compile Include="Package\CenterPlayerRanking\View\CenterPlayerRankingView.xaml.cs">
<DependentUpon>CenterPlayerRankingView.xaml</DependentUpon>
</Compile>
<Compile Include="Package\CenterTeamRanking\ViewModel\CenterTeamRankingViewModel.cs" />
<Compile Include="Package\CenterTeamRanking\View\CenterTeamRankingView.xaml.cs">
<DependentUpon>CenterTeamRankingView.xaml</DependentUpon>
</Compile>
<Compile Include="Package\PackageViewModelBase.cs" />
<Compile Include="Package\PackageViewModelBase.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
<SubType>Code</SubType>
...
...
VIZ.TVP.Golf/VIZ.TVP.Golf.csproj
View file @
28be732c
...
@@ -367,5 +367,20 @@
...
@@ -367,5 +367,20 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</None>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<None Include="images\LongTeamRanking.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\BeforeMatchGroupRanking.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\AfterMatchGroupRanking.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
</Project>
\ No newline at end of file
VIZ.TVP.Golf/images/AfterMatchGroupRanking.jpg
0 → 100644
View file @
28be732c
47.5 KB
VIZ.TVP.Golf/images/BeforeMatchGroupRanking.jpg
0 → 100644
View file @
28be732c
47.9 KB
VIZ.TVP.Golf/images/LongTeamRanking.jpg
0 → 100644
View file @
28be732c
51.5 KB
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