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
0e27a4ec
Commit
0e27a4ec
authored
Nov 24, 2022
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部分版子
parent
1cc292a5
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
732 additions
and
118 deletions
+732
-118
Lib/VizConnectC.dll
+0
-0
VIZ.TVP.Golf.Domain/ApplicationDomainEx.cs
+6
-0
VIZ.TVP.Golf.Domain/Enum/ViewKeys.cs
+5
-0
VIZ.TVP.Golf.Domain/Model/TempModel/PlayerTempModel.cs
+15
-0
VIZ.TVP.Golf.Module.Resource/Style/CheckBox/CheckBox_Default.xaml
+25
-0
VIZ.TVP.Golf.Module.Resource/VIZ.TVP.Golf.Module.Resource.csproj
+4
-0
VIZ.TVP.Golf.Module/Main/View/MainView.xaml
+24
-43
VIZ.TVP.Golf.Module/Main/ViewModel/MainViewModel.cs
+146
-0
VIZ.TVP.Golf.Module/Package/BottomHoleInfo/ViewModel/BottomHoleInfoViewModel.cs
+2
-2
VIZ.TVP.Golf.Module/Package/Champion/ViewModel/ChampionViewModel.cs
+2
-2
VIZ.TVP.Golf.Module/Package/GroupHoleInfo/ViewModel/GroupHoleInfoViewModel.cs
+2
-2
VIZ.TVP.Golf.Module/Package/GroupInfo/View/GroupInfoSingleView.xaml
+112
-0
VIZ.TVP.Golf.Module/Package/GroupInfo/View/GroupInfoSingleView.xaml.cs
+31
-0
VIZ.TVP.Golf.Module/Package/GroupInfo/ViewModel/GroupInfoSingleViewModel.cs
+152
-0
VIZ.TVP.Golf.Module/Package/GroupInfo/ViewModel/GroupInfoViewModel.cs
+2
-2
VIZ.TVP.Golf.Module/Package/GroupInfo/ViewModel/GroupInfoWithHoleViewModel.cs
+2
-2
VIZ.TVP.Golf.Module/Package/GroupRanking/AfterMatchGroupRanking/View/AfterMatchGroupRankingView.xaml
+0
-24
VIZ.TVP.Golf.Module/Package/GroupRanking/BeforeMatchGroupRanking/View/BeforeMatchGroupRankingView.xaml
+0
-24
VIZ.TVP.Golf.Module/Package/GroupRanking/GroupRankingViewModelBase.cs
+2
-2
VIZ.TVP.Golf.Module/Package/PackageViewModelBase.cs
+25
-6
VIZ.TVP.Golf.Module/Package/TeamInfo/View/TeamInfoView.xaml
+8
-3
VIZ.TVP.Golf.Module/Package/TeamInfo/ViewModel/TeamInfoViewModel.cs
+33
-2
VIZ.TVP.Golf.Module/Package/TeamRanking/TeamRankingViewModelBase.cs
+2
-2
VIZ.TVP.Golf.Module/Setup/Provider/Setup/AppSetup_InitVIZ.cs
+53
-0
VIZ.TVP.Golf.Module/VIZ.TVP.Golf.Module.csproj
+13
-1
VIZ.TVP.Golf.Service/RealData/Implementation/RealDataService.cs
+44
-0
VIZ.TVP.Golf.Service/RealData/Interface/IRealDataService.cs
+16
-0
VIZ.TVP.Golf/App.xaml.cs
+2
-0
VIZ.TVP.Golf/VIZ.TVP.Golf.csproj
+3
-0
VIZ.TVP.Golf/config/config.ini
+1
-1
No files found.
Lib/VizConnectC.dll
0 → 100644
View file @
0e27a4ec
File added
VIZ.TVP.Golf.Domain/ApplicationDomainEx.cs
View file @
0e27a4ec
...
@@ -5,6 +5,7 @@ using System.IO;
...
@@ -5,6 +5,7 @@ using System.IO;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
VIZ.Framework.Core
;
using
VIZ.Framework.Domain
;
using
VIZ.Framework.Domain
;
using
VIZ.TVP.Golf.Storage
;
using
VIZ.TVP.Golf.Storage
;
...
@@ -44,5 +45,10 @@ namespace VIZ.TVP.Golf.Domain
...
@@ -44,5 +45,10 @@ namespace VIZ.TVP.Golf.Domain
/// LiteDB数据库
/// LiteDB数据库
/// </summary>
/// </summary>
public
static
LiteDBContext
LiteDBContext
{
get
;
set
;
}
public
static
LiteDBContext
LiteDBContext
{
get
;
set
;
}
/// <summary>
/// VIZ引擎
/// </summary>
public
static
VizEngineModel
VizEngineModel
{
get
;
set
;
}
}
}
}
}
VIZ.TVP.Golf.Domain/Enum/ViewKeys.cs
View file @
0e27a4ec
...
@@ -45,6 +45,11 @@ namespace VIZ.TVP.Golf.Domain
...
@@ -45,6 +45,11 @@ namespace VIZ.TVP.Golf.Domain
public
const
string
GroupInfo
=
"GroupInfo"
;
public
const
string
GroupInfo
=
"GroupInfo"
;
/// <summary>
/// <summary>
/// 单队伍分组信息
/// </summary>
public
const
string
GroupInfoSingle
=
"GroupInfoSingle"
;
/// <summary>
/// 分组具体洞信息
/// 分组具体洞信息
/// </summary>
/// </summary>
public
const
string
GroupInfoWithHole
=
"GroupInfoWithHole"
;
public
const
string
GroupInfoWithHole
=
"GroupInfoWithHole"
;
...
...
VIZ.TVP.Golf.Domain/Model/TempModel/PlayerTempModel.cs
View file @
0e27a4ec
...
@@ -40,6 +40,20 @@ namespace VIZ.TVP.Golf.Domain
...
@@ -40,6 +40,20 @@ namespace VIZ.TVP.Golf.Domain
#
endregion
#
endregion
#
region
Group
--
所属分组
private
string
group
;
/// <summary>
/// 所属分组
/// </summary>
public
string
Group
{
get
{
return
group
;
}
set
{
group
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Group
));
}
}
#
endregion
#
region
IsCaptain
--
是否是队长
#
region
IsCaptain
--
是否是队长
private
bool
isCaptain
;
private
bool
isCaptain
;
...
@@ -78,6 +92,7 @@ namespace VIZ.TVP.Golf.Domain
...
@@ -78,6 +92,7 @@ namespace VIZ.TVP.Golf.Domain
this
.
Name
=
model
.
Name
;
this
.
Name
=
model
.
Name
;
this
.
HalfPicture
=
model
.
HalfPicture
;
this
.
HalfPicture
=
model
.
HalfPicture
;
this
.
IsCaptain
=
model
.
IsCaptain
;
this
.
IsCaptain
=
model
.
IsCaptain
;
this
.
Group
=
model
.
Group
;
}
}
}
}
}
}
VIZ.TVP.Golf.Module.Resource/Style/CheckBox/CheckBox_Default.xaml
0 → 100644
View file @
0e27a4ec
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="CheckBox_VizConnection" TargetType="CheckBox">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
<Grid>
<Ellipse x:Name="e1" Width="16" Height="16" Fill="Red" Visibility="Visible"></Ellipse>
<Ellipse x:Name="e2" Width="16" Height="16" Fill="Green" Visibility="Collapsed"></Ellipse>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="e1" Property="Visibility" Value="Collapsed"></Setter>
<Setter TargetName="e2" Property="Visibility" Value="Visible"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
\ No newline at end of file
VIZ.TVP.Golf.Module.Resource/VIZ.TVP.Golf.Module.Resource.csproj
View file @
0e27a4ec
...
@@ -72,6 +72,10 @@
...
@@ -72,6 +72,10 @@
<SubType>Designer</SubType>
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
</Page>
</Page>
<Page Include="Style\CheckBox\CheckBox_Default.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Style\IconButton\IconButton_Default.xaml">
<Page Include="Style\IconButton\IconButton_Default.xaml">
<SubType>Designer</SubType>
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
...
...
VIZ.TVP.Golf.Module/Main/View/MainView.xaml
View file @
0e27a4ec
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<ResourceDictionary>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.TVP.Golf.Module.Resource;component/Style/RadioButton/RadioButton_MainView.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.TVP.Golf.Module.Resource;component/Style/RadioButton/RadioButton_MainView.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.TVP.Golf.Module.Resource;component/Style/CheckBox/CheckBox_Default.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</ResourceDictionary>
</UserControl.Resources>
</UserControl.Resources>
...
@@ -58,7 +59,7 @@
...
@@ -58,7 +59,7 @@
Content="队伍信息"></RadioButton>
Content="队伍信息"></RadioButton>
<RadioButton x:Name="rb_GroupInfo" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
<RadioButton x:Name="rb_GroupInfo" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="小组信息"></RadioButton>
Content="小组信息"></RadioButton>
<RadioButton x:Name="rb_GroupInfo
WithHo
le" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
<RadioButton x:Name="rb_GroupInfo
Sing
le" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="赛中小组数据"></RadioButton>
Content="赛中小组数据"></RadioButton>
<RadioButton x:Name="rb_Champion" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
<RadioButton x:Name="rb_Champion" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="冠军版"></RadioButton>
Content="冠军版"></RadioButton>
...
@@ -108,8 +109,8 @@
...
@@ -108,8 +109,8 @@
IsSelected="{Binding ElementName=rb_TeamInfo,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
IsSelected="{Binding ElementName=rb_TeamInfo,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.GroupInfo}" ViewType="{x:Type local:GroupInfoView}"
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.GroupInfo}" ViewType="{x:Type local:GroupInfoView}"
IsSelected="{Binding ElementName=rb_GroupInfo,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
IsSelected="{Binding ElementName=rb_GroupInfo,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.GroupInfo
WithHole}" ViewType="{x:Type local:GroupInfoWithHo
leView}"
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.GroupInfo
Single}" ViewType="{x:Type local:GroupInfoSing
leView}"
IsSelected="{Binding ElementName=rb_GroupInfo
WithHo
le,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
IsSelected="{Binding ElementName=rb_GroupInfo
Sing
le,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.Champion}" ViewType="{x:Type local:ChampionView}"
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.Champion}" ViewType="{x:Type local:ChampionView}"
IsSelected="{Binding ElementName=rb_Champion,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
IsSelected="{Binding ElementName=rb_Champion,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.GroupHoleInfo}" ViewType="{x:Type local:GroupHoleInfoView}"
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.GroupHoleInfo}" ViewType="{x:Type local:GroupHoleInfoView}"
...
@@ -140,48 +141,28 @@
...
@@ -140,48 +141,28 @@
<!-- VIZ 连接 -->
<!-- VIZ 连接 -->
<Border Padding="5" Margin="5" BorderBrush="#44000000" BorderThickness="1" Grid.Row="1">
<Border Padding="5" Margin="5" BorderBrush="#44000000" BorderThickness="1" Grid.Row="1">
<Grid HorizontalAlignment="Left" Width="700">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<!-- 主库 -->
<!-- 主库 -->
<Grid>
<StackPanel Orientation="Horizontal" Margin="0,0,5,0" HorizontalAlignment="Right">
<Grid.ColumnDefinitions>
<CheckBox Style="{StaticResource CheckBox_VizConnection}" IsChecked="{Binding Path=VizEngineModel.IsConnected}"
<ColumnDefinition Width="60"></ColumnDefinition>
IsHitTestVisible="False"></CheckBox>
<ColumnDefinition Width="80"></ColumnDefinition>
<ComboBox Height="20" Width="200" Margin="10,0,0,0"
<ColumnDefinition Width="60"></ColumnDefinition>
ItemsSource="{Binding Path=VizConnections}"
<ColumnDefinition Width="60"></ColumnDefinition>
SelectedValue="{Binding Path=SelectedVizConnection,Mode=TwoWay}">
<ColumnDefinition Width="*"></ColumnDefinition>
<ComboBox.ItemTemplate>
</Grid.ColumnDefinitions>
<DataTemplate>
<!-- 主库IP -->
<StackPanel Orientation="Horizontal">
<TextBlock Text="主库IP:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0"></TextBlock>
<TextBlock VerticalAlignment="Center" Text="{Binding Path=IP}"></TextBlock>
<TextBlock Text="127.0.0.1" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="1"></TextBlock>
<TextBlock VerticalAlignment="Center" Text=":" Margin="5,0,5,0"></TextBlock>
<!-- 主库端口 -->
<TextBlock VerticalAlignment="Center" Text="{Binding Path=Port}"></TextBlock>
<TextBlock Text="主库端口:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0" Grid.Column="2"></TextBlock>
</StackPanel>
<TextBlock Text="6100" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="3"></TextBlock>
</DataTemplate>
<!-- 主库连接按钮 -->
</ComboBox.ItemTemplate>
<Button Grid.Column="4" Height="20" Width="80" Content="连接"></Button>
</ComboBox>
</Grid>
<!-- 备库 -->
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60"></ColumnDefinition>
<ColumnDefinition Width="80"></ColumnDefinition>
<ColumnDefinition Width="60"></ColumnDefinition>
<ColumnDefinition Width="60"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<!-- 备库IP -->
<TextBlock Text="备库IP:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0"></TextBlock>
<TextBlock Text="127.0.0.1" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="1"></TextBlock>
<!-- 备库端口 -->
<TextBlock Text="备库端口:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0" Grid.Column="2"></TextBlock>
<TextBlock Text="6100" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="3"></TextBlock>
<!-- 主库连接按钮 -->
<!-- 主库连接按钮 -->
<Button Grid.Column="4" Height="20" Width="80" Content="连接"></Button>
<Button Grid.Column="4" Height="20" Width="80" Content="连接" Margin="10,0,0,0"
</Grid>
Command="{Binding Path=ConnectCommand}"
</Grid>
IsEnabled="{Binding Path=IsConnectButtonEnabled}"></Button>
</StackPanel>
</Border>
</Border>
</Grid>
</Grid>
</UserControl>
</UserControl>
VIZ.TVP.Golf.Module/Main/ViewModel/MainViewModel.cs
View file @
0e27a4ec
...
@@ -5,9 +5,11 @@ using System.Collections.ObjectModel;
...
@@ -5,9 +5,11 @@ using System.Collections.ObjectModel;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
System.Windows
;
using
VIZ.Framework.Common
;
using
VIZ.Framework.Common
;
using
VIZ.Framework.Core
;
using
VIZ.Framework.Core
;
using
VIZ.TVP.Golf.Domain
;
using
VIZ.TVP.Golf.Domain
;
using
VIZ.TVP.Golf.Storage
;
namespace
VIZ.TVP.Golf.Module
namespace
VIZ.TVP.Golf.Module
{
{
...
@@ -18,7 +20,151 @@ namespace VIZ.TVP.Golf.Module
...
@@ -18,7 +20,151 @@ namespace VIZ.TVP.Golf.Module
{
{
public
MainViewModel
()
public
MainViewModel
()
{
{
// 初始化属性
this
.
InitProperty
();
// 初始化命令
this
.
InitCommand
();
}
}
/// <summary>
/// 初始化命令
/// </summary>
private
void
InitCommand
()
{
this
.
ConnectCommand
=
new
VCommand
(
this
.
Connect
);
this
.
DisconnectCommand
=
new
VCommand
(
this
.
Disconnect
);
}
/// <summary>
/// 初始化属性
/// </summary>
private
void
InitProperty
()
{
ObservableCollection
<
VizEngineConnectionItem
>
items
=
new
ObservableCollection
<
VizEngineConnectionItem
>();
string
ip1
=
ApplicationDomainEx
.
IniStorage
.
GetValue
<
ClientConfig
,
string
>(
p
=>
p
.
CLIENT_VIZ_IP
);
int
port1
=
ApplicationDomainEx
.
IniStorage
.
GetValue
<
ClientConfig
,
int
>(
p
=>
p
.
CLIENT_VIZ_PORT
);
items
.
Add
(
new
VizEngineConnectionItem
(
ip1
,
port1
));
string
ip2
=
ApplicationDomainEx
.
IniStorage
.
GetValue
<
ClientConfig
,
string
>(
p
=>
p
.
CLIENT_VIZ_IP_STANDBY
);
int
port2
=
ApplicationDomainEx
.
IniStorage
.
GetValue
<
ClientConfig
,
int
>(
p
=>
p
.
CLIENT_VIZ_PORT_STANDBY
);
items
.
Add
(
new
VizEngineConnectionItem
(
ip2
,
port2
));
this
.
VizConnections
=
items
;
this
.
SelectedVizConnection
=
items
[
0
];
}
// ===================================================================================
// Property
// ===================================================================================
#
region
IsConnectButtonEnabled
--
连接按钮是否可用
private
bool
isConnectButtonEnabled
=
true
;
/// <summary>
/// 连接按钮是否可用
/// </summary>
public
bool
IsConnectButtonEnabled
{
get
{
return
isConnectButtonEnabled
;
}
set
{
isConnectButtonEnabled
=
value
;
this
.
RaisePropertySaveChanged
(
nameof
(
IsConnectButtonEnabled
));
}
}
#
endregion
#
region
VizConnections
--
VIZ
连接集合
private
ObservableCollection
<
VizEngineConnectionItem
>
vizConnections
;
/// <summary>
/// VIZ 连接集合
/// </summary>
public
ObservableCollection
<
VizEngineConnectionItem
>
VizConnections
{
get
{
return
vizConnections
;
}
set
{
vizConnections
=
value
;
}
}
#
endregion
#
region
SelectedVizConnection
--
当前选中的
VIZ
连接
private
VizEngineConnectionItem
selectedVizConnection
;
/// <summary>
/// 当前选中的VIZ连接
/// </summary>
public
VizEngineConnectionItem
SelectedVizConnection
{
get
{
return
selectedVizConnection
;
}
set
{
selectedVizConnection
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectedVizConnection
));
}
}
#
endregion
#
region
VizEngineModel
--
VIZ
引擎模型
private
VizEngineModel
vizEngineModel
=
ApplicationDomainEx
.
VizEngineModel
;
/// <summary>
/// VIZ引擎模型
/// </summary>
public
VizEngineModel
VizEngineModel
{
get
{
return
vizEngineModel
;
}
set
{
vizEngineModel
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
VizEngineModel
));
}
}
#
endregion
// ===================================================================================
// Command
// ===================================================================================
#
region
ConnectCommand
--
连接命令
/// <summary>
/// 连接命令
/// </summary>
public
VCommand
ConnectCommand
{
get
;
set
;
}
/// <summary>
/// 连接
/// </summary>
private
void
Connect
()
{
this
.
IsConnectButtonEnabled
=
false
;
Task
.
Run
(()
=>
{
bool
result
=
ApplicationDomainEx
.
VizEngineModel
.
Connection
(
this
.
SelectedVizConnection
.
IP
,
this
.
SelectedVizConnection
.
Port
);
if
(!
result
)
{
MessageBox
.
Show
(
$"连接
{
this
.
SelectedVizConnection
?.
IP
}
:
{
this
.
SelectedVizConnection
?.
Port
}
失败"
);
}
this
.
IsConnectButtonEnabled
=
true
;
});
}
#
endregion
#
region
DisconnectCommand
--
断开命令
/// <summary>
/// 断开命令
/// </summary>
public
VCommand
DisconnectCommand
{
get
;
set
;
}
/// <summary>
/// 断开连接
/// </summary>
private
void
Disconnect
()
{
ApplicationDomainEx
.
VizEngineModel
.
Disconnect
();
}
#
endregion
}
}
}
}
VIZ.TVP.Golf.Module/Package/BottomHoleInfo/ViewModel/BottomHoleInfoViewModel.cs
View file @
0e27a4ec
...
@@ -49,12 +49,12 @@ namespace VIZ.TVP.Golf.Module
...
@@ -49,12 +49,12 @@ namespace VIZ.TVP.Golf.Module
// Command
// Command
// ===================================================================================
// ===================================================================================
#
region
S
endCommand
--
发送
命令
#
region
S
tartCommand
--
开始
命令
/// <summary>
/// <summary>
/// 执行发送命令
/// 执行发送命令
/// </summary>
/// </summary>
protected
override
void
S
end
()
protected
override
void
S
tart
()
{
{
}
}
...
...
VIZ.TVP.Golf.Module/Package/Champion/ViewModel/ChampionViewModel.cs
View file @
0e27a4ec
...
@@ -58,12 +58,12 @@ namespace VIZ.TVP.Golf.Module
...
@@ -58,12 +58,12 @@ namespace VIZ.TVP.Golf.Module
// Command
// Command
// ===================================================================================
// ===================================================================================
#
region
S
endCommand
--
发送
命令
#
region
S
tartCommand
--
开始
命令
/// <summary>
/// <summary>
/// 执行发送命令
/// 执行发送命令
/// </summary>
/// </summary>
protected
override
void
S
end
()
protected
override
void
S
tart
()
{
{
}
}
...
...
VIZ.TVP.Golf.Module/Package/GroupHoleInfo/ViewModel/GroupHoleInfoViewModel.cs
View file @
0e27a4ec
...
@@ -133,12 +133,12 @@ namespace VIZ.TVP.Golf.Module
...
@@ -133,12 +133,12 @@ namespace VIZ.TVP.Golf.Module
// Command
// Command
// ===================================================================================
// ===================================================================================
#
region
S
endCommand
--
发送
命令
#
region
S
tartCommand
--
开始
命令
/// <summary>
/// <summary>
/// 执行发送命令
/// 执行发送命令
/// </summary>
/// </summary>
protected
override
void
S
end
()
protected
override
void
S
tart
()
{
{
}
}
...
...
VIZ.TVP.Golf.Module/Package/GroupInfo/View/GroupInfoSingleView.xaml
0 → 100644
View file @
0e27a4ec
<UserControl x:Class="VIZ.TVP.Golf.Module.GroupInfoSingleView"
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:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
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"
d:Background="White"
d:DataContext="{d:DesignInstance Type=local:GroupInfoSingleViewModel}"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="1600">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.TVP.Golf.Module.Resource;component/Style/IconButton/IconButton_Default.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
<core:String2ImageSourceConverter x:Key="String2ImageSourceConverter" Type="Relative" WorkPath="picture/player"></core:String2ImageSourceConverter>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="600"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<!-- 版子操作 -->
<Border Grid.Row="0" Grid.ColumnSpan="2" BorderBrush="#44000000" Background="#66b6f2e3" BorderThickness="1" Margin="5" Padding="5">
<StackPanel Orientation="Horizontal">
<fcommon:IconButton Style="{StaticResource IconButton_Default}"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/db_16x16.png"
Content="加载本地数据" Command="{Binding Path=LoadLocalDataCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
IsEnabled="{Binding Path=IsLoadRemoteDataEnabled,Mode=OneWay}"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/refresh_16x16.png"
Content="刷新实时数据" Command="{Binding Path=LoadRemoteDataCommand}"></fcommon:IconButton>
</StackPanel>
</Border>
<!-- 版子信息 -->
<Border Grid.Row="1" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="140"></RowDefinition>
<RowDefinition Height="220"></RowDefinition>
<RowDefinition Height="220"></RowDefinition>
</Grid.RowDefinitions>
<!-- 轮次与洞号 -->
<GroupBox Padding="10" Grid.Row="0">
<GroupBox.Header>
<TextBlock Text="轮次与洞号" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="40"></RowDefinition>
</Grid.RowDefinitions>
<!-- 轮次 -->
<TextBlock Text="轮次:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,5,0"></TextBlock>
<ComboBox Height="30" Width="240" VerticalContentAlignment="Center" Grid.Column="1" HorizontalAlignment="Left"
Margin="5,0,0,0"
SelectedValue="{Binding Path=SelectedRound,Mode=TwoWay}"
ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.Rounds}}"></ComboBox>
<!-- 洞号 -->
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="1" Grid.Column="0" Margin="0,0,5,0" Orientation="Horizontal">
<Image Width="16" Height="16" Source="/VIZ.TVP.Golf.Module.Resource;component/Icons/refresh_16x16.png" Margin="0,0,5,0"></Image>
<TextBlock Text="洞号:" ></TextBlock>
</StackPanel>
<ComboBox Height="30" Width="240" VerticalContentAlignment="Center" Grid.Column="1" HorizontalAlignment="Left"
Margin="5,0,0,0" Grid.Row="1"
SelectedValue="{Binding Path=SelectedHoleInfo,Mode=TwoWay}" DisplayMemberPath="HoleID"
ItemsSource="{Binding Source={x:Static domain:ApplicationDomainEx.HoleInfos}}"></ComboBox>
</Grid>
</GroupBox>
<!-- 分组 -->
<GroupBox Grid.Row="1" Padding="10">
<GroupBox.Header>
<TextBlock Text="分组" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<local:GroupPickerPanelNoPlayer DataContext="{Binding GroupPickerPanelModel}"></local:GroupPickerPanelNoPlayer>
</GroupBox>
</Grid>
</Border>
<!-- 示意图 -->
<Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="300"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
</Grid.RowDefinitions>
<Image Source="pack://SiteOfOrigin:,,,/images/GroupInfo.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="上版子" Command="{Binding StartCommand}"></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>
</StackPanel>
</Grid>
</Border>
</Grid>
</UserControl>
VIZ.TVP.Golf.Module/Package/GroupInfo/View/GroupInfoSingleView.xaml.cs
0 → 100644
View file @
0e27a4ec
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>
/// GroupInfoSingleView.xaml 的交互逻辑
/// </summary>
public
partial
class
GroupInfoSingleView
:
UserControl
{
public
GroupInfoSingleView
()
{
InitializeComponent
();
WPFHelper
.
BindingViewModel
(
this
,
new
GroupInfoSingleViewModel
());
}
}
}
VIZ.TVP.Golf.Module/Package/GroupInfo/ViewModel/GroupInfoSingleViewModel.cs
0 → 100644
View file @
0e27a4ec
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Web.WebSockets
;
using
System.Windows
;
using
VIZ.Framework.Core
;
using
VIZ.TVP.Golf.Domain
;
namespace
VIZ.TVP.Golf.Module
{
/// <summary>
/// 包装视图模型 -- 小组信息
/// </summary>
public
class
GroupInfoSingleViewModel
:
PackageViewModelBase
{
public
GroupInfoSingleViewModel
()
{
}
// ===================================================================================
// Property
// ===================================================================================
#
region
SelectedRound
--
选中的轮次
private
int
selectedRound
=
2
;
/// <summary>
/// 选中的轮次
/// </summary>
public
int
SelectedRound
{
get
{
return
selectedRound
;
}
set
{
selectedRound
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectedRound
));
}
}
#
endregion
#
region
SelectedHoleInfo
--
选中的洞信息
private
HoleInfoModel
selectedHoleInfo
;
/// <summary>
/// 选中的洞信息
/// </summary>
public
HoleInfoModel
SelectedHoleInfo
{
get
{
return
selectedHoleInfo
;
}
set
{
selectedHoleInfo
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectedHoleInfo
));
}
}
#
endregion
#
region
GroupPickerPanelModel
--
分组选择面板模型
1
private
GroupPickerPanelModel
groupPickerPanelModel
=
new
GroupPickerPanelModel
();
/// <summary>
/// 分组选择面板模型1
/// </summary>
public
GroupPickerPanelModel
GroupPickerPanelModel
{
get
{
return
groupPickerPanelModel
;
}
set
{
groupPickerPanelModel
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
GroupPickerPanelModel
));
}
}
#
endregion
// ===================================================================================
// Command
// ===================================================================================
// ===================================================================================
// Command
// ===================================================================================
#
region
StartCommand
--
开始命令
/// <summary>
/// 执行发送命令
/// </summary>
/// <remarks>
/// format: hole_id|team_logo|player1_name|player2_name|score
/// </remarks>
protected
override
void
Start
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
Append
(
$"
{
this
.
SelectedHoleInfo
?.
HoleID
}
|
{
this
.
GroupPickerPanelModel
.
Name
}
|
{
this
.
GroupPickerPanelModel
.
Player1
.
Name
}
|
{
this
.
GroupPickerPanelModel
.
Player2
.
Name
}
|
{
this
.
GroupPickerPanelModel
.
PlayersScore
}
"
);
ApplicationDomainEx
.
VizEngineModel
.
STAGE_START
(
"14-SZXXT"
,
"OnSetData"
,
sb
.
ToString
());
}
#
endregion
#
region
LoadLocalDataCommand
--
加载本地数据命令
/// <summary>
/// 加载本地数据
/// </summary>
protected
override
void
LoadLocalData
()
{
RealDataWindow
window
=
new
RealDataWindow
();
window
.
ShowDialog
();
RealDataViewModel
vm
=
window
.
realDataView
.
DataContext
as
RealDataViewModel
;
if
(
vm
==
null
)
return
;
if
(!
vm
.
IsEnter
)
return
;
List
<
PlayerRealModel
>
list
=
this
.
realDataService
.
LoadPlayerRealModelFormLocal
(
vm
.
SelectedFile
.
FileName
);
this
.
GroupPickerPanelModel
.
UpdatePlayersScore
(
list
,
this
.
SelectedRound
);
// 预设洞号
int
?
holeId
=
this
.
realDataService
.
GetGroupCurrentHole
(
list
,
this
.
GroupPickerPanelModel
.
SelectedGroupInfo
,
this
.
SelectedRound
);
this
.
SelectedHoleInfo
=
ApplicationDomainEx
.
HoleInfos
.
FirstOrDefault
(
p
=>
p
.
HoleID
==
(
holeId
??
-
1
));
}
#
endregion
#
region
LoadRemoteDataCommand
--
加载远程数据命令
/// <summary>
/// 加载远程数据
/// </summary>
protected
override
void
LoadRemoteData
()
{
Task
.
Run
(()
=>
{
string
fileName
=
this
.
realDataService
.
DownLoadData
(
INTERFACE_TOURNAMENT
);
if
(
string
.
IsNullOrWhiteSpace
(
fileName
))
{
MessageBox
.
Show
(
"加载远程数据失败!"
);
return
;
}
WPFHelper
.
BeginInvoke
(()
=>
{
List
<
PlayerRealModel
>
list
=
this
.
realDataService
.
LoadPlayerRealModelFormLocal
(
fileName
);
});
});
}
#
endregion
}
}
VIZ.TVP.Golf.Module/Package/GroupInfo/ViewModel/GroupInfoViewModel.cs
View file @
0e27a4ec
...
@@ -97,12 +97,12 @@ namespace VIZ.TVP.Golf.Module
...
@@ -97,12 +97,12 @@ namespace VIZ.TVP.Golf.Module
// Command
// Command
// ===================================================================================
// ===================================================================================
#
region
S
endCommand
--
发送
命令
#
region
S
tartCommand
--
开始
命令
/// <summary>
/// <summary>
/// 执行发送命令
/// 执行发送命令
/// </summary>
/// </summary>
protected
override
void
S
end
()
protected
override
void
S
tart
()
{
{
}
}
...
...
VIZ.TVP.Golf.Module/Package/GroupInfo/ViewModel/GroupInfoWithHoleViewModel.cs
View file @
0e27a4ec
...
@@ -46,12 +46,12 @@ namespace VIZ.TVP.Golf.Module
...
@@ -46,12 +46,12 @@ namespace VIZ.TVP.Golf.Module
// Command
// Command
// ===================================================================================
// ===================================================================================
#
region
S
endCommand
--
发送
命令
#
region
S
tartCommand
--
开始
命令
/// <summary>
/// <summary>
/// 执行发送命令
/// 执行发送命令
/// </summary>
/// </summary>
protected
override
void
S
end
()
protected
override
void
S
tart
()
{
{
}
}
...
...
VIZ.TVP.Golf.Module/Package/GroupRanking/AfterMatchGroupRanking/View/AfterMatchGroupRankingView.xaml
View file @
0e27a4ec
...
@@ -46,30 +46,6 @@
...
@@ -46,30 +46,6 @@
<!-- 版子信息 -->
<!-- 版子信息 -->
<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>
<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 Padding="10" Grid.Row="1">
<GroupBox.Header>
<GroupBox.Header>
...
...
VIZ.TVP.Golf.Module/Package/GroupRanking/BeforeMatchGroupRanking/View/BeforeMatchGroupRankingView.xaml
View file @
0e27a4ec
...
@@ -46,30 +46,6 @@
...
@@ -46,30 +46,6 @@
<!-- 版子信息 -->
<!-- 版子信息 -->
<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>
<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 Padding="10" Grid.Row="1">
<GroupBox.Header>
<GroupBox.Header>
...
...
VIZ.TVP.Golf.Module/Package/GroupRanking/GroupRankingViewModelBase.cs
View file @
0e27a4ec
...
@@ -53,12 +53,12 @@ namespace VIZ.TVP.Golf.Module
...
@@ -53,12 +53,12 @@ namespace VIZ.TVP.Golf.Module
// Command
// Command
// ===================================================================================
// ===================================================================================
#
region
S
endCommand
--
发送
命令
#
region
S
tartCommand
--
开始
命令
/// <summary>
/// <summary>
/// 执行发送命令
/// 执行发送命令
/// </summary>
/// </summary>
protected
override
void
S
end
()
protected
override
void
S
tart
()
{
{
}
}
...
...
VIZ.TVP.Golf.Module/Package/PackageViewModelBase.cs
View file @
0e27a4ec
...
@@ -24,7 +24,8 @@ namespace VIZ.TVP.Golf.Module
...
@@ -24,7 +24,8 @@ namespace VIZ.TVP.Golf.Module
public
PackageViewModelBase
()
public
PackageViewModelBase
()
{
{
this
.
SendCommand
=
new
VCommand
(
this
.
Send
);
this
.
StartCommand
=
new
VCommand
(
this
.
Start
);
this
.
StopCommand
=
new
VCommand
(
this
.
Stop
);
this
.
LoadLocalDataCommand
=
new
VCommand
(
this
.
LoadLocalData
);
this
.
LoadLocalDataCommand
=
new
VCommand
(
this
.
LoadLocalData
);
this
.
LoadRemoteDataCommand
=
new
VCommand
(
this
.
LoadRemoteDataShell
);
this
.
LoadRemoteDataCommand
=
new
VCommand
(
this
.
LoadRemoteDataShell
);
}
}
...
@@ -65,20 +66,38 @@ namespace VIZ.TVP.Golf.Module
...
@@ -65,20 +66,38 @@ namespace VIZ.TVP.Golf.Module
// Command
// Command
// ===================================================================================
// ===================================================================================
#
region
S
endCommand
--
发送
命令
#
region
S
tartCommand
--
开始
命令
/// <summary>
/// <summary>
///
发送
命令
///
开始
命令
/// </summary>
/// </summary>
public
VCommand
S
end
Command
{
get
;
set
;
}
public
VCommand
S
tart
Command
{
get
;
set
;
}
/// <summary>
/// <summary>
///
发送
指令
///
开始
指令
/// </summary>
/// </summary>
protected
abstract
void
S
end
();
protected
abstract
void
S
tart
();
#
endregion
#
endregion
#
region
StopCommand
--
停止命令
/// <summary>
/// 停止命令
/// </summary>
public
VCommand
StopCommand
{
get
;
set
;
}
/// <summary>
/// 停止
/// </summary>
protected
virtual
void
Stop
()
{
ApplicationDomainEx
.
VizEngineModel
.
Send
(
VizEngineCommands
.
STAGE_CONTINUE
);
}
#
endregion
#
region
LoadLocalDataCommand
--
加载本地数据命令
#
region
LoadLocalDataCommand
--
加载本地数据命令
/// <summary>
/// <summary>
...
...
VIZ.TVP.Golf.Module/Package/TeamInfo/View/TeamInfoView.xaml
View file @
0e27a4ec
...
@@ -70,7 +70,10 @@
...
@@ -70,7 +70,10 @@
ItemsSource="{Binding Path=TeamPickerPanelModel.PlayerTempModels,Mode=OneWay}" FontSize="14"
ItemsSource="{Binding Path=TeamPickerPanelModel.PlayerTempModels,Mode=OneWay}" FontSize="14"
SelectedValue="{Binding Path=SelectedPlayerTempModel,Mode=TwoWay}">
SelectedValue="{Binding Path=SelectedPlayerTempModel,Mode=TwoWay}">
<DataGrid.Columns>
<DataGrid.Columns>
<DataGridTextColumn Header="姓名" Width="200" Binding="{Binding Path=Name,Mode=TwoWay}"></DataGridTextColumn>
<DataGridTextColumn Header="姓名" Width="120" Binding="{Binding Path=Name,Mode=TwoWay}"></DataGridTextColumn>
<DataGridComboBoxColumn Header="分组" Width="100"
ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.Groups}}"
SelectedValueBinding="{Binding Path=Group,Mode=TwoWay}"></DataGridComboBoxColumn>
<DataGridComboBoxColumn Header="照片" Width="200"
<DataGridComboBoxColumn Header="照片" Width="200"
ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.PlayerPictures}}"
ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.PlayerPictures}}"
SelectedValueBinding="{Binding Path=HalfPicture}"></DataGridComboBoxColumn>
SelectedValueBinding="{Binding Path=HalfPicture}"></DataGridComboBoxColumn>
...
@@ -100,10 +103,12 @@
...
@@ -100,10 +103,12 @@
<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"
Content="上版子"></fcommon:IconButton>
Content="上版子"
Command="{Binding 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="下版子"></fcommon:IconButton>
Content="下版子"
Command="{Binding Path=StopCommand}"></fcommon:IconButton>
</StackPanel>
</StackPanel>
</Grid>
</Grid>
</Border>
</Border>
...
...
VIZ.TVP.Golf.Module/Package/TeamInfo/ViewModel/TeamInfoViewModel.cs
View file @
0e27a4ec
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Linq.Expressions
;
using
System.Text
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
System.Windows.Markup
;
using
System.Windows.Navigation
;
using
VIZ.Framework.Core
;
using
VIZ.Framework.Core
;
using
VIZ.TVP.Golf.Domain
;
using
VIZ.TVP.Golf.Domain
;
...
@@ -68,14 +71,42 @@ namespace VIZ.TVP.Golf.Module
...
@@ -68,14 +71,42 @@ namespace VIZ.TVP.Golf.Module
// Command
// Command
// ===================================================================================
// ===================================================================================
#
region
S
endCommand
--
发送
命令
#
region
S
tartCommand
--
开始
命令
/// <summary>
/// <summary>
/// 执行发送命令
/// 执行发送命令
/// </summary>
/// </summary>
protected
override
void
Send
()
/// <remarks>
/// format: team_name|team_logo#group_name|player1_name|player1_logo|player2_name|player2_logo*
/// </remarks>
protected
override
void
Start
()
{
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
Append
(
$"
{
this
.
TeamPickerPanelModel
.
Name
}
|
{
this
.
TeamPickerPanelModel
.
Logo
}
#"
);
if
(
this
.
TeamPickerPanelModel
.
PlayerTempModels
!=
null
)
{
var
groups
=
this
.
TeamPickerPanelModel
.
PlayerTempModels
.
Where
(
p
=>
!
string
.
IsNullOrWhiteSpace
(
p
.
Group
)).
GroupBy
(
p
=>
p
.
Group
).
ToList
();
for
(
int
i
=
0
;
i
<
groups
.
Count
;
i
++)
{
var
players
=
groups
[
i
].
ToList
();
if
(
players
.
Count
!=
2
)
continue
;
string
group_name
=
groups
[
i
].
Key
;
string
player1_name
=
players
[
0
].
Name
;
string
player1_logo
=
this
.
realDataService
.
GetImageName
(
players
[
0
].
HalfPicture
);
string
player2_name
=
players
[
1
].
Name
;
string
player2_logo
=
this
.
realDataService
.
GetImageName
(
players
[
1
].
HalfPicture
);
sb
.
Append
(
$"
{
group_name
}
|
{
player1_name
}
|
{
player1_logo
}
|
{
player2_name
}
|
{
player2_logo
}
"
);
if
(
i
<
groups
.
Count
-
1
)
{
sb
.
Append
(
"*"
);
}
}
}
ApplicationDomainEx
.
VizEngineModel
.
STAGE_START
(
"12-QDXX"
,
"OnSetData"
,
sb
.
ToString
());
}
}
#
endregion
#
endregion
...
...
VIZ.TVP.Golf.Module/Package/TeamRanking/TeamRankingViewModelBase.cs
View file @
0e27a4ec
...
@@ -54,12 +54,12 @@ namespace VIZ.TVP.Golf.Module
...
@@ -54,12 +54,12 @@ namespace VIZ.TVP.Golf.Module
// Command
// Command
// ===================================================================================
// ===================================================================================
#
region
S
endCommand
--
发送
命令
#
region
S
tartCommand
--
开始
命令
/// <summary>
/// <summary>
/// 执行发送命令
/// 执行发送命令
/// </summary>
/// </summary>
protected
override
void
S
end
()
protected
override
void
S
tart
()
{
{
}
}
...
...
VIZ.TVP.Golf.Module/Setup/Provider/Setup/AppSetup_InitVIZ.cs
0 → 100644
View file @
0e27a4ec
using
log4net
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.ObjectModel
;
using
System.Linq
;
using
System.Reflection
;
using
System.Text
;
using
System.Threading.Tasks
;
using
VIZ.Framework.Core
;
using
VIZ.Framework.Module
;
using
VIZ.TVP.Golf.Domain
;
using
VIZ.TVP.Golf.Storage
;
namespace
VIZ.TVP.Golf.Module
{
/// <summary>
/// 应用程序启动 -- 初始化VIZ
/// </summary>
public
class
AppSetup_InitVIZ
:
AppSetupBase
{
/// <summary>
/// 日志
/// </summary>
private
static
ILog
log
=
LogManager
.
GetLogger
(
typeof
(
AppSetup_InitVIZ
));
/// <summary>
/// 描述
/// </summary>
public
override
string
Detail
{
get
;
}
=
"应用程序启动 -- 初始化VIZ"
;
/// <summary>
/// 执行启动
/// </summary>
/// <param name="context">应用程序启动上下文</param>
/// <returns>是否成功执行</returns>
public
override
bool
Setup
(
AppSetupContext
context
)
{
ApplicationDomainEx
.
VizEngineModel
=
new
VizEngineModel
();
return
true
;
}
/// <summary>
/// 执行关闭
/// </summary>
/// <param name="context">应用程序启动上下文</param>
public
override
void
Shutdown
(
AppSetupContext
context
)
{
ApplicationDomainEx
.
VizEngineModel
?.
Dispose
();
}
}
}
\ No newline at end of file
VIZ.TVP.Golf.Module/VIZ.TVP.Golf.Module.csproj
View file @
0e27a4ec
...
@@ -93,6 +93,10 @@
...
@@ -93,6 +93,10 @@
</Reference>
</Reference>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Page Include="Package\GroupInfo\View\GroupInfoSingleView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Package\GroupInfo\View\GroupInfoWithHoleView.xaml">
<Page Include="Package\GroupInfo\View\GroupInfoWithHoleView.xaml">
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<SubType>Designer</SubType>
...
@@ -219,7 +223,11 @@
...
@@ -219,7 +223,11 @@
</Page>
</Page>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile Include="Package\GroupInfo\ViewModel\GroupInfoSingleViewModel.cs" />
<Compile Include="Package\GroupInfo\ViewModel\GroupInfoWithHoleViewModel.cs" />
<Compile Include="Package\GroupInfo\ViewModel\GroupInfoWithHoleViewModel.cs" />
<Compile Include="Package\GroupInfo\View\GroupInfoSingleView.xaml.cs">
<DependentUpon>GroupInfoSingleView.xaml</DependentUpon>
</Compile>
<Compile Include="Package\GroupInfo\View\GroupInfoWithHoleView.xaml.cs">
<Compile Include="Package\GroupInfo\View\GroupInfoWithHoleView.xaml.cs">
<DependentUpon>GroupInfoWithHoleView.xaml</DependentUpon>
<DependentUpon>GroupInfoWithHoleView.xaml</DependentUpon>
</Compile>
</Compile>
...
@@ -271,6 +279,7 @@
...
@@ -271,6 +279,7 @@
<DependentUpon>TeamInfoView.xaml</DependentUpon>
<DependentUpon>TeamInfoView.xaml</DependentUpon>
</Compile>
</Compile>
<Compile Include="Package\TeamRanking\TeamRankingViewModelBase.cs" />
<Compile Include="Package\TeamRanking\TeamRankingViewModelBase.cs" />
<Compile Include="Setup\Provider\Setup\AppSetup_InitVIZ.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>
...
@@ -427,6 +436,8 @@
...
@@ -427,6 +436,8 @@
<Name>VIZ.TVP.Golf.Storage</Name>
<Name>VIZ.TVP.Golf.Storage</Name>
</ProjectReference>
</ProjectReference>
</ItemGroup>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Folder Include="Main\Model\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
</Project>
\ No newline at end of file
VIZ.TVP.Golf.Service/RealData/Implementation/RealDataService.cs
View file @
0e27a4ec
...
@@ -147,6 +147,16 @@ namespace VIZ.TVP.Golf.Service
...
@@ -147,6 +147,16 @@ namespace VIZ.TVP.Golf.Service
}
}
/// <summary>
/// <summary>
/// 获取图片名字
/// </summary>
/// <param name="path">图片路径</param>
/// <returns>图片资源名字</returns>
public
string
GetImageName
(
string
path
)
{
return
path
;
}
/// <summary>
/// 获取队伍每洞得分
/// 获取队伍每洞得分
/// </summary>
/// </summary>
/// <param name="players">球员集合</param>
/// <param name="players">球员集合</param>
...
@@ -487,5 +497,39 @@ namespace VIZ.TVP.Golf.Service
...
@@ -487,5 +497,39 @@ namespace VIZ.TVP.Golf.Service
after_group
.
PositionChangedDesc
=
$"
{
after_group
.
PositionOldIndex
}
-->
{
after_group
.
PositionNewIndex
}
"
;
after_group
.
PositionChangedDesc
=
$"
{
after_group
.
PositionOldIndex
}
-->
{
after_group
.
PositionNewIndex
}
"
;
}
}
}
}
/// <summary>
/// 获取分组当前所在洞号
/// </summary>
/// <param name="list">真实数据列表</param>
/// <param name="group">分组</param>
/// <param name="round">轮次</param>
/// <returns>当前所在洞号</returns>
public
int
?
GetGroupCurrentHole
(
List
<
PlayerRealModel
>
list
,
GroupTempModel
group
,
int
round
)
{
if
(
group
==
null
||
group
.
Player1
==
null
||
group
.
Player2
==
null
)
return
null
;
PlayerRealModel
player1
=
list
.
FirstOrDefault
(
p
=>
p
.
PlayerID
==
group
.
Player1
.
PlayerID
);
PlayerRealModel
player2
=
list
.
FirstOrDefault
(
p
=>
p
.
PlayerID
==
group
.
Player2
.
PlayerID
);
if
(
player1
==
null
||
player2
==
null
)
return
null
;
RoundRealModel
round1
=
player1
.
Rounds
.
FirstOrDefault
(
p
=>
p
.
No
==
round
);
RoundRealModel
round2
=
player2
.
Rounds
.
FirstOrDefault
(
p
=>
p
.
No
==
round
);
if
(
round1
==
null
||
round2
==
null
)
return
null
;
if
(
round1
.
Thru
<
ApplicationDomainEx
.
HoleInfos
.
Count
)
{
return
(
round1
.
StartingTee
+
round1
.
Thru
)
%
ApplicationDomainEx
.
HoleInfos
.
Count
;
}
else
{
int
rsult
=
(
round1
.
StartingTee
+
round1
.
Thru
-
1
)
%
18
;
return
rsult
==
0
?
ApplicationDomainEx
.
HoleInfos
.
Count
:
rsult
;
}
}
}
}
}
}
VIZ.TVP.Golf.Service/RealData/Interface/IRealDataService.cs
View file @
0e27a4ec
...
@@ -46,6 +46,13 @@ namespace VIZ.TVP.Golf.Service
...
@@ -46,6 +46,13 @@ namespace VIZ.TVP.Golf.Service
string
GetScoreString
(
int
?
score
);
string
GetScoreString
(
int
?
score
);
/// <summary>
/// <summary>
/// 获取图片名字
/// </summary>
/// <param name="path">图片路径</param>
/// <returns>图片资源名字</returns>
string
GetImageName
(
string
path
);
/// <summary>
/// 获取队伍每洞得分
/// 获取队伍每洞得分
/// </summary>
/// </summary>
/// <param name="players">球员集合</param>
/// <param name="players">球员集合</param>
...
@@ -134,5 +141,14 @@ namespace VIZ.TVP.Golf.Service
...
@@ -134,5 +141,14 @@ namespace VIZ.TVP.Golf.Service
/// <param name="before">之前的排名</param>
/// <param name="before">之前的排名</param>
/// <param name="after">之后的排名</param>
/// <param name="after">之后的排名</param>
void
UpdateGroupPositionChanged
(
IList
<
GroupTempModel
>
before
,
IList
<
GroupTempModel
>
after
);
void
UpdateGroupPositionChanged
(
IList
<
GroupTempModel
>
before
,
IList
<
GroupTempModel
>
after
);
/// <summary>
/// 获取分组当前所在洞号
/// </summary>
/// <param name="list">真实数据列表</param>
/// <param name="group">分组</param>
/// <param name="round">轮次</param>
/// <returns>当前所在洞号</returns>
int
?
GetGroupCurrentHole
(
List
<
PlayerRealModel
>
list
,
GroupTempModel
group
,
int
round
);
}
}
}
}
VIZ.TVP.Golf/App.xaml.cs
View file @
0e27a4ec
...
@@ -23,6 +23,8 @@ namespace VIZ.TVP.Golf
...
@@ -23,6 +23,8 @@ namespace VIZ.TVP.Golf
AppSetup
.
AppendSetup
(
new
AppSetup_InitResource
());
AppSetup
.
AppendSetup
(
new
AppSetup_InitResource
());
// 初始化 清理远程数据
// 初始化 清理远程数据
AppSetup
.
AppendSetup
(
new
AppSetup_ClearLocalData
());
AppSetup
.
AppendSetup
(
new
AppSetup_ClearLocalData
());
// 初始化 VIZ
AppSetup
.
AppendSetup
(
new
AppSetup_InitVIZ
());
// 启动
// 启动
AppSetupContext
context
=
AppSetup
.
Setup
();
AppSetupContext
context
=
AppSetup
.
Setup
();
...
...
VIZ.TVP.Golf/VIZ.TVP.Golf.csproj
View file @
0e27a4ec
...
@@ -77,6 +77,9 @@
...
@@ -77,6 +77,9 @@
<Reference Include="System.Xaml">
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
</Reference>
<Reference Include="VizConnectC">
<HintPath>..\Lib\VizConnectC.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="PresentationFramework" />
...
...
VIZ.TVP.Golf/config/config.ini
View file @
0e27a4ec
...
@@ -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.
1
CLIENT_VIZ_IP_STANDBY
=
127.0.0.
2
; 备库 VIZ端口
; 备库 VIZ端口
CLIENT_VIZ_PORT_STANDBY
=
6100
CLIENT_VIZ_PORT_STANDBY
=
6100
; ============================================================
; ============================================================
...
...
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