Commit d9354276 by liulongfei

1. 四格人名条版

2. 中部队员排名版
parent 68a49368
......@@ -68,5 +68,10 @@ namespace VIZ.TVP.Golf.Domain
/// 4格人名条
/// </summary>
public const string FourNameBar = "FourNameBar";
/// <summary>
/// 中间球员排名
/// </summary>
public const string CenterPlayerRanking = "CenterPlayerRanking";
}
}
......@@ -122,10 +122,6 @@ namespace VIZ.TVP.Golf.Domain
#endregion
#region TeamModel -- 球队模型
#endregion
/// <summary>
/// 更新属性值实体模型
/// </summary>
......
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
using VIZ.TVP.Golf.Storage;
namespace VIZ.TVP.Golf.Domain
{
/// <summary>
/// 球员实时数据模型
/// </summary>
public class PlayerRealModel : ModelBase
{
/// <summary>
/// 节点
/// </summary>
public PlayerNode Node { get; set; }
#region Name -- 名称
private string name;
/// <summary>
/// 名称
/// </summary>
public string Name
{
get { return name; }
set { name = value; this.RaisePropertyChanged(nameof(Name)); }
}
#endregion
#region Country -- 国家
private string country;
/// <summary>
/// 国家
/// </summary>
public string Country
{
get { return country; }
set { country = value; this.RaisePropertyChanged(nameof(Country)); }
}
#endregion
#region Position -- 排名
private string position;
/// <summary>
/// 排名
/// </summary>
public string Position
{
get { return position; }
set { position = value; this.RaisePropertyChanged(nameof(Position)); }
}
#endregion
#region Score -- 得分
private int score;
/// <summary>
/// 得分
/// </summary>
public int Score
{
get { return score; }
set { score = value; this.RaisePropertyChanged(nameof(Score)); }
}
#endregion
#region Strokes -- 总杆数
private int strokes;
/// <summary>
/// 总杆数
/// </summary>
public int Strokes
{
get { return strokes; }
set { strokes = value; this.RaisePropertyChanged(nameof(Strokes)); }
}
#endregion
#region Rounds -- 轮次集合
private ObservableCollection<RoundRealModel> rounds = new ObservableCollection<RoundRealModel>();
/// <summary>
/// 轮次集合
/// </summary>
public ObservableCollection<RoundRealModel> Rounds
{
get { return rounds; }
set { rounds = value; this.RaisePropertyChanged(nameof(Rounds)); }
}
#endregion
/// <summary>
/// 从XML节点获取数据
/// </summary>
/// <param name="node">XML节点</param>
public void FromNode(PlayerNode node)
{
this.Node = node;
this.Name = node.pl_tvlname;
this.Country = node.country;
this.Position = node.position;
this.Score = node.score;
this.Strokes = node.strokes;
if (node.Rounds == null)
return;
foreach (RoundNode round in node.Rounds)
{
RoundRealModel model = new RoundRealModel();
model.FromNode(round);
this.Rounds.Add(model);
}
}
}
}
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
using VIZ.TVP.Golf.Storage;
namespace VIZ.TVP.Golf.Domain
{
/// <summary>
/// 轮次实时数据模型
/// </summary>
public class RoundRealModel : ModelBase
{
/// <summary>
/// 轮次节点
/// </summary>
public RoundNode Node { get; set; }
#region No -- 轮次序号
private int no;
/// <summary>
/// 轮次序号
/// </summary>
public int No
{
get { return no; }
set { no = value; this.RaisePropertyChanged(nameof(No)); }
}
#endregion
#region TeeTime -- 开球时间
private TimeSpan teeTime;
/// <summary>
/// 开球时间
/// </summary>
public TimeSpan TeeTime
{
get { return teeTime; }
set { teeTime = value; this.RaisePropertyChanged(nameof(TeeTime)); }
}
#endregion
#region StartingTee -- 开球台,从哪一洞开始的比赛
private int startingTee;
/// <summary>
/// 开球台,从哪一洞开始的比赛
/// </summary>
public int StartingTee
{
get { return startingTee; }
set { startingTee = value; this.RaisePropertyChanged(nameof(StartingTee)); }
}
#endregion
#region Thru -- 已经完成的洞数
private int thru;
/// <summary>
/// 已经完成的洞数
/// </summary>
public int Thru
{
get { return thru; }
set { thru = value; this.RaisePropertyChanged(nameof(Thru)); }
}
#endregion
#region Today -- 本轮(今日)杆数与标准杆的差值
private int today;
/// <summary>
/// 本轮(今日)杆数与标准杆的差值
/// </summary>
public int Today
{
get { return today; }
set { today = value; this.RaisePropertyChanged(nameof(Today)); }
}
#endregion
#region Total -- 本轮(进入)总杆数
private int total;
/// <summary>
/// 本轮(进入)总杆数
/// </summary>
public int Total
{
get { return total; }
set { total = value; this.RaisePropertyChanged(nameof(Total)); }
}
#endregion
#region Scores -- 得分集合
private ObservableCollection<ScoreRealModel> scores = new ObservableCollection<ScoreRealModel>();
/// <summary>
/// 得分集合
/// </summary>
public ObservableCollection<ScoreRealModel> Scores
{
get { return scores; }
set { scores = value; this.RaisePropertyChanged(nameof(Scores)); }
}
#endregion
/// <summary>
/// 从XML节点获取数据
/// </summary>
/// <param name="node">XML节点</param>
public void FromNode(RoundNode node)
{
this.Node = node;
this.No = node.no;
this.TeeTime = node.teetime;
this.StartingTee = node.startingtee;
this.Thru = node.thru;
this.Today = node.today;
this.Total = node.total;
if (node.Scores == null)
return;
foreach (ScoreNode score in node.Scores)
{
ScoreRealModel model = new ScoreRealModel();
model.FromNode(score);
this.Scores.Add(model);
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
using VIZ.TVP.Golf.Storage;
namespace VIZ.TVP.Golf.Domain
{
/// <summary>
/// 得分实时数据
/// </summary>
public class ScoreRealModel : ModelBase
{
/// <summary>
/// 节点
/// </summary>
public ScoreNode Node { get; private set; }
#region Hole -- 洞号
private int hole;
/// <summary>
/// 洞号
/// </summary>
public int Hole
{
get { return hole; }
set { hole = value; this.RaisePropertyChanged(nameof(Hole)); }
}
#endregion
#region Strokes -- 杆数
private int strokes;
/// <summary>
/// 杆数
/// </summary>
public int Strokes
{
get { return strokes; }
set { strokes = value; this.RaisePropertyChanged(nameof(Strokes)); }
}
#endregion
#region Par -- 标准杆
private int par;
/// <summary>
/// 标准杆
/// </summary>
public int Par
{
get { return par; }
set { par = value; this.RaisePropertyChanged(nameof(Par)); }
}
#endregion
#region Bunkers -- 沙滩救球数
private int bunkers;
/// <summary>
/// 沙滩救球数
/// </summary>
public int Bunkers
{
get { return bunkers; }
set { bunkers = value; this.RaisePropertyChanged(nameof(Bunkers)); }
}
#endregion
#region Putts -- 推杆数
private int putts;
/// <summary>
/// 推杆数
/// </summary>
public int Putts
{
get { return putts; }
set { putts = value; this.RaisePropertyChanged(nameof(Putts)); }
}
#endregion
#region Drive -- 开球距离
private double drive;
/// <summary>
/// 开球距离
/// </summary>
public double Drive
{
get { return drive; }
set { drive = value; this.RaisePropertyChanged(nameof(Drive)); }
}
#endregion
#region Fairway -- 是否发球上球道 1: | 0: | : 未记录
private int fairway;
/// <summary>
/// 是否发球上球道 1: 是 | 0: 否 | 空: 未记录
/// </summary>
public int Fairway
{
get { return fairway; }
set { fairway = value; this.RaisePropertyChanged(nameof(Fairway)); }
}
#endregion
/// <summary>
/// 从XML节点获取数据
/// </summary>
/// <param name="node">XML节点</param>
public void FromNode(ScoreNode node)
{
this.Node = node;
this.hole = node.hole;
this.Strokes = node.strokes;
this.Par = node.par;
this.Bunkers = node.bunkers;
this.Putts = node.putts;
this.drive = node.drive;
this.fairway = node.fairway;
}
}
}
......@@ -70,6 +70,9 @@
<Compile Include="Model\EntityModel\PlayerInfoModel.cs" />
<Compile Include="Model\EntityModel\TeamInfoModel.cs" />
<Compile Include="Model\EntityModel\TournamentInfoModel.cs" />
<Compile Include="Model\RealModel\PlayerRealModel.cs" />
<Compile Include="Model\RealModel\RoundRealModel.cs" />
<Compile Include="Model\RealModel\ScoreRealModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
......

2.84 KB | W: | H:

2.81 KB | W: | H:

VIZ.TVP.Golf.Module.Resource/Icons/down_16x16.png
VIZ.TVP.Golf.Module.Resource/Icons/down_16x16.png
VIZ.TVP.Golf.Module.Resource/Icons/down_16x16.png
VIZ.TVP.Golf.Module.Resource/Icons/down_16x16.png
  • 2-up
  • Swipe
  • Onion skin

211 Bytes | W: | H:

2.81 KB | W: | H:

VIZ.TVP.Golf.Module.Resource/Icons/up_16x16.png
VIZ.TVP.Golf.Module.Resource/Icons/up_16x16.png
VIZ.TVP.Golf.Module.Resource/Icons/up_16x16.png
VIZ.TVP.Golf.Module.Resource/Icons/up_16x16.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -34,10 +34,53 @@
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#aa86abe2"></Setter>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#4486abe2"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="IconButton_Red" TargetType="fcommon:IconButton">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="BorderBrush" Value="#88ff0000"></Setter>
<Setter Property="BorderThickness" Value="1"></Setter>
<Setter Property="MinWidth" Value="120"></Setter>
<Setter Property="Height" Value="40"></Setter>
<Setter Property="IconWidth" Value="16"></Setter>
<Setter Property="IconHeight" Value="16"></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="fcommon:IconButton">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}">
<Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Margin="{TemplateBinding Padding}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Image Width="{TemplateBinding IconWidth}" Height="{TemplateBinding IconHeight}"
Source="{TemplateBinding Icon}"></Image>
<ContentPresenter Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10,0,0,0"></ContentPresenter>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#44ff2e63"></Setter>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#22ff2e63"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
\ No newline at end of file
......@@ -162,5 +162,8 @@
<ItemGroup>
<Resource Include="Icons\down_16x16.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Icons\refresh_16x16.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
......@@ -68,6 +68,8 @@
Content="倒计时版"></RadioButton>
<RadioButton x:Name="rb_FourNameBarView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="四格人名条版"></RadioButton>
<RadioButton x:Name="rb_CenterPlayerRanking" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="中部球员排名"></RadioButton>
</StackPanel>
</Grid>
</Border>
......@@ -96,6 +98,8 @@
IsSelected="{Binding ElementName=rb_CountdownView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.FourNameBar}" ViewType="{x:Type local:FourNameBarView}"
IsSelected="{Binding ElementName=rb_FourNameBarView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.CenterPlayerRanking}" ViewType="{x:Type local:CenterPlayerRankingView}"
IsSelected="{Binding ElementName=rb_CenterPlayerRanking,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
</fcommon:NavigationControl>
</Border>
......
......@@ -31,11 +31,9 @@
<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/up_16x16.png"
Content="上版子"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子"></fcommon:IconButton>
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/db_16x16.png"
Content="加载本地数据"></fcommon:IconButton>
</StackPanel>
</Border>
<!-- 版子信息 -->
......@@ -69,10 +67,17 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="300"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
</Grid.RowDefinitions>
<Image Source="pack://SiteOfOrigin:,,,/images/Begin.jpg" />
<TextBlock Grid.Row="1" Margin="5"></TextBlock>
<StackPanel Orientation="Horizontal" Grid.Row="1">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上版子"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子"></fcommon:IconButton>
</StackPanel>
</Grid>
</Border>
</Grid>
......
......@@ -31,11 +31,8 @@
<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/up_16x16.png"
Content="上版子"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子"></fcommon:IconButton>
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/db_16x16.png"
Content="加载本地数据"></fcommon:IconButton>
</StackPanel>
</Border>
<!-- 版子信息 -->
......@@ -64,10 +61,17 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="300"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
</Grid.RowDefinitions>
<Image Source="pack://SiteOfOrigin:,,,/images/BottomInformation.jpg" />
<TextBlock Grid.Row="1" Margin="5"></TextBlock>
<StackPanel Orientation="Horizontal" Grid.Row="1">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上版子"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子"></fcommon:IconButton>
</StackPanel>
</Grid>
</Border>
</Grid>
......
......@@ -9,7 +9,7 @@
d:Background="White"
d:DataContext="{d:DesignInstance Type=local:CenterInformationViewModel}"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="1200">
d:DesignHeight="800" d:DesignWidth="1200">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
......@@ -31,11 +31,8 @@
<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/up_16x16.png"
Content="上版子"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子"></fcommon:IconButton>
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/db_16x16.png"
Content="加载本地数据"></fcommon:IconButton>
</StackPanel>
</Border>
<!-- 版子信息 -->
......@@ -97,10 +94,17 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="300"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
</Grid.RowDefinitions>
<Image Source="pack://SiteOfOrigin:,,,/images/CenterInformation.jpg" />
<TextBlock Grid.Row="1" Margin="5"></TextBlock>
<StackPanel Orientation="Horizontal" Grid.Row="1">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上版子"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子"></fcommon:IconButton>
</StackPanel>
</Grid>
</Border>
</Grid>
......
<UserControl x:Class="VIZ.TVP.Golf.Module.CenterPlayerRankingView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:VIZ.TVP.Golf.Module"
xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
d:Background="White"
d:DataContext="{d:DesignInstance Type=local:CenterPlayerRankingViewModel}"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="1200">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.TVP.Golf.Module.Resource;component/Style/IconButton/IconButton_Default.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.Framework.Common.Resource;component/Style/ListBox/ListBox_None.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</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/remote_16x16.png"
Content="加载远程数据"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/db_16x16.png"
Content="加载本地数据"
Command="{Binding Path=LoadLocalDataCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/refresh_16x16.png"
Content="刷新排名"></fcommon:IconButton>
</StackPanel>
</Border>
<!-- 版子信息 -->
<Border Grid.Row="1" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<!-- 轮次 -->
<TextBlock Text="轮次:" HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,10,0" Grid.Row="0"></TextBlock>
<TextBox Grid.Column="1" Padding="3" AcceptsReturn="False" Margin="5" Height="30"
TextWrapping="NoWrap" VerticalContentAlignment="Center"
Text="{Binding Path=Text,Mode=TwoWay}"></TextBox>
<!-- 总洞数 -->
<TextBlock Text="总洞数:" HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,10,0" Grid.Row="1"></TextBlock>
<toolkit:IntegerUpDown Grid.Column="1" Grid.Row="1" Padding="3" Margin="5" Height="30"
VerticalContentAlignment="Center"
Value="{Binding Path=Text,Mode=TwoWay}"></toolkit:IntegerUpDown>
<!-- 排名 -->
<TextBlock Text="排名:" HorizontalAlignment="Right" VerticalAlignment="Top"
Margin="0,10,10,0" Grid.Row="2"></TextBlock>
<Grid Grid.Row="2" Grid.Column="1" Margin="0,0,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<!-- Header -->
<Grid Background="#22ffd7c0" Margin="5,0,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"></ColumnDefinition>
<ColumnDefinition Width="80"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="100"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center"
Grid.Column="0" Text="排名"></TextBlock>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center"
Grid.Column="1" Text="队伍Logo"></TextBlock>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center"
Grid.Column="2" Text="名字"></TextBlock>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center"
Grid.Column="3" Text="得分"></TextBlock>
</Grid>
<!-- Data -->
<ListBox Grid.Row="1" Style="{StaticResource ListBox_None}"
ItemsSource="{Binding Path=PlayerRankings}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"></ColumnDefinition>
<ColumnDefinition Width="80"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="80"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBox Height="30" VerticalContentAlignment="Center" Padding="3" Margin="5"
Grid.Column="0" Text="{Binding Path=Position}"></TextBox>
<TextBox Height="30" VerticalContentAlignment="Center" Padding="3" Margin="5"
Grid.Column="1" Text="{Binding Path=TeamLogo}"></TextBox>
<TextBox Height="30" VerticalContentAlignment="Center" Padding="3" Margin="5"
Grid.Column="2" Text="{Binding Path=Name}"></TextBox>
<TextBox Height="30" VerticalContentAlignment="Center" Padding="3" Margin="5"
Grid.Column="3" Text="{Binding Path=Score}"></TextBox>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</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/CenterPlayerRanking.jpg" />
<StackPanel Orientation="Horizontal" Grid.Row="1">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上版子"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子"></fcommon:IconButton>
</StackPanel>
</Grid>
</Border>
</Grid>
</UserControl>
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>
/// CenterPlayerRankingView.xaml 的交互逻辑
/// </summary>
public partial class CenterPlayerRankingView : UserControl
{
public CenterPlayerRankingView()
{
InitializeComponent();
WPFHelper.BindingViewModel(this, new CenterPlayerRankingViewModel());
}
}
}
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using VIZ.Framework.Core;
using VIZ.TVP.Golf.Domain;
using VIZ.TVP.Golf.Storage;
using Xceed.Wpf.Toolkit;
namespace VIZ.TVP.Golf.Module
{
/// <summary>
/// 包装视图模型 -- 中间球员排名版
/// </summary>
public class CenterPlayerRankingViewModel : PackageViewModelBase
{
public CenterPlayerRankingViewModel()
{
// 初始化命令
this.InitCommand();
}
/// <summary>
/// 初始化命令
/// </summary>
private void InitCommand()
{
this.LoadLocalDataCommand = new VCommand(this.LoadLocalData);
}
// ===================================================================================
// Property
// ===================================================================================
#region CurrentRound -- 当前轮次
private int currentRound;
/// <summary>
/// 当前轮次
/// </summary>
public int CurrentRound
{
get { return currentRound; }
set { currentRound = value; this.RaisePropertyChanged(nameof(CurrentRound)); }
}
#endregion
#region TotalHole -- 总洞数
private int totalHole;
/// <summary>
/// 总洞数
/// </summary>
public int TotalHole
{
get { return totalHole; }
set { totalHole = value; this.RaisePropertyChanged(nameof(TotalHole)); }
}
#endregion
#region PlayerRankings -- 球员排名
private ObservableCollection<PlayerRealModel> playerRankings;
/// <summary>
/// 球员排名
/// </summary>
public ObservableCollection<PlayerRealModel> PlayerRankings
{
get { return playerRankings; }
set { playerRankings = value; this.RaisePropertyChanged(nameof(PlayerRankings)); }
}
#endregion
// ===================================================================================
// Command
// ===================================================================================
#region SendCommand -- 发送命令
/// <summary>
/// 执行发送命令
/// </summary>
protected override void Send()
{
}
#endregion
#region LoadLocalDataCommand -- 加载本地数据命令
/// <summary>
/// 加载本地数据命令
/// </summary>
public VCommand LoadLocalDataCommand { get; set; }
/// <summary>
/// 加载本地数据
/// </summary>
private void LoadLocalData()
{
string path = "E:\\Projects\\VIZ.TVP.Golf\\高尔夫球数据获取api.xml";
using (StreamReader sr = new StreamReader(path))
{
XElement root = XElement.Load(sr);
TournamentNode node = new TournamentNode();
node.FromXElement(root);
ObservableCollection<PlayerRealModel> rankings = new ObservableCollection<PlayerRealModel>();
foreach (PlayerNode player in node.Players)
{
PlayerRealModel model = new PlayerRealModel();
model.FromNode(player);
rankings.Add(model);
}
this.PlayerRankings = rankings;
}
}
#endregion
}
}
......@@ -9,7 +9,7 @@
d:Background="White"
d:DataContext="{d:DesignInstance Type=local:CountdownViewModel}"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="1200">
d:DesignHeight="800" d:DesignWidth="1200">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
......@@ -30,12 +30,7 @@
<!-- 版子操作 -->
<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/up_16x16.png"
Content="上版子"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子"></fcommon:IconButton>
</StackPanel>
</Border>
<!-- 版子信息 -->
......@@ -69,10 +64,17 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="300"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
</Grid.RowDefinitions>
<Image Source="pack://SiteOfOrigin:,,,/images/Countdown.jpg" />
<TextBlock Grid.Row="1" Margin="5"></TextBlock>
<StackPanel Orientation="Horizontal" Grid.Row="1">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上版子"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子"></fcommon:IconButton>
</StackPanel>
</Grid>
</Border>
</Grid>
......
......@@ -27,30 +27,30 @@
Margin="0,0,10,0" Grid.Row="0"></TextBlock>
<TextBox Grid.Column="1" Padding="3" AcceptsReturn="False" Margin="5" Height="30"
TextWrapping="NoWrap" VerticalContentAlignment="Center"
Text="{Binding Path=Temperature,Mode=TwoWay}"></TextBox>
Text="{Binding Path=PanelType,Mode=TwoWay}"></TextBox>
<!-- 名字 -->
<TextBlock Text="名字:" HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,10,0" Grid.Row="1"></TextBlock>
<TextBox Grid.Column="1" Padding="3" AcceptsReturn="False" Margin="5" Height="30"
TextWrapping="NoWrap" VerticalContentAlignment="Center" Grid.Row="1"
Text="{Binding Path=Wind,Mode=TwoWay}"></TextBox>
Text="{Binding Path=Name,Mode=TwoWay}"></TextBox>
<!-- 球队 -->
<TextBlock Text="球队:" HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,10,0" Grid.Row="2"></TextBlock>
<TextBox Grid.Column="1" Padding="3" AcceptsReturn="False" Margin="5" Height="30"
TextWrapping="NoWrap" VerticalContentAlignment="Center" Grid.Row="2"
Text="{Binding Path=Wind,Mode=TwoWay}"></TextBox>
Text="{Binding Path=Team,Mode=TwoWay}"></TextBox>
<!-- 成绩 -->
<TextBlock Text="成绩:" HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,10,0" Grid.Row="3"></TextBlock>
<TextBox Grid.Column="1" Padding="3" AcceptsReturn="False" Margin="5" Height="30"
TextWrapping="NoWrap" VerticalContentAlignment="Center" Grid.Row="3"
Text="{Binding Path=Wind,Mode=TwoWay}"></TextBox>
Text="{Binding Path=Score,Mode=TwoWay}"></TextBox>
<!-- 信息 -->
<TextBlock Text="信息:" HorizontalAlignment="Right" VerticalAlignment="Top"
Margin="0,10,10,0" Grid.Row="4"></TextBlock>
<TextBox Grid.Column="1" Padding="3" AcceptsReturn="True" Margin="5"
TextWrapping="NoWrap" Grid.Row="4"
Text="{Binding Path=Humidity,Mode=TwoWay}"></TextBox>
Text="{Binding Path=Info,Mode=TwoWay}"></TextBox>
</Grid>
</UserControl>
......@@ -30,12 +30,7 @@
<!-- 版子操作 -->
<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/up_16x16.png"
Content="上版子"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子"></fcommon:IconButton>
</StackPanel>
</Border>
<!-- 版子信息 -->
......@@ -72,10 +67,17 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="300"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
</Grid.RowDefinitions>
<Image Source="pack://SiteOfOrigin:,,,/images/FourNameBar.jpg" />
<TextBlock Grid.Row="1" Margin="5"></TextBlock>
<StackPanel Orientation="Horizontal" Grid.Row="1">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上版子"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子"></fcommon:IconButton>
</StackPanel>
</Grid>
</Border>
</Grid>
......
......@@ -39,5 +39,61 @@ namespace VIZ.TVP.Golf.Module
}
#endregion
#region Name -- 名称
private string name;
/// <summary>
/// 名称
/// </summary>
public string Name
{
get { return name; }
set { name = value; this.RaisePropertyChanged(nameof(Name)); }
}
#endregion
#region Info -- 信息
private string info;
/// <summary>
/// 信息
/// </summary>
public string Info
{
get { return info; }
set { info = value; this.RaisePropertyChanged(nameof(Info)); }
}
#endregion
#region Score -- 得分
private int score;
/// <summary>
/// 得分
/// </summary>
public int Score
{
get { return score; }
set { score = value; this.RaisePropertyChanged(nameof(Score)); }
}
#endregion
#region Team -- 队伍
private string team;
/// <summary>
/// 队伍
/// </summary>
public string Team
{
get { return team; }
set { team = value; this.RaisePropertyChanged(nameof(Team)); }
}
#endregion
}
}
......@@ -9,7 +9,7 @@
d:Background="White"
d:DataContext="{d:DesignInstance Type=local:WeatherViewModel}"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="1200">
d:DesignHeight="800" d:DesignWidth="1200">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
......@@ -30,12 +30,7 @@
<!-- 版子操作 -->
<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/up_16x16.png"
Content="上版子"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子"></fcommon:IconButton>
</StackPanel>
</Border>
<!-- 版子信息 -->
......@@ -75,10 +70,17 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="300"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
</Grid.RowDefinitions>
<Image Source="pack://SiteOfOrigin:,,,/images/Weather.jpg" />
<TextBlock Grid.Row="1" Margin="5"></TextBlock>
<StackPanel Orientation="Horizontal" Grid.Row="1">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上版子"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子"></fcommon:IconButton>
</StackPanel>
</Grid>
</Border>
</Grid>
......
......@@ -118,6 +118,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Package\CenterPlayerRanking\View\CenterPlayerRankingView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Package\Countdown\View\CountdownView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
......@@ -171,6 +175,10 @@
<DependentUpon>PlayerListView.xaml</DependentUpon>
</Compile>
<Compile Include="Information\Player\ViewModel\PlayerListViewModel.cs" />
<Compile Include="Package\CenterPlayerRanking\ViewModel\CenterPlayerRankingViewModel.cs" />
<Compile Include="Package\CenterPlayerRanking\View\CenterPlayerRankingView.xaml.cs">
<DependentUpon>CenterPlayerRankingView.xaml</DependentUpon>
</Compile>
<Compile Include="Package\FourNameBar\Enum\FourNameBarPanelKeys.cs" />
<Compile Include="Package\FourNameBar\Enum\FourNameBarPanelType.cs" />
<Compile Include="Package\FourNameBar\ViewModel\FourNameBarPanelModel.cs" />
......
......@@ -228,5 +228,10 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\CenterPlayerRanking.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment