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
fa5631f1
Commit
fa5631f1
authored
Nov 30, 2022
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
版子修改
parent
0953231d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
322 additions
and
114 deletions
+322
-114
VIZ.TVP.Golf.Domain/Model/EntityModel/HoleInfoModel.cs
+23
-0
VIZ.TVP.Golf.Module.Resource/Style/Button/Button_Default.xaml
+38
-0
VIZ.TVP.Golf.Module/Main/View/MainView.xaml
+3
-0
VIZ.TVP.Golf.Module/Package/BottomHoleInfo/ViewModel/BottomHoleInfoViewModel.cs
+4
-9
VIZ.TVP.Golf.Module/Package/Champion/View/ChampionView.xaml
+2
-2
VIZ.TVP.Golf.Module/Package/Champion/ViewModel/ChampionViewModel.cs
+3
-2
VIZ.TVP.Golf.Module/Package/GroupHoleInfo/ViewModel/GroupHoleInfoViewModel.cs
+1
-1
VIZ.TVP.Golf.Module/Package/GroupInfo/View/GroupInfoSingleView.xaml
+39
-15
VIZ.TVP.Golf.Module/Package/GroupInfo/View/GroupInfoView.xaml
+3
-3
VIZ.TVP.Golf.Module/Package/GroupInfo/ViewModel/GroupInfoSingleViewModel.cs
+30
-12
VIZ.TVP.Golf.Module/Package/GroupInfo/ViewModel/GroupInfoViewModel.cs
+2
-0
VIZ.TVP.Golf.Module/Package/GroupRanking/AfterMatchGroupRanking/View/AfterMatchGroupRankingView.xaml
+3
-0
VIZ.TVP.Golf.Module/Package/GroupRanking/LongGroupRanking/ViewModel/LongGroupRankingViewModel.cs
+58
-2
VIZ.TVP.Golf.Module/Package/GroupRanking/ShortGroupRanking/View/ShortMatchGroupRankingView.xaml
+21
-37
VIZ.TVP.Golf.Module/Package/GroupRanking/ShortGroupRanking/ViewModel/ShortGroupRankingViewModel.cs
+68
-0
VIZ.TVP.Golf.Module/Package/TeamInfo/ViewModel/TeamInfoViewModel.cs
+2
-2
VIZ.TVP.Golf.Module/Package/TeamRanking/ShortTeamRanking/View/ShortTeamRankingView.xaml
+1
-23
VIZ.TVP.Golf.Service/Comparer/GroupTempModelComparer.cs
+1
-0
VIZ.TVP.Golf.Service/Comparer/TeamTempModelComparer.cs
+11
-4
VIZ.TVP.Golf.Service/RealData/Implementation/ResourceService.cs
+2
-1
VIZ.TVP.Golf/VIZ.TVP.Golf.csproj
+6
-0
VIZ.TVP.Golf/config/config.ini
+1
-1
VIZ.TVP.Golf/images/group_short_ranking.jpg
+0
-0
xml_test.xml
+0
-0
No files found.
VIZ.TVP.Golf.Domain/Model/EntityModel/HoleInfoModel.cs
View file @
fa5631f1
...
@@ -60,6 +60,20 @@ namespace VIZ.TVP.Golf.Domain
...
@@ -60,6 +60,20 @@ namespace VIZ.TVP.Golf.Domain
#
endregion
#
endregion
#
region
ParItems
--
标准杆项
private
List
<
int
?>
parItems
;
/// <summary>
/// 标准杆项
/// </summary>
public
List
<
int
?>
ParItems
{
get
{
return
parItems
;
}
set
{
parItems
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
ParItems
));
}
}
#
endregion
/// <summary>
/// <summary>
/// 更新属性值实体模型
/// 更新属性值实体模型
/// </summary>
/// </summary>
...
@@ -78,6 +92,15 @@ namespace VIZ.TVP.Golf.Domain
...
@@ -78,6 +92,15 @@ namespace VIZ.TVP.Golf.Domain
this
.
HoleID
=
this
.
Entity
.
HoleID
;
this
.
HoleID
=
this
.
Entity
.
HoleID
;
this
.
Par
=
this
.
Entity
.
Par
;
this
.
Par
=
this
.
Entity
.
Par
;
this
.
Picture
=
this
.
Entity
.
Picture
;
this
.
Picture
=
this
.
Entity
.
Picture
;
List
<
int
?>
parItems
=
new
List
<
int
?>();
parItems
.
Add
(
null
);
for
(
int
i
=
1
;
i
<=
this
.
Par
;
i
++)
{
parItems
.
Add
(
i
);
}
this
.
ParItems
=
parItems
;
}
}
}
}
}
}
VIZ.TVP.Golf.Module.Resource/Style/Button/Button_Default.xaml
View file @
fa5631f1
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<ResourceDictionary 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">
<Style x:Key="Button_Green" TargetType="Button">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="BorderBrush" Value="#884ec2ab"></Setter>
<Setter Property="Foreground" Value="#ff4ec2ab"></Setter>
<Setter Property="BorderThickness" Value="1"></Setter>
<Setter Property="MinWidth" Value="120"></Setter>
<Setter Property="Height" Value="40"></Setter>
<Setter Property="Padding" Value="10,0,10,0"></Setter>
<Setter Property="VerticalContentAlignment" Value="Center"></Setter>
<Setter Property="HorizontalContentAlignment" Value="Center"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}">
<Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Margin="{TemplateBinding Padding}">
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"></ContentPresenter>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#444ec2ab"></Setter>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#224ec2ab"></Setter>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</ResourceDictionary>
\ No newline at end of file
VIZ.TVP.Golf.Module/Main/View/MainView.xaml
View file @
fa5631f1
...
@@ -158,6 +158,9 @@
...
@@ -158,6 +158,9 @@
<Button Grid.Column="4" Height="20" Width="80" Content="连接" Margin="10,0,0,0"
<Button Grid.Column="4" Height="20" Width="80" Content="连接" Margin="10,0,0,0"
Command="{Binding Path=ConnectCommand}"
Command="{Binding Path=ConnectCommand}"
IsEnabled="{Binding Path=IsConnectButtonEnabled}"></Button>
IsEnabled="{Binding Path=IsConnectButtonEnabled}"></Button>
<Button Grid.Column="4" Height="20" Width="80" Content="断开" Margin="10,0,0,0"
Command="{Binding Path=DisconnectCommand}"
IsEnabled="{Binding Path=IsConnectButtonEnabled}"></Button>
</StackPanel>
</StackPanel>
</Border>
</Border>
</Grid>
</Grid>
...
...
VIZ.TVP.Golf.Module/Package/BottomHoleInfo/ViewModel/BottomHoleInfoViewModel.cs
View file @
fa5631f1
...
@@ -107,18 +107,13 @@ namespace VIZ.TVP.Golf.Module
...
@@ -107,18 +107,13 @@ namespace VIZ.TVP.Golf.Module
ApplicationDomainEx
.
VizEngineModel
.
STAGE_START
(
$"
{
TvpStaticResource
.
SCENE_PATH
}
17-QDZS"
,
"OnSetData"
,
cmd
.
ToString
());
ApplicationDomainEx
.
VizEngineModel
.
STAGE_START
(
$"
{
TvpStaticResource
.
SCENE_PATH
}
17-QDZS"
,
"OnSetData"
,
cmd
.
ToString
());
ApplicationDomainEx
.
VizEngineModel
.
Send
(
string
.
Format
(
VizEngineCommands
.
STAGE_SET
,
$"
{
TvpStaticResource
.
SCENE_PATH
}
17-QDZS"
));
ApplicationDomainEx
.
VizEngineModel
.
Send
(
string
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"OnSetData"
,
cmd
.
ToString
()));
ApplicationDomainEx
.
VizEngineModel
.
Send
(
string
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"setKeyframe"
,
$"
{
this
.
HolePickerPanelModel
.
SelectedHoleInfo
.
HoleID
}
"
));
int
value
=
0
;
ApplicationDomainEx
.
VizEngineModel
.
Send
(
VizEngineCommands
.
STAGE_START
);
int
time
=
0
;
value
=
-
307
;
time
=
10
;
ApplicationDomainEx
.
VizEngineModel
.
Send
(
string
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"setKeyframe"
,
$"
{
value
}
{
time
}
"
));
}
}
/// <summary>
/// <summary>
/// 获取洞数据
/// 获取洞数据
/// </summary>
/// </summary>
...
...
VIZ.TVP.Golf.Module/Package/Champion/View/ChampionView.xaml
View file @
fa5631f1
...
@@ -40,8 +40,8 @@
...
@@ -40,8 +40,8 @@
<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="2
0
0"></RowDefinition>
<RowDefinition Height="2
6
0"></RowDefinition>
<RowDefinition Height="2
4
0"></RowDefinition>
<RowDefinition Height="2
6
0"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<!-- 队伍 -->
<!-- 队伍 -->
...
...
VIZ.TVP.Golf.Module/Package/Champion/ViewModel/ChampionViewModel.cs
View file @
fa5631f1
...
@@ -6,6 +6,7 @@ using System.Threading.Tasks;
...
@@ -6,6 +6,7 @@ using System.Threading.Tasks;
using
System.Windows.Navigation
;
using
System.Windows.Navigation
;
using
VIZ.Framework.Core
;
using
VIZ.Framework.Core
;
using
VIZ.TVP.Golf.Domain
;
using
VIZ.TVP.Golf.Domain
;
using
VIZ.TVP.Golf.Service
;
namespace
VIZ.TVP.Golf.Module
namespace
VIZ.TVP.Golf.Module
{
{
...
@@ -102,7 +103,7 @@ namespace VIZ.TVP.Golf.Module
...
@@ -102,7 +103,7 @@ namespace VIZ.TVP.Golf.Module
// 底部描述
// 底部描述
dic
[
"FTITLE"
]
=
new
VizControlObjectsStringValue
(
"队伍冠军"
);
dic
[
"FTITLE"
]
=
new
VizControlObjectsStringValue
(
"队伍冠军"
);
// 右侧小图标
// 右侧小图标
dic
[
"LOGO"
]
=
new
VizControlObjectsStringValue
(
"IMAGE*/MyTestProject/Images/1"
);
dic
[
"LOGO"
]
=
new
VizControlObjectsStringValue
(
this
.
resourceService
.
GetImageName
(
ResourceType
.
SHOOL
,
this
.
TeamPickerPanelModel
.
SelectedTeamInfo
.
Logo
)
);
VizControlObjctsCommand
cmd
=
new
VizControlObjctsCommand
(
dic
);
VizControlObjctsCommand
cmd
=
new
VizControlObjctsCommand
(
dic
);
...
@@ -131,7 +132,7 @@ namespace VIZ.TVP.Golf.Module
...
@@ -131,7 +132,7 @@ namespace VIZ.TVP.Golf.Module
// 底部描述
// 底部描述
dic
[
"FTITLE"
]
=
new
VizControlObjectsStringValue
(
"组队冠军"
);
dic
[
"FTITLE"
]
=
new
VizControlObjectsStringValue
(
"组队冠军"
);
// 右侧小图标
// 右侧小图标
dic
[
"LOGO"
]
=
new
VizControlObjectsStringValue
(
"IMAGE*/MyTestProject/Images/1"
);
dic
[
"LOGO"
]
=
new
VizControlObjectsStringValue
(
this
.
resourceService
.
GetImageName
(
ResourceType
.
SHOOL
,
this
.
GroupPickerPanelModel
.
SelectedGroupInfo
.
TeamLogo
)
);
VizControlObjctsCommand
cmd
=
new
VizControlObjctsCommand
(
dic
);
VizControlObjctsCommand
cmd
=
new
VizControlObjctsCommand
(
dic
);
...
...
VIZ.TVP.Golf.Module/Package/GroupHoleInfo/ViewModel/GroupHoleInfoViewModel.cs
View file @
fa5631f1
...
@@ -188,7 +188,7 @@ namespace VIZ.TVP.Golf.Module
...
@@ -188,7 +188,7 @@ namespace VIZ.TVP.Golf.Module
// 洞号
// 洞号
item
[
"DBAN"
]
=
hole
.
HoleID
.
ToString
();
item
[
"DBAN"
]
=
hole
.
HoleID
.
ToString
();
// 标准杆
// 标准杆
item
[
"PAR"
]
=
hole
.
Par
.
ToString
()
;
item
[
"PAR"
]
=
$"PAR
{
hole
.
Par
}
"
;
// 总杆数
// 总杆数
item
[
"SCORE"
]
=
hole
.
TotalStrokes
;
item
[
"SCORE"
]
=
hole
.
TotalStrokes
;
// 图标
// 图标
...
...
VIZ.TVP.Golf.Module/Package/GroupInfo/View/GroupInfoSingleView.xaml
View file @
fa5631f1
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
<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.TVP.Golf.Module.Resource;component/Style/Button/Button_Default.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary.MergedDictionaries>
<core:String2ImageSourceConverter x:Key="String2ImageSourceConverter" Type="Relative" WorkPath="picture/player"></core:String2ImageSourceConverter>
<core:String2ImageSourceConverter x:Key="String2ImageSourceConverter" Type="Relative" WorkPath="picture/player"></core:String2ImageSourceConverter>
</ResourceDictionary>
</ResourceDictionary>
...
@@ -46,9 +47,9 @@
...
@@ -46,9 +47,9 @@
<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="
8
0"></RowDefinition>
<RowDefinition Height="
10
0"></RowDefinition>
<RowDefinition Height="260"></RowDefinition>
<RowDefinition Height="260"></RowDefinition>
<RowDefinition Height="1
2
0"></RowDefinition>
<RowDefinition Height="1
4
0"></RowDefinition>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<!-- 洞号 -->
<!-- 洞号 -->
<GroupBox Padding="10" Grid.Row="0">
<GroupBox Padding="10" Grid.Row="0">
...
@@ -59,16 +60,28 @@
...
@@ -59,16 +60,28 @@
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60"></ColumnDefinition>
<ColumnDefinition Width="60"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="80"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<!-- 洞号 -->
<!-- 洞号 -->
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="1" Grid.Column="0" Margin="0,0,5,0" Orientation="Horizontal">
<TextBlock Text="洞号:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,5,0"></TextBlock>
<Image Width="16" Height="16" Source="/VIZ.TVP.Golf.Module.Resource;component/Icons/refresh_16x16.png" Margin="0,0,5,0"></Image>
<TextBlock Text="洞号:" ></TextBlock>
</StackPanel>
<ComboBox Height="30" Width="240" VerticalContentAlignment="Center" Grid.Column="1" HorizontalAlignment="Left"
<ComboBox Height="30" Width="240" VerticalContentAlignment="Center" Grid.Column="1" HorizontalAlignment="Left"
Margin="5,0,0,0" Grid.Row="1"
Margin="5,0,0,0" Grid.Row="1"
SelectedValue="{Binding Path=SelectedHoleInfo,Mode=TwoWay}" DisplayMemberPath="HoleID"
SelectedValue="{Binding Path=SelectedHoleInfo,Mode=TwoWay}" DisplayMemberPath="HoleID"
ItemsSource="{Binding Source={x:Static domain:ApplicationDomainEx.HoleInfos}}"></ComboBox>
ItemsSource="{Binding Source={x:Static domain:ApplicationDomainEx.HoleInfos}}"></ComboBox>
<TextBlock Text="当前第几杆:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,5,0" Grid.Column="2"></TextBlock>
<ComboBox Height="30" Width="240" VerticalContentAlignment="Center" Grid.Column="3" HorizontalAlignment="Left"
Margin="5,0,0,0" Grid.Row="1"
SelectedValue="{Binding Path=SelectedCurrentStroke,Mode=TwoWay}"
ItemsSource="{Binding SelectedHoleInfo.ParItems}">
<ComboBox.ItemTemplate>
<DataTemplate>
<Border Height="20">
<TextBlock Text="{Binding .}" VerticalAlignment="Center"></TextBlock>
</Border>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Grid>
</GroupBox>
</GroupBox>
<!-- 分组 -->
<!-- 分组 -->
...
@@ -93,15 +106,26 @@
...
@@ -93,15 +106,26 @@
<TextBox Grid.Column="1" Height="30" Margin="5,0,20,0" AcceptsReturn="False" TextWrapping="NoWrap"
<TextBox Grid.Column="1" Height="30" Margin="5,0,20,0" AcceptsReturn="False" TextWrapping="NoWrap"
VerticalContentAlignment="Center" Padding="3"
VerticalContentAlignment="Center" Padding="3"
Text="{Binding Path=GroupDetail,Mode=TwoWay}"></TextBox>
Text="{Binding Path=GroupDetail,Mode=TwoWay}"></TextBox>
<StackPanel Grid.Column="2" Orientation="Horizontal">
<WrapPanel Grid.Column="2">
<ComboBox Height="30" Margin="5,0,0,0" Width="240" VerticalContentAlignment="Center"
<Button VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource Button_Green}"
SelectedValue="{Binding Path=SelectedGroupDetail,Mode=TwoWay}"
Content="Par" Grid.Column="1" Width="80" Height="30" Margin="5"
ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.Details}}"></ComboBox>
Command="{Binding PresetGroupDetailCommand}" CommandParameter="Par"></Button>
<fcommon:IconButton Style="{StaticResource IconButton_Green}" VerticalAlignment="Center" HorizontalAlignment="Left"
<Button VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource Button_Green}"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/presets_16x16.png"
Content="Birdie" Grid.Column="1" Width="80" Height="30" Margin="5"
Content="预设描述" Grid.Column="1" Width="80" Height="30" Margin="10,0,0,0"
Command="{Binding PresetGroupDetailCommand}" CommandParameter="Birdie"></Button>
Command="{Binding PresetGroupDetailCommand}"></fcommon:IconButton>
<Button VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource Button_Green}"
</StackPanel>
Content="Eagle" Grid.Column="1" Width="80" Height="30" Margin="5"
Command="{Binding PresetGroupDetailCommand}" CommandParameter="Eagle"></Button>
<Button VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource Button_Green}"
Content="double eagle" Grid.Column="1" Width="80" Height="30" Margin="5"
Command="{Binding PresetGroupDetailCommand}" CommandParameter="double eagle"></Button>
<Button VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource Button_Green}"
Content="Albatross" Grid.Column="1" Width="80" Height="30" Margin="5"
Command="{Binding PresetGroupDetailCommand}" CommandParameter="Albatross"></Button>
<Button VerticalAlignment="Center" HorizontalAlignment="Left" Style="{StaticResource Button_Green}"
Content="Bogey" Grid.Column="1" Width="80" Height="30" Margin="5"
Command="{Binding PresetGroupDetailCommand}" CommandParameter="Bogey"></Button>
</WrapPanel>
</Grid>
</Grid>
</GroupBox>
</GroupBox>
</Grid>
</Grid>
...
...
VIZ.TVP.Golf.Module/Package/GroupInfo/View/GroupInfoView.xaml
View file @
fa5631f1
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
<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="
8
0"></RowDefinition>
<RowDefinition Height="
10
0"></RowDefinition>
<RowDefinition Height="260"></RowDefinition>
<RowDefinition Height="260"></RowDefinition>
<RowDefinition Height="260"></RowDefinition>
<RowDefinition Height="260"></RowDefinition>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
...
@@ -77,14 +77,14 @@
...
@@ -77,14 +77,14 @@
<!-- 分组1 -->
<!-- 分组1 -->
<GroupBox Grid.Row="1" Padding="10">
<GroupBox Grid.Row="1" Padding="10">
<GroupBox.Header>
<GroupBox.Header>
<TextBlock Text="
分组
1" FontSize="18" FontWeight="Bold"></TextBlock>
<TextBlock Text="
小队
1" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
</GroupBox.Header>
<local:GroupPickerPanelNoPlayer DataContext="{Binding GroupPickerPanelModel1}" IsShowPosition="True"></local:GroupPickerPanelNoPlayer>
<local:GroupPickerPanelNoPlayer DataContext="{Binding GroupPickerPanelModel1}" IsShowPosition="True"></local:GroupPickerPanelNoPlayer>
</GroupBox>
</GroupBox>
<!-- 分组2 -->
<!-- 分组2 -->
<GroupBox Grid.Row="2" Padding="10">
<GroupBox Grid.Row="2" Padding="10">
<GroupBox.Header>
<GroupBox.Header>
<TextBlock Text="
分组
2" FontSize="18" FontWeight="Bold"></TextBlock>
<TextBlock Text="
小队
2" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
</GroupBox.Header>
<local:GroupPickerPanelNoPlayer DataContext="{Binding GroupPickerPanelModel2}" IsShowPosition="True"></local:GroupPickerPanelNoPlayer>
<local:GroupPickerPanelNoPlayer DataContext="{Binding GroupPickerPanelModel2}" IsShowPosition="True"></local:GroupPickerPanelNoPlayer>
</GroupBox>
</GroupBox>
...
...
VIZ.TVP.Golf.Module/Package/GroupInfo/ViewModel/GroupInfoSingleViewModel.cs
View file @
fa5631f1
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Collections.ObjectModel
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
...
@@ -7,6 +8,7 @@ using System.Web.WebSockets;
...
@@ -7,6 +8,7 @@ using System.Web.WebSockets;
using
System.Windows
;
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.Service
;
namespace
VIZ.TVP.Golf.Module
namespace
VIZ.TVP.Golf.Module
{
{
...
@@ -26,7 +28,7 @@ namespace VIZ.TVP.Golf.Module
...
@@ -26,7 +28,7 @@ namespace VIZ.TVP.Golf.Module
/// </summary>
/// </summary>
private
void
InitCommand
()
private
void
InitCommand
()
{
{
this
.
PresetGroupDetailCommand
=
new
VCommand
(
this
.
PresetGroupDetail
);
this
.
PresetGroupDetailCommand
=
new
VCommand
<
string
>
(
this
.
PresetGroupDetail
);
this
.
StartNoDetailCommand
=
new
VCommand
(
this
.
StartNoDetail
);
this
.
StartNoDetailCommand
=
new
VCommand
(
this
.
StartNoDetail
);
}
}
...
@@ -90,16 +92,16 @@ namespace VIZ.TVP.Golf.Module
...
@@ -90,16 +92,16 @@ namespace VIZ.TVP.Golf.Module
#
endregion
#
endregion
#
region
Selected
GroupDetail
--
选中的分组描述
#
region
Selected
CurrentStroke
--
当前击打杆数
private
string
selectedGroupDetail
;
private
int
?
selectedCurrentStroke
;
/// <summary>
/// <summary>
///
选中的分组描述
///
当前击打杆数
/// </summary>
/// </summary>
public
string
SelectedGroupDetail
public
int
?
SelectedCurrentStroke
{
{
get
{
return
selected
GroupDetail
;
}
get
{
return
selected
CurrentStroke
;
}
set
{
selected
GroupDetail
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectedGroupDetail
));
}
set
{
selected
CurrentStroke
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectedCurrentStroke
));
}
}
}
#
endregion
#
endregion
...
@@ -131,15 +133,30 @@ namespace VIZ.TVP.Golf.Module
...
@@ -131,15 +133,30 @@ namespace VIZ.TVP.Golf.Module
dic
[
"NUMBER"
]
=
new
VizControlObjectsStringValue
(
this
.
SelectedHoleInfo
.
HoleID
.
ToString
());
dic
[
"NUMBER"
]
=
new
VizControlObjectsStringValue
(
this
.
SelectedHoleInfo
.
HoleID
.
ToString
());
// 得分
// 得分
dic
[
"SCORE"
]
=
new
VizControlObjectsStringValue
(
this
.
GroupPickerPanelModel
.
PlayersScore
);
dic
[
"SCORE"
]
=
new
VizControlObjectsStringValue
(
this
.
GroupPickerPanelModel
.
PlayersScore
);
// 当前标准杆
dic
[
"HOLENUM"
]
=
new
VizControlObjectsStringValue
((
this
.
SelectedHoleInfo
.
Par
-
3
).
ToString
());
// 当前杆高亮
dic
[
"HL1"
]
=
new
VizControlObjectsStringValue
(
"0"
);
dic
[
"HL2"
]
=
new
VizControlObjectsStringValue
(
"0"
);
dic
[
"HL3"
]
=
new
VizControlObjectsStringValue
(
"0"
);
dic
[
"HL4"
]
=
new
VizControlObjectsStringValue
(
"0"
);
dic
[
"HL5"
]
=
new
VizControlObjectsStringValue
(
"0"
);
if
(
this
.
SelectedCurrentStroke
>=
1
&&
this
.
SelectedCurrentStroke
<=
5
)
{
dic
[
$"HL
{
this
.
SelectedCurrentStroke
}
"
]
=
new
VizControlObjectsStringValue
(
"1"
);
}
// 队伍图标
// 队伍图标
PlayerInfoModel
info_player
=
ApplicationDomainEx
.
PlayerInfos
.
FirstOrDefault
(
p
=>
p
.
PlayerID
==
this
.
GroupPickerPanelModel
.
Player1
.
PlayerID
);
PlayerInfoModel
info_player
=
ApplicationDomainEx
.
PlayerInfos
.
FirstOrDefault
(
p
=>
p
.
PlayerID
==
this
.
GroupPickerPanelModel
.
Player1
.
PlayerID
);
dic
[
"LOGO"
]
=
new
VizControlObjectsStringValue
(
info_player
.
TeamInfoModel
.
Logo
);
dic
[
"LOGO"
]
=
new
VizControlObjectsStringValue
(
this
.
resourceService
.
GetImageName
(
ResourceType
.
SHOOL
,
info_player
.
TeamInfoModel
.
Logo
)
);
VizControlObjctsCommand
cmd
=
new
VizControlObjctsCommand
(
dic
);
VizControlObjctsCommand
cmd
=
new
VizControlObjctsCommand
(
dic
);
ApplicationDomainEx
.
VizEngineModel
.
STAGE_START
(
$"
{
TvpStaticResource
.
SCENE_PATH
}
19-XZSJ-D"
,
"OnSetData"
,
cmd
.
ToString
());
ApplicationDomainEx
.
VizEngineModel
.
STAGE_START
(
$"
{
TvpStaticResource
.
SCENE_PATH
}
19-XZSJ-D"
,
"OnSetData"
,
cmd
.
ToString
());
}
}
#
endregion
#
endregion
#
region
StartNoDetailCommand
--
上没有描述的信息版命令
#
region
StartNoDetailCommand
--
上没有描述的信息版命令
...
@@ -163,7 +180,7 @@ namespace VIZ.TVP.Golf.Module
...
@@ -163,7 +180,7 @@ namespace VIZ.TVP.Golf.Module
dic
[
"SCORE"
]
=
new
VizControlObjectsStringValue
(
this
.
GroupPickerPanelModel
.
PlayersScore
);
dic
[
"SCORE"
]
=
new
VizControlObjectsStringValue
(
this
.
GroupPickerPanelModel
.
PlayersScore
);
// 队伍图标
// 队伍图标
PlayerInfoModel
info_player
=
ApplicationDomainEx
.
PlayerInfos
.
FirstOrDefault
(
p
=>
p
.
PlayerID
==
this
.
GroupPickerPanelModel
.
Player1
.
PlayerID
);
PlayerInfoModel
info_player
=
ApplicationDomainEx
.
PlayerInfos
.
FirstOrDefault
(
p
=>
p
.
PlayerID
==
this
.
GroupPickerPanelModel
.
Player1
.
PlayerID
);
dic
[
"LOGO"
]
=
new
VizControlObjectsStringValue
(
info_player
.
TeamInfoModel
.
Logo
);
dic
[
"LOGO"
]
=
new
VizControlObjectsStringValue
(
this
.
resourceService
.
GetImageName
(
ResourceType
.
SHOOL
,
info_player
.
TeamInfoModel
.
Logo
)
);
VizControlObjctsCommand
cmd
=
new
VizControlObjctsCommand
(
dic
);
VizControlObjctsCommand
cmd
=
new
VizControlObjctsCommand
(
dic
);
...
@@ -230,14 +247,15 @@ namespace VIZ.TVP.Golf.Module
...
@@ -230,14 +247,15 @@ namespace VIZ.TVP.Golf.Module
/// <summary>
/// <summary>
/// 预设分组描述命令
/// 预设分组描述命令
/// </summary>
/// </summary>
public
VCommand
PresetGroupDetailCommand
{
get
;
set
;
}
public
VCommand
<
string
>
PresetGroupDetailCommand
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 预设分组
/// 预设分组
/// </summary>
/// </summary>
private
void
PresetGroupDetail
()
/// <param name="detail">描述</param>
private
void
PresetGroupDetail
(
string
detail
)
{
{
this
.
GroupDetail
=
this
.
SelectedGroupD
etail
;
this
.
GroupDetail
=
d
etail
;
}
}
#
endregion
#
endregion
...
...
VIZ.TVP.Golf.Module/Package/GroupInfo/ViewModel/GroupInfoViewModel.cs
View file @
fa5631f1
...
@@ -232,6 +232,7 @@ namespace VIZ.TVP.Golf.Module
...
@@ -232,6 +232,7 @@ namespace VIZ.TVP.Golf.Module
GroupTempModel
model
=
new
GroupTempModel
();
GroupTempModel
model
=
new
GroupTempModel
();
model
.
Group
=
this
.
group
;
model
.
Group
=
this
.
group
;
model
.
TeamInfo
=
ApplicationDomainEx
.
TeamInfos
.
FirstOrDefault
(
p
=>
p
.
TeamID
==
team
.
Key
);
model
.
TeamInfo
=
ApplicationDomainEx
.
TeamInfos
.
FirstOrDefault
(
p
=>
p
.
TeamID
==
team
.
Key
);
model
.
TeamLogo
=
model
.
TeamInfo
?.
Logo
;
var
players
=
team
.
ToList
();
var
players
=
team
.
ToList
();
if
(
players
.
Count
==
2
)
if
(
players
.
Count
==
2
)
{
{
...
@@ -256,6 +257,7 @@ namespace VIZ.TVP.Golf.Module
...
@@ -256,6 +257,7 @@ namespace VIZ.TVP.Golf.Module
GroupTempModel
model
=
new
GroupTempModel
();
GroupTempModel
model
=
new
GroupTempModel
();
model
.
Group
=
this
.
group
;
model
.
Group
=
this
.
group
;
model
.
TeamInfo
=
ApplicationDomainEx
.
TeamInfos
.
FirstOrDefault
(
p
=>
p
.
TeamID
==
team
.
Key
);
model
.
TeamInfo
=
ApplicationDomainEx
.
TeamInfos
.
FirstOrDefault
(
p
=>
p
.
TeamID
==
team
.
Key
);
model
.
TeamLogo
=
model
.
TeamInfo
?.
Logo
;
var
players
=
team
.
ToList
();
var
players
=
team
.
ToList
();
if
(
players
.
Count
==
2
)
if
(
players
.
Count
==
2
)
{
{
...
...
VIZ.TVP.Golf.Module/Package/GroupRanking/AfterMatchGroupRanking/View/AfterMatchGroupRankingView.xaml
View file @
fa5631f1
...
@@ -88,6 +88,9 @@
...
@@ -88,6 +88,9 @@
Content="上版子" Command="{Binding Path=StartCommand}"></fcommon:IconButton>
Content="上版子" Command="{Binding Path=StartCommand}"></fcommon:IconButton>
<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/down_16x16.png"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="翻页" Command="{Binding StopCommand}"></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="下版子" Command="{Binding StopCommand}"></fcommon:IconButton>
Content="下版子" Command="{Binding StopCommand}"></fcommon:IconButton>
</StackPanel>
</StackPanel>
</Grid>
</Grid>
...
...
VIZ.TVP.Golf.Module/Package/GroupRanking/LongGroupRanking/ViewModel/LongGroupRankingViewModel.cs
View file @
fa5631f1
...
@@ -100,10 +100,10 @@ namespace VIZ.TVP.Golf.Module
...
@@ -100,10 +100,10 @@ namespace VIZ.TVP.Golf.Module
VizControlObjctsCommand
cmd
=
new
VizControlObjctsCommand
(
dic
);
VizControlObjctsCommand
cmd
=
new
VizControlObjctsCommand
(
dic
);
ApplicationDomainEx
.
VizEngineModel
.
Send
(
string
.
Format
(
VizEngineCommands
.
STAGE_SET
,
$"
{
TvpStaticResource
.
SCENE_PATH
}
18-21-8"
));
ApplicationDomainEx
.
VizEngineModel
.
Send
(
string
.
Format
(
VizEngineCommands
.
STAGE_SET
,
$"
{
TvpStaticResource
.
SCENE_PATH
}
18-21-8"
));
ApplicationDomainEx
.
VizEngineModel
.
Send
(
string
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"OnSetData"
,
cmd
.
ToString
()));
ApplicationDomainEx
.
VizEngineModel
.
Send
(
$"RENDERER*STAGE*DIRECTOR*MAIN START"
);
ApplicationDomainEx
.
VizEngineModel
.
Send
(
string
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"reset"
,
""
));
ApplicationDomainEx
.
VizEngineModel
.
Send
(
string
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"reset"
,
""
));
ApplicationDomainEx
.
VizEngineModel
.
Send
(
string
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"OnSetData"
,
cmd
.
ToString
()));
ApplicationDomainEx
.
VizEngineModel
.
Send
(
string
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"initList"
,
""
));
ApplicationDomainEx
.
VizEngineModel
.
Send
(
string
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"initList"
,
""
));
ApplicationDomainEx
.
VizEngineModel
.
Send
(
$"RENDERER*STAGE*DIRECTOR*MAIN START"
);
}
}
/// <summary>
/// <summary>
...
@@ -178,10 +178,66 @@ namespace VIZ.TVP.Golf.Module
...
@@ -178,10 +178,66 @@ namespace VIZ.TVP.Golf.Module
/// </summary>
/// </summary>
private
void
Expand
()
private
void
Expand
()
{
{
// 填充展开数据
Dictionary
<
string
,
IVizControlObjctsValue
>
dic
=
new
Dictionary
<
string
,
IVizControlObjctsValue
>();
// 第一排数据
dic
[
"SCORE1"
]
=
this
.
GetGroupHoleRowData
(
1
,
9
);
// 第二排数据
dic
[
"SCORE2"
]
=
this
.
GetGroupHoleRowData
(
10
,
18
);
VizControlObjctsCommand
cmd
=
new
VizControlObjctsCommand
(
dic
);
ApplicationDomainEx
.
VizEngineModel
.
Send
(
string
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"OnSetData"
,
cmd
.
ToString
()));
// 展开
int
index
=
this
.
GroupTempModels
.
IndexOf
(
this
.
SelectedGroupTempModel
);
int
index
=
this
.
GroupTempModels
.
IndexOf
(
this
.
SelectedGroupTempModel
);
ApplicationDomainEx
.
VizEngineModel
.
Send
(
string
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"bigIn"
,
index
));
ApplicationDomainEx
.
VizEngineModel
.
Send
(
string
.
Format
(
VizEngineCommands
.
SCRIPT_INVOKE
,
"bigIn"
,
index
));
}
}
/// <summary>
/// 获取分组信息版行数据
/// </summary>
/// <param name="from">开始索引</param>
/// <param name="to">结束索引</param>
/// <param name="groups">分组集合</param>
/// <returns>分组信息版行数据</returns>
private
VizControlObjectsElementValue
GetGroupHoleRowData
(
int
from
,
int
to
)
{
List
<
Dictionary
<
string
,
string
>>
md_itms
=
new
List
<
Dictionary
<
string
,
string
>>();
for
(
int
i
=
from
;
i
<=
to
;
i
++)
{
Dictionary
<
string
,
string
>
item
=
new
Dictionary
<
string
,
string
>();
HoleInfoModel
holeInfo
=
ApplicationDomainEx
.
HoleInfos
.
FirstOrDefault
(
p
=>
p
.
HoleID
==
i
);
// 图标
item
[
"DBAN"
]
=
"0"
;
// 标准杆
item
[
"PAR"
]
=
string
.
Empty
;
// 杆数
item
[
"SCORE"
]
=
string
.
Empty
;
if
(
holeInfo
!=
null
&&
this
.
SelectedGroupTempModel
!=
null
&&
this
.
SelectedGroupTempModel
.
GroupHoleTempModels
!=
null
)
{
GroupHoleTempModel
temp_hole
=
this
.
SelectedGroupTempModel
.
GroupHoleTempModels
.
FirstOrDefault
(
p
=>
p
.
HoleID
==
i
.
ToString
());
// 图标
int
.
TryParse
(
temp_hole
?.
TotalScore
,
out
int
score
);
item
[
"DBAN"
]
=
this
.
resourceService
.
GetToParBgIconValue
(
score
);
// 标准杆
item
[
"PAR"
]
=
$"PAR
{
holeInfo
.
Par
}
"
;
// 杆数
item
[
"SCORE"
]
=
temp_hole
?.
TotalStrokes
;
}
md_itms
.
Add
(
item
);
}
return
new
VizControlObjectsElementValue
(
md_itms
);
}
#
endregion
#
endregion
#
region
CollapseCommand
--
收拢命令
#
region
CollapseCommand
--
收拢命令
...
...
VIZ.TVP.Golf.Module/Package/GroupRanking/ShortGroupRanking/View/ShortMatchGroupRankingView.xaml
View file @
fa5631f1
...
@@ -41,13 +41,6 @@
...
@@ -41,13 +41,6 @@
IsEnabled="{Binding Path=IsLoadRemoteDataEnabled,Mode=OneWay}"
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="刷新实时数据" Command="{Binding Path=LoadRemoteDataCommand}"></fcommon:IconButton>
Content="刷新实时数据" Command="{Binding Path=LoadRemoteDataCommand}"></fcommon:IconButton>
<Rectangle Width="2" Margin="10,0,10,0" Height="30" Fill="#44000000"></Rectangle>
<fcommon:IconButton Style="{StaticResource IconButton_Default}"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/contrast_16x16.png"
Content="加载对比数据" Command="{Binding Path=LoadContrastDataCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/refresh_green_16x16.png" Margin="5,0,0,0"
Content="根据界面值刷新索引变化" Command="{Binding Path=RefreshIndexChangedCommand}"></fcommon:IconButton>
</StackPanel>
</StackPanel>
</Border>
</Border>
<!-- 版子信息 -->
<!-- 版子信息 -->
...
@@ -61,7 +54,6 @@
...
@@ -61,7 +54,6 @@
<Grid>
<Grid>
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"></ColumnDefinition>
<ColumnDefinition Width="30"></ColumnDefinition>
<ColumnDefinition Width="2*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<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"
...
@@ -70,19 +62,7 @@
...
@@ -70,19 +62,7 @@
<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=GroupTempModels}">
ItemsSource="{Binding Path=GroupTempModels}">
<DataGrid.Columns>
<DataGrid.Columns>
<DataGridTextColumn Header="排名" Width="60" Binding="{Binding Path=Position}" IsReadOnly="True"></DataGridTextColumn>
<DataGridCheckBoxColumn Header="高亮" Width="60" Binding="{Binding Path=IsActive}"></DataGridCheckBoxColumn>
<DataGridTextColumn Header="成员" Width="160" Binding="{Binding Path=PlayersDisplayName}"></DataGridTextColumn>
<DataGridTextColumn Header="得分" Width="80" Binding="{Binding Path=PlayersScore}"></DataGridTextColumn>
<DataGridTextColumn Header="之前索引" Width="60" Binding="{Binding Path=PositionOldIndex}"></DataGridTextColumn>
<DataGridTextColumn Header="之后索引" Width="60" Binding="{Binding Path=PositionNewIndex}"></DataGridTextColumn>
<DataGridTextColumn Header="索引变化" Width="80" Binding="{Binding Path=PositionChangedDesc}" IsReadOnly="True"></DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
<GroupBox Header="对比数据" Grid.Column="2" Padding="10" Margin="5,0,0,0">
<DataGrid Grid.Column="1" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserSortColumns="False"
ItemsSource="{Binding Path=ConstrrastGroupTempModels}">
<DataGrid.Columns>
<DataGridTextColumn Header="排名" Width="60" Binding="{Binding Path=Position}" IsReadOnly="True"></DataGridTextColumn>
<DataGridTextColumn Header="排名" Width="60" Binding="{Binding Path=Position}" IsReadOnly="True"></DataGridTextColumn>
<DataGridTextColumn Header="成员" Width="160" Binding="{Binding Path=PlayersDisplayName}"></DataGridTextColumn>
<DataGridTextColumn Header="成员" Width="160" Binding="{Binding Path=PlayersDisplayName}"></DataGridTextColumn>
<DataGridTextColumn Header="得分" Width="80" Binding="{Binding Path=PlayersScore}"></DataGridTextColumn>
<DataGridTextColumn Header="得分" Width="80" Binding="{Binding Path=PlayersScore}"></DataGridTextColumn>
...
@@ -91,26 +71,29 @@
...
@@ -91,26 +71,29 @@
</GroupBox>
</GroupBox>
</Grid>
</Grid>
</GroupBox>
</GroupBox>
</Grid>
</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">
<Grid>
<StackPanel>
<Grid.RowDefinitions>
<GroupBox Padding="10">
<RowDefinition Height="300"></RowDefinition>
<GroupBox.Header>
<RowDefinition Height="80"></RowDefinition>
<TextBlock Text="短板队伍排名" FontSize="18" FontWeight="Bold"></TextBlock>
</Grid.RowDefinitions>
</GroupBox.Header>
<Image Source="pack://SiteOfOrigin:,,,/images/AfterMatchGroupRanking.jpg" />
<StackPanel>
<StackPanel Orientation="Horizontal" Grid.Row="1">
<Image Source="pack://SiteOfOrigin:,,,/images/group_short_ranking.jpg" Height="300" />
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
<StackPanel Orientation="Horizontal" Margin="0,10,0,10">
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Content="上版子"></fcommon:IconButton>
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Content="上版子" Command="{Binding StartCommand}"></fcommon:IconButton>
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Content="下版子"></fcommon:IconButton>
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
</StackPanel>
Content="下版子"
</Grid>
Command="{Binding Path=StopCommand}"></fcommon:IconButton>
</StackPanel>
</StackPanel>
</GroupBox>
</StackPanel>
</Border>
</Border>
</Grid>
</Grid>
</UserControl>
</UserControl>
\ No newline at end of file
VIZ.TVP.Golf.Module/Package/GroupRanking/ShortGroupRanking/ViewModel/ShortGroupRankingViewModel.cs
View file @
fa5631f1
...
@@ -7,6 +7,7 @@ using System.Threading.Tasks;
...
@@ -7,6 +7,7 @@ using System.Threading.Tasks;
using
System.Windows
;
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.Service
;
namespace
VIZ.TVP.Golf.Module
namespace
VIZ.TVP.Golf.Module
{
{
...
@@ -28,6 +29,73 @@ namespace VIZ.TVP.Golf.Module
...
@@ -28,6 +29,73 @@ namespace VIZ.TVP.Golf.Module
// Command
// Command
// ===================================================================================
// ===================================================================================
#
region
上板子命令
/// <summary>
/// 上版子
/// </summary>
protected
override
void
Start
()
{
Dictionary
<
string
,
IVizControlObjctsValue
>
dic
=
new
Dictionary
<
string
,
IVizControlObjctsValue
>();
// 第一排数据
dic
[
"DATALINE"
]
=
this
.
GetGroupRowData
(
0
,
4
);
VizControlObjctsCommand
cmd
=
new
VizControlObjctsCommand
(
dic
);
ApplicationDomainEx
.
VizEngineModel
.
STAGE_START
(
$"
{
TvpStaticResource
.
SCENE_PATH
}
23-QDPM-D"
,
"OnSetData"
,
cmd
.
ToString
());
}
/// <summary>
/// 获取分组信息版行数据
/// </summary>
/// <param name="from">开始索引</param>
/// <param name="to">结束索引</param>
/// <param name="groups">分组集合</param>
/// <returns>分组信息版行数据</returns>
private
VizControlObjectsElementValue
GetGroupRowData
(
int
from
,
int
to
)
{
List
<
Dictionary
<
string
,
string
>>
md_itms
=
new
List
<
Dictionary
<
string
,
string
>>();
for
(
int
i
=
from
;
i
<=
to
;
i
++)
{
Dictionary
<
string
,
string
>
item
=
new
Dictionary
<
string
,
string
>();
// 得分
item
[
"SCORE"
]
=
string
.
Empty
;
// 球队logo
item
[
"1"
]
=
string
.
Empty
;
// 是否高亮
item
[
"HL.active"
]
=
string
.
Empty
;
// 排名
item
[
"NUMBER"
]
=
string
.
Empty
;
// 队员
item
[
"TEAMNAME"
]
=
string
.
Empty
;
if
(
this
.
GroupTempModels
.
Count
>
i
)
{
var
grpup
=
this
.
GroupTempModels
[
i
];
// 得分
item
[
"D2"
]
=
grpup
.
PlayersScore
;
// 球队logo
item
[
"1"
]
=
this
.
resourceService
.
GetImageName
(
ResourceType
.
SHOOL
,
grpup
.
TeamLogo
);
// 是否高亮
item
[
"HL.active"
]
=
grpup
.
IsActive
?
"1"
:
"0"
;
// 排名
item
[
"NUMBER"
]
=
grpup
.
Position
;
// 队伍名称
item
[
"TEAMNAME"
]
=
grpup
.
PlayersDisplayName
;
}
md_itms
.
Add
(
item
);
}
return
new
VizControlObjectsElementValue
(
md_itms
);
}
#
endregion
// ===================================================================================
// ===================================================================================
// Private Function
// Private Function
// ===================================================================================
// ===================================================================================
...
...
VIZ.TVP.Golf.Module/Package/TeamInfo/ViewModel/TeamInfoViewModel.cs
View file @
fa5631f1
...
@@ -104,7 +104,7 @@ namespace VIZ.TVP.Golf.Module
...
@@ -104,7 +104,7 @@ namespace VIZ.TVP.Golf.Module
// 队伍名称
// 队伍名称
dic
[
"FD1"
]
=
new
VizControlObjectsStringValue
(
this
.
TeamPickerPanelModel
.
Name
);
dic
[
"FD1"
]
=
new
VizControlObjectsStringValue
(
this
.
TeamPickerPanelModel
.
Name
);
// 队伍图标
// 队伍图标
dic
[
"FLAGE"
]
=
new
VizControlObjectsStringValue
(
"IMAGE*/MyTestProject/Images/2"
);
dic
[
"FLAGE"
]
=
new
VizControlObjectsStringValue
(
this
.
resourceService
.
GetImageName
(
ResourceType
.
SHOOL
,
this
.
TeamPickerPanelModel
.
SelectedTeamInfo
.
Logo
)
);
// 分组数据
// 分组数据
var
groups
=
this
.
TeamPickerPanelModel
.
PlayerTempModels
.
Where
(
p
=>
!
string
.
IsNullOrWhiteSpace
(
p
.
Group
)).
GroupBy
(
p
=>
p
.
Group
).
ToList
();
var
groups
=
this
.
TeamPickerPanelModel
.
PlayerTempModels
.
Where
(
p
=>
!
string
.
IsNullOrWhiteSpace
(
p
.
Group
)).
GroupBy
(
p
=>
p
.
Group
).
ToList
();
...
@@ -187,7 +187,7 @@ namespace VIZ.TVP.Golf.Module
...
@@ -187,7 +187,7 @@ namespace VIZ.TVP.Golf.Module
// 队伍名称
// 队伍名称
dic
[
"FD1"
]
=
new
VizControlObjectsStringValue
(
this
.
TeamPickerPanelModel
.
Name
);
dic
[
"FD1"
]
=
new
VizControlObjectsStringValue
(
this
.
TeamPickerPanelModel
.
Name
);
// 队伍图标
// 队伍图标
dic
[
"FLAGE"
]
=
new
VizControlObjectsStringValue
(
"IMAGE*/MyTestProject/Images/2"
);
dic
[
"FLAGE"
]
=
new
VizControlObjectsStringValue
(
this
.
resourceService
.
GetImageName
(
ResourceType
.
SHOOL
,
this
.
TeamPickerPanelModel
.
SelectedTeamInfo
.
Logo
)
);
// 分组数据
// 分组数据
var
players
=
this
.
TeamPickerPanelModel
.
PlayerTempModels
.
Where
(
p
=>
string
.
IsNullOrWhiteSpace
(
p
.
Group
)).
ToList
();
var
players
=
this
.
TeamPickerPanelModel
.
PlayerTempModels
.
Where
(
p
=>
string
.
IsNullOrWhiteSpace
(
p
.
Group
)).
ToList
();
...
...
VIZ.TVP.Golf.Module/Package/TeamRanking/ShortTeamRanking/View/ShortTeamRankingView.xaml
View file @
fa5631f1
...
@@ -41,14 +41,6 @@
...
@@ -41,14 +41,6 @@
IsEnabled="{Binding Path=IsLoadRemoteDataEnabled,Mode=OneWay}"
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="刷新实时数据" Command="{Binding Path=LoadRemoteDataCommand}"></fcommon:IconButton>
Content="刷新实时数据" Command="{Binding Path=LoadRemoteDataCommand}"></fcommon:IconButton>
<Rectangle Width="2" Margin="10,0,10,0" Height="30" Fill="#44000000"></Rectangle>
<fcommon:IconButton Style="{StaticResource IconButton_Default}"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/contrast_16x16.png"
Content="加载对比数据" Command="{Binding Path=LoadContrastDataCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/refresh_green_16x16.png" Margin="5,0,0,0"
Content="根据界面值刷新索引变化" Command="{Binding Path=RefreshIndexChangedCommand}"></fcommon:IconButton>
</StackPanel>
</StackPanel>
</Border>
</Border>
<!-- 版子信息 -->
<!-- 版子信息 -->
...
@@ -62,7 +54,6 @@
...
@@ -62,7 +54,6 @@
<Grid>
<Grid>
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"></ColumnDefinition>
<ColumnDefinition Width="30"></ColumnDefinition>
<ColumnDefinition Width="2*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<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"
...
@@ -73,7 +64,7 @@
...
@@ -73,7 +64,7 @@
<DataGrid AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserSortColumns="False"
<DataGrid AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserSortColumns="False"
ItemsSource="{Binding Path=TeamTempModels}">
ItemsSource="{Binding Path=TeamTempModels}">
<DataGrid.Columns>
<DataGrid.Columns>
<DataGridCheckBoxColumn Header="
聚焦
" Width="60" Binding="{Binding Path=IsActive}"></DataGridCheckBoxColumn>
<DataGridCheckBoxColumn Header="
高亮
" Width="60" Binding="{Binding Path=IsActive}"></DataGridCheckBoxColumn>
<DataGridTextColumn Header="排名(*)" Width="60" Binding="{Binding Path=Position}"></DataGridTextColumn>
<DataGridTextColumn Header="排名(*)" Width="60" Binding="{Binding Path=Position}"></DataGridTextColumn>
<DataGridTextColumn Header="队伍名称(*)" Width="200" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="队伍名称(*)" Width="200" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="得分(*)" Width="80" Binding="{Binding Path=TotalScore}"></DataGridTextColumn>
<DataGridTextColumn Header="得分(*)" Width="80" Binding="{Binding Path=TotalScore}"></DataGridTextColumn>
...
@@ -83,19 +74,6 @@
...
@@ -83,19 +74,6 @@
</DataGrid.Columns>
</DataGrid.Columns>
</DataGrid>
</DataGrid>
</GroupBox>
</GroupBox>
<!-- 对比数据 -->
<GroupBox Header="对比数据" Grid.Column="2" Padding="10" Margin="5,0,0,0">
<DataGrid Grid.Column="2" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserSortColumns="False"
ItemsSource="{Binding Path=ContrastTeamTempModels}" Margin="5,0,0,0">
<DataGrid.Columns>
<DataGridTextColumn Header="排名" Width="60" Binding="{Binding Path=Position}"></DataGridTextColumn>
<DataGridTextColumn Header="队伍名称" Width="200" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="得分" Width="80" Binding="{Binding Path=TotalScore}"></DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
</Grid>
</Grid>
</GroupBox>
</GroupBox>
...
...
VIZ.TVP.Golf.Service/Comparer/GroupTempModelComparer.cs
View file @
fa5631f1
...
@@ -80,6 +80,7 @@ namespace VIZ.TVP.Golf.Service
...
@@ -80,6 +80,7 @@ namespace VIZ.TVP.Golf.Service
bool
Y_player1_thru
=
this
.
RealDataService
.
IsPlayerThru
(
Y_player1
,
this
.
Round
);
bool
Y_player1_thru
=
this
.
RealDataService
.
IsPlayerThru
(
Y_player1
,
this
.
Round
);
bool
Y_player2_thru
=
this
.
RealDataService
.
IsPlayerThru
(
Y_player2
,
this
.
Round
);
bool
Y_player2_thru
=
this
.
RealDataService
.
IsPlayerThru
(
Y_player2
,
this
.
Round
);
// 是否参赛判断
if
((!
X_player1_thru
&&
!
X_player2_thru
)
&&
(!
Y_player1_thru
&&
!
Y_player2_thru
))
if
((!
X_player1_thru
&&
!
X_player2_thru
)
&&
(!
Y_player1_thru
&&
!
Y_player2_thru
))
return
0
;
return
0
;
if
((
X_player1_thru
||
X_player2_thru
)
&&
(!
Y_player1_thru
&&
!
Y_player2_thru
))
if
((
X_player1_thru
||
X_player2_thru
)
&&
(!
Y_player1_thru
&&
!
Y_player2_thru
))
...
...
VIZ.TVP.Golf.Service/Comparer/TeamTempModelComparer.cs
View file @
fa5631f1
...
@@ -45,6 +45,7 @@ namespace VIZ.TVP.Golf.Service
...
@@ -45,6 +45,7 @@ namespace VIZ.TVP.Golf.Service
/// </summary>
/// </summary>
public
int
Compare
(
TeamTempModel
x
,
TeamTempModel
y
)
public
int
Compare
(
TeamTempModel
x
,
TeamTempModel
y
)
{
{
// 有无成绩判断
if
(
x
.
TotalScoreValue
==
null
&&
y
.
TotalScoreValue
==
null
)
if
(
x
.
TotalScoreValue
==
null
&&
y
.
TotalScoreValue
==
null
)
return
0
;
return
0
;
...
@@ -54,10 +55,16 @@ namespace VIZ.TVP.Golf.Service
...
@@ -54,10 +55,16 @@ namespace VIZ.TVP.Golf.Service
if
(
x
.
TotalScoreValue
==
null
&&
y
.
TotalScoreValue
!=
null
)
if
(
x
.
TotalScoreValue
==
null
&&
y
.
TotalScoreValue
!=
null
)
return
1
;
return
1
;
if
(
x
.
TotalScoreValue
.
Value
==
y
.
TotalScoreValue
.
Value
)
// 成绩判断
return
0
;
if
(
x
.
TotalScoreValue
.
Value
<
y
.
TotalScoreValue
.
Value
)
else
return
-
1
;
return
x
.
TotalScoreValue
.
Value
<
y
.
TotalScoreValue
.
Value
?
-
1
:
1
;
if
(
x
.
TotalScoreValue
.
Value
>
y
.
TotalScoreValue
.
Value
)
return
1
;
//
return
0
;
}
}
}
}
}
}
VIZ.TVP.Golf.Service/RealData/Implementation/ResourceService.cs
View file @
fa5631f1
...
@@ -40,7 +40,8 @@ namespace VIZ.TVP.Golf.Service
...
@@ -40,7 +40,8 @@ namespace VIZ.TVP.Golf.Service
{
{
if
(
type
==
ResourceType
.
SHOOL
)
if
(
type
==
ResourceType
.
SHOOL
)
{
{
return
$"IMAGE*/MyTestProject/Images/shool_logo/path"
;
path
=
System
.
IO
.
Path
.
GetFileNameWithoutExtension
(
path
);
return
$"IMAGE*/MyTestProject/Images/shool_logo/
{
path
}
"
;
}
}
if
(
type
==
ResourceType
.
HOLE
)
if
(
type
==
ResourceType
.
HOLE
)
...
...
VIZ.TVP.Golf/VIZ.TVP.Golf.csproj
View file @
fa5631f1
...
@@ -438,5 +438,10 @@
...
@@ -438,5 +438,10 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</None>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<None Include="images\group_short_ranking.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/config/config.ini
View file @
fa5631f1
...
@@ -13,7 +13,7 @@ CLIENT_VIZ_IP=127.0.0.1
...
@@ -13,7 +13,7 @@ CLIENT_VIZ_IP=127.0.0.1
; VIZ端口
; VIZ端口
CLIENT_VIZ_PORT
=
6100
CLIENT_VIZ_PORT
=
6100
; 备库 VIZ IP地址
; 备库 VIZ IP地址
CLIENT_VIZ_IP_STANDBY
=
127.0.0.2
CLIENT_VIZ_IP_STANDBY
=
82.157.67.113
; 备库 VIZ端口
; 备库 VIZ端口
CLIENT_VIZ_PORT_STANDBY
=
6100
CLIENT_VIZ_PORT_STANDBY
=
6100
; ============================================================
; ============================================================
...
...
VIZ.TVP.Golf/images/group_short_ranking.jpg
0 → 100644
View file @
fa5631f1
60.6 KB
xml_test.xml
View file @
fa5631f1
This diff is collapsed.
Click to expand it.
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