Commit f50dac90 by liulongfei

1. 添加测试资源

2. 完善数据管理模块
3. 删除部分包装页面
parent d9354276
...@@ -40,38 +40,18 @@ namespace VIZ.TVP.Golf.Domain ...@@ -40,38 +40,18 @@ namespace VIZ.TVP.Golf.Domain
// ==================================================================================== // ====================================================================================
/// <summary> /// <summary>
/// 开场版
/// </summary>
public const string BeginView = "BeginView";
/// <summary>
/// 底部信息版 /// 底部信息版
/// </summary> /// </summary>
public const string BottomInformationView = "BottomInformationView"; public const string BottomInformationView = "BottomInformationView";
/// <summary> /// <summary>
/// 天气版 /// 中间球员排名
/// </summary>
public const string WeatherView = "WeatherView";
/// <summary>
/// 中部信息版
/// </summary>
public const string CenterInformationView = "CenterInformationView";
/// <summary>
/// 倒计时版
/// </summary>
public const string Countdown = "Countdown";
/// <summary>
/// 4格人名条
/// </summary> /// </summary>
public const string FourNameBar = "FourNameBar"; public const string CenterPlayerRanking = "CenterPlayerRanking";
/// <summary> /// <summary>
/// 中间球排名 /// 中间球排名
/// </summary> /// </summary>
public const string CenterPlayerRanking = "CenterPlayerRanking"; public const string CenterTeamRanking = "CenterTeamRanking";
} }
} }
...@@ -47,16 +47,16 @@ namespace VIZ.TVP.Golf.Domain ...@@ -47,16 +47,16 @@ namespace VIZ.TVP.Golf.Domain
#endregion #endregion
#region Picture -- 照片 #region Logo -- Logo
private string picture; private string logo;
/// <summary> /// <summary>
/// 照片 /// 标志
/// </summary> /// </summary>
public string Picture public string Logo
{ {
get { return picture; } get { return logo; }
set { picture = value; this.RaisePropertyChanged(nameof(Picture)); } set { logo = value; this.RaisePropertyChanged(nameof(Logo)); }
} }
#endregion #endregion
...@@ -68,7 +68,7 @@ namespace VIZ.TVP.Golf.Domain ...@@ -68,7 +68,7 @@ namespace VIZ.TVP.Golf.Domain
{ {
this.Entity.TeamID = this.TeamID; this.Entity.TeamID = this.TeamID;
this.Entity.Name = this.Name; this.Entity.Name = this.Name;
this.Entity.Picture = this.Picture; this.Entity.Logo = this.Logo;
} }
/// <summary> /// <summary>
...@@ -78,7 +78,7 @@ namespace VIZ.TVP.Golf.Domain ...@@ -78,7 +78,7 @@ namespace VIZ.TVP.Golf.Domain
{ {
this.TeamID = this.Entity.TeamID; this.TeamID = this.Entity.TeamID;
this.Name = this.Entity.Name; this.Name = this.Entity.Name;
this.Picture = this.Entity.Picture; this.Logo = this.Entity.Logo;
} }
} }
} }
...@@ -89,6 +89,20 @@ namespace VIZ.TVP.Golf.Domain ...@@ -89,6 +89,20 @@ namespace VIZ.TVP.Golf.Domain
#endregion #endregion
#region TeamLogo -- 队伍Logo
private string teamLogo;
/// <summary>
/// 队伍标志
/// </summary>
public string TeamLogo
{
get { return teamLogo; }
set { teamLogo = value; this.RaisePropertyChanged(nameof(TeamLogo)); }
}
#endregion
#region Rounds -- 轮次集合 #region Rounds -- 轮次集合
private ObservableCollection<RoundRealModel> rounds = new ObservableCollection<RoundRealModel>(); private ObservableCollection<RoundRealModel> rounds = new ObservableCollection<RoundRealModel>();
...@@ -103,6 +117,34 @@ namespace VIZ.TVP.Golf.Domain ...@@ -103,6 +117,34 @@ namespace VIZ.TVP.Golf.Domain
#endregion #endregion
#region PlayerInfoModel -- 球员信息
private PlayerInfoModel playerInfoModel;
/// <summary>
/// 球员信息
/// </summary>
public PlayerInfoModel PlayerInfoModel
{
get { return playerInfoModel; }
set { playerInfoModel = value; this.RaisePropertyChanged(nameof(PlayerInfoModel)); }
}
#endregion
#region TeamInfoModel -- 队伍信息
private TeamInfoModel teamInfoModel;
/// <summary>
/// 队伍信息
/// </summary>
public TeamInfoModel TeamInfoModel
{
get { return teamInfoModel; }
set { teamInfoModel = value; this.RaisePropertyChanged(nameof(TeamInfoModel)); }
}
#endregion
/// <summary> /// <summary>
/// 从XML节点获取数据 /// 从XML节点获取数据
/// </summary> /// </summary>
......
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;
using VIZ.Framework.Core; using VIZ.Framework.Core;
namespace VIZ.TVP.Golf.Module namespace VIZ.TVP.Golf.Domain
{ {
/// <summary> /// <summary>
/// 四格人名条面板模型 /// 队伍真实数据
/// </summary> /// </summary>
public class FourNameBarPanelModel : ModelBase public class TeamRealModel : ModelBase
{ {
#region PanelKey -- 面板键
private FourNameBarPanelKeys panelKey;
/// <summary> /// <summary>
/// 面板键 /// 模型
/// </summary> /// </summary>
public FourNameBarPanelKeys PanelKey public TeamInfoModel Model { get; private set; }
{
get { return panelKey; }
set { panelKey = value; this.RaisePropertyChanged(nameof(PanelKey)); }
}
#endregion #region Position -- 排名
#region PanelType -- 面板类型
private FourNameBarPanelType panelType; private int position;
/// <summary> /// <summary>
/// 面板类型 /// 排名
/// </summary> /// </summary>
public FourNameBarPanelType PanelType public int Position
{ {
get { return panelType; } get { return position; }
set { panelType = value; this.RaisePropertyChanged(nameof(PanelType)); } set { position = value; this.RaisePropertyChanged(nameof(Position)); }
} }
#endregion #endregion
#region Name -- 名称 #region Name -- 队伍名称
private string name; private string name;
/// <summary> /// <summary>
/// 名称 /// 队伍名称
/// </summary> /// </summary>
public string Name public string Name
{ {
...@@ -54,46 +46,58 @@ namespace VIZ.TVP.Golf.Module ...@@ -54,46 +46,58 @@ namespace VIZ.TVP.Golf.Module
#endregion #endregion
#region Info -- 信息 #region Logo -- Logo
private string info; private string logo;
/// <summary> /// <summary>
/// 信息 /// Logo
/// </summary> /// </summary>
public string Info public string Logo
{ {
get { return info; } get { return logo; }
set { info = value; this.RaisePropertyChanged(nameof(Info)); } set { logo = value; this.RaisePropertyChanged(nameof(Logo)); }
} }
#endregion #endregion
#region Score -- 得分 #region Strokes -- 总杆数
private int score; private int strokes;
/// <summary> /// <summary>
/// 得分 /// 总杆数
/// </summary> /// </summary>
public int Score public int Strokes
{ {
get { return score; } get { return strokes; }
set { score = value; this.RaisePropertyChanged(nameof(Score)); } set { strokes = value; this.RaisePropertyChanged(nameof(Strokes)); }
} }
#endregion #endregion
#region Team -- 队伍 #region Players -- 队员
private string team; private ObservableCollection<PlayerRealModel> players = new ObservableCollection<PlayerRealModel>();
/// <summary> /// <summary>
/// 队 /// 队
/// </summary> /// </summary>
public string Team public ObservableCollection<PlayerRealModel> Players
{ {
get { return team; } get { return players; }
set { team = value; this.RaisePropertyChanged(nameof(Team)); } set { players = value; this.RaisePropertyChanged(nameof(Players)); }
} }
#endregion #endregion
/// <summary>
/// 从模型中获取数据
/// </summary>
/// <param name="model">模型</param>
public void FromModel(TeamInfoModel model)
{
this.Model = model;
this.Name = model.Name;
this.Logo = model.Name;
}
} }
} }
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;
namespace VIZ.TVP.Golf.Module namespace VIZ.TVP.Golf.Domain
{ {
/// <summary> /// <summary>
/// 四格人名条面板类型 /// 包装静态资源
/// </summary> /// </summary>
public enum FourNameBarPanelType public static class TvpStaticResource
{ {
/// <summary> /// <summary>
/// 正常 /// 队伍Logo集合
/// </summary> /// </summary>
Normal, public static ObservableCollection<string> TeamLogos { get; set; } = new ObservableCollection<string>();
/// <summary> /// <summary>
/// 选手 /// 洞图片集合
/// </summary> /// </summary>
Player public static ObservableCollection<string> HolePictures { get; set; } = new ObservableCollection<string>();
/// <summary>
/// 球员照片集合
/// </summary>
public static ObservableCollection<string> PlayerPictures { get; set; } = new ObservableCollection<string>();
} }
} }
...@@ -73,7 +73,9 @@ ...@@ -73,7 +73,9 @@
<Compile Include="Model\RealModel\PlayerRealModel.cs" /> <Compile Include="Model\RealModel\PlayerRealModel.cs" />
<Compile Include="Model\RealModel\RoundRealModel.cs" /> <Compile Include="Model\RealModel\RoundRealModel.cs" />
<Compile Include="Model\RealModel\ScoreRealModel.cs" /> <Compile Include="Model\RealModel\ScoreRealModel.cs" />
<Compile Include="Model\RealModel\TeamRealModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TvpStaticResource.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
......
...@@ -165,5 +165,9 @@ ...@@ -165,5 +165,9 @@
<ItemGroup> <ItemGroup>
<Resource Include="Icons\refresh_16x16.png" /> <Resource Include="Icons\refresh_16x16.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Icons\add_16x16.png" />
<Resource Include="Icons\delete_16x16.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
\ No newline at end of file
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core" xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common" xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:domain="clr-namespace:VIZ.TVP.Golf.Domain;assembly=VIZ.TVP.Golf.Domain"
xmlns:storage="clr-namespace:VIZ.TVP.Golf.Storage;assembly=VIZ.TVP.Golf.Storage" xmlns:storage="clr-namespace:VIZ.TVP.Golf.Storage;assembly=VIZ.TVP.Golf.Storage"
d:DataContext="{d:DesignInstance Type=local:HoleListViewModel}" d:DataContext="{d:DesignInstance Type=local:HoleListViewModel}"
d:Background="White" d:Background="White"
...@@ -18,6 +19,7 @@ ...@@ -18,6 +19,7 @@
<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.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<core:String2ImageSourceConverter x:Key="String2ImageSourceConverter" Type="Relative" WorkPath="picture/hole"></core:String2ImageSourceConverter>
</ResourceDictionary> </ResourceDictionary>
</UserControl.Resources> </UserControl.Resources>
<Grid> <Grid>
...@@ -28,15 +30,19 @@ ...@@ -28,15 +30,19 @@
<!-- 操作项 --> <!-- 操作项 -->
<Border BorderBrush="#44000000" BorderThickness="1" Background="#66b6f2e3" Margin="5" Padding="5"> <Border BorderBrush="#44000000" BorderThickness="1" Background="#66b6f2e3" Margin="5" Padding="5">
<StackPanel Orientation="Horizontal"> <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" <fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/db_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/db_16x16.png"
Content="加载本地数据"></fcommon:IconButton> Content="加载本地数据" Command="{Binding Path=LoadLocalDataCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/save_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/save_16x16.png"
Content="保存"></fcommon:IconButton> Content="保存" Command="{Binding SaveLocalDataCommand}"></fcommon:IconButton>
<Rectangle Width="2" Height="30" Fill="#44000000" Margin="25,0,20,0"></Rectangle>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/add_16x16.png"
Content="添加" Command="{Binding Path=AddCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/delete_16x16.png"
Content="删除" Command="{Binding Path=DeleteCommand}"></fcommon:IconButton>
</StackPanel> </StackPanel>
</Border> </Border>
<!-- 内容 --> <!-- 内容 -->
...@@ -44,17 +50,27 @@ ...@@ -44,17 +50,27 @@
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition> <ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="400"></ColumnDefinition> <ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- 数据表格 --> <!-- 数据表格 -->
<DataGrid Grid.Row="1" CanUserAddRows="False" AutoGenerateColumns="False" <DataGrid Grid.Row="1" CanUserAddRows="False" AutoGenerateColumns="False" Margin="0,0,5,0"
ItemsSource="{Binding Path=HoleInfos,Mode=OneWay}" FontSize="14" ItemsSource="{Binding Path=HoleInfos,Mode=OneWay}" FontSize="14"
SelectedValue="{Binding Path=SelectedHoleInfo,Mode=TwoWay}"> SelectedValue="{Binding Path=SelectedHoleInfo,Mode=TwoWay}">
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn Header="编号" Width="80" Binding="{Binding Path=HoleID,Mode=TwoWay}"></DataGridTextColumn> <DataGridTextColumn Header="编号" Width="80" Binding="{Binding Path=HoleID,Mode=TwoWay}"></DataGridTextColumn>
<DataGridTextColumn Header="照片" Width="200" Binding="{Binding Path=Picture,Mode=TwoWay}"></DataGridTextColumn> <DataGridComboBoxColumn Header="Logo" Width="240"
ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.HolePictures}}"
SelectedValueBinding="{Binding Path=Picture}"></DataGridComboBoxColumn>
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
<!-- 洞图片 -->
<Grid Grid.Column="1" Margin="5,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="300"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Image Source="{Binding Path=SelectedHoleInfo.Picture,Converter={StaticResource String2ImageSourceConverter}}"></Image>
</Grid>
</Grid> </Grid>
</Border> </Border>
</Grid> </Grid>
......
using System; using log4net;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; 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.Core; using VIZ.Framework.Core;
using VIZ.TVP.Golf.Domain; using VIZ.TVP.Golf.Domain;
using VIZ.TVP.Golf.Storage; using VIZ.TVP.Golf.Storage;
...@@ -15,6 +17,11 @@ namespace VIZ.TVP.Golf.Module ...@@ -15,6 +17,11 @@ namespace VIZ.TVP.Golf.Module
/// </summary> /// </summary>
public class HoleListViewModel : ViewModelBase, IHoleListSupport public class HoleListViewModel : ViewModelBase, IHoleListSupport
{ {
/// <summary>
/// 日志
/// </summary>
private readonly static ILog log = LogManager.GetLogger(typeof(HoleListViewModel));
public HoleListViewModel() public HoleListViewModel()
{ {
// 初始化属性 // 初始化属性
...@@ -36,8 +43,9 @@ namespace VIZ.TVP.Golf.Module ...@@ -36,8 +43,9 @@ namespace VIZ.TVP.Golf.Module
this.LoadTestDataCommand = new VCommand(this.LoadTestData); this.LoadTestDataCommand = new VCommand(this.LoadTestData);
this.LoadLocalDataCommand = new VCommand(this.LoadLocalData); this.LoadLocalDataCommand = new VCommand(this.LoadLocalData);
this.LoadRemoteDataCommand = new VCommand(this.LoadRemoteData); this.LoadRemoteDataCommand = new VCommand(this.LoadRemoteData);
this.SaveLocalDataCommand = new VCommand(this.SaveLocalData); this.SaveLocalDataCommand = new VCommand(this.SaveLocalData);
this.AddCommand = new VCommand(this.Add);
this.DeleteCommand = new VCommand(this.Delete);
} }
/// <summary> /// <summary>
...@@ -114,8 +122,8 @@ namespace VIZ.TVP.Golf.Module ...@@ -114,8 +122,8 @@ namespace VIZ.TVP.Golf.Module
/// </summary> /// </summary>
private void LoadTestData() private void LoadTestData()
{ {
this.HoleInfos.Add(new HoleInfoModel { HoleID = 1, Picture = "test1" }); this.HoleInfos.Add(new HoleInfoModel { HoleID = 1, Picture = "test1", Entity = new HoleInfo() });
this.HoleInfos.Add(new HoleInfoModel { HoleID = 2, Picture = "test2" }); this.HoleInfos.Add(new HoleInfoModel { HoleID = 2, Picture = "test2", Entity = new HoleInfo() });
} }
#endregion #endregion
...@@ -166,7 +174,60 @@ namespace VIZ.TVP.Golf.Module ...@@ -166,7 +174,60 @@ namespace VIZ.TVP.Golf.Module
/// </summary> /// </summary>
private void SaveLocalData() private void SaveLocalData()
{ {
this.holeListController.SaveToDB(); try
{
this.holeListController.SaveToDB();
MessageBox.Show("保存成功");
}
catch (Exception ex)
{
log.Error(ex);
MessageBox.Show("保存失败");
}
}
#endregion
#region AddCommand -- 添加命令
/// <summary>
/// 添加命令
/// </summary>
public VCommand AddCommand { get; set; }
/// <summary>
/// 添加
/// </summary>
private void Add()
{
HoleInfoModel model = new HoleInfoModel();
model.HoleID = this.HoleInfos.Max(p => p.HoleID) + 1;
model.Entity = new HoleInfo();
this.HoleInfos.Add(model);
}
#endregion
#region DeleteCommand -- 删除命令
/// <summary>
/// 删除命令
/// </summary>
public VCommand DeleteCommand { get; set; }
/// <summary>
/// 删除
/// </summary>
private void Delete()
{
if (this.SelectedHoleInfo == null)
return;
this.HoleInfos.Remove(this.SelectedHoleInfo);
} }
#endregion #endregion
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common" xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:storage="clr-namespace:VIZ.TVP.Golf.Storage;assembly=VIZ.TVP.Golf.Storage" xmlns:storage="clr-namespace:VIZ.TVP.Golf.Storage;assembly=VIZ.TVP.Golf.Storage"
xmlns:domain="clr-namespace:VIZ.TVP.Golf.Domain;assembly=VIZ.TVP.Golf.Domain"
xmlns:local="clr-namespace:VIZ.TVP.Golf.Module" xmlns:local="clr-namespace:VIZ.TVP.Golf.Module"
d:DataContext="{d:DesignInstance Type=local:PlayerListViewModel}" d:DataContext="{d:DesignInstance Type=local:PlayerListViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
...@@ -18,6 +19,7 @@ ...@@ -18,6 +19,7 @@
<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.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<core:Enum2EnumDescriptionConverter x:Key="Enum2EnumDescriptionConverter" EnumType="{x:Type storage:SexEnum}"></core:Enum2EnumDescriptionConverter> <core:Enum2EnumDescriptionConverter x:Key="Enum2EnumDescriptionConverter" EnumType="{x:Type storage:SexEnum}"></core:Enum2EnumDescriptionConverter>
<core:String2ImageSourceConverter x:Key="String2ImageSourceConverter" Type="Relative" WorkPath="picture/player"></core:String2ImageSourceConverter>
</ResourceDictionary> </ResourceDictionary>
</UserControl.Resources> </UserControl.Resources>
<Grid> <Grid>
...@@ -28,24 +30,32 @@ ...@@ -28,24 +30,32 @@
<!-- 操作项 --> <!-- 操作项 -->
<Border BorderBrush="#44000000" BorderThickness="1" Background="#66b6f2e3" Margin="5" Padding="5"> <Border BorderBrush="#44000000" BorderThickness="1" Background="#66b6f2e3" Margin="5" Padding="5">
<StackPanel Orientation="Horizontal"> <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" <fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/db_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/db_16x16.png"
Content="加载本地数据"></fcommon:IconButton> Content="加载本地数据" Command="{Binding Path=LoadLocalDataCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/save_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/save_16x16.png"
Content="保存"></fcommon:IconButton> Content="保存" Command="{Binding SaveLocalDataCommand}"></fcommon:IconButton>
<Rectangle Width="2" Height="30" Fill="#44000000" Margin="25,0,20,0"></Rectangle>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/add_16x16.png"
Content="添加" Command="{Binding AddCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/delete_16x16.png"
Content="删除" Command="{Binding DeleteCommand}"></fcommon:IconButton>
</StackPanel> </StackPanel>
</Border> </Border>
<!-- 内容 --> <!-- 内容 -->
<Border Grid.Row="1" BorderBrush="#44000000" BorderThickness="1" Margin="5" Padding="5"> <Border Grid.Row="1" BorderBrush="#44000000" BorderThickness="1" Margin="5" Padding="5">
<Grid> <Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<!-- 数据表格 --> <!-- 数据表格 -->
<DataGrid CanUserAddRows="False" AutoGenerateColumns="False" <DataGrid CanUserAddRows="False" AutoGenerateColumns="False" Margin="0,0,5,0"
ItemsSource="{Binding Path=PlayerInfos,Mode=OneWay}" FontSize="14" ItemsSource="{Binding Path=PlayerInfos,Mode=OneWay}" FontSize="14"
SelectedValue="{Binding Path=SelectedPlayerInfo,Mode=TwoWay}"> SelectedValue="{Binding Path=SelectedPlayerInfo,Mode=TwoWay}">
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn Header="球员编号" Width="80" Binding="{Binding Path=PlayerID,Mode=TwoWay}"></DataGridTextColumn> <DataGridTextColumn Header="球员编号" Width="80" Binding="{Binding Path=PlayerID,Mode=TwoWay}"></DataGridTextColumn>
<DataGridTextColumn Header="姓名" Width="200" Binding="{Binding Path=Name,Mode=TwoWay}"></DataGridTextColumn> <DataGridTextColumn Header="姓名" Width="200" Binding="{Binding Path=Name,Mode=TwoWay}"></DataGridTextColumn>
...@@ -53,11 +63,18 @@ ...@@ -53,11 +63,18 @@
<DataGridComboBoxColumn Header="性别" Width="80" <DataGridComboBoxColumn Header="性别" Width="80"
SelectedItemBinding="{Binding Path=Sex,Mode=TwoWay,Converter={StaticResource Enum2EnumDescriptionConverter}}" SelectedItemBinding="{Binding Path=Sex,Mode=TwoWay,Converter={StaticResource Enum2EnumDescriptionConverter}}"
ItemsSource="{Binding Source={x:Static Member=storage:StaticEnumInfos.SexEnumDescriptions}}"></DataGridComboBoxColumn> ItemsSource="{Binding Source={x:Static Member=storage:StaticEnumInfos.SexEnumDescriptions}}"></DataGridComboBoxColumn>
<DataGridTextColumn Header="国家" Width="120" Binding="{Binding Path=Country,Mode=TwoWay}"></DataGridTextColumn> <DataGridComboBoxColumn Header="照片" Width="240"
<DataGridTextColumn Header="全身照" Width="200" Binding="{Binding Path=FullPicture,Mode=TwoWay}"></DataGridTextColumn> ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.PlayerPictures}}"
<DataGridTextColumn Header="半身照" Width="200" Binding="{Binding Path=HalfPicture,Mode=TwoWay}"></DataGridTextColumn> SelectedValueBinding="{Binding Path=HalfPicture}"></DataGridComboBoxColumn>
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
<!-- 照片 -->
<Grid Grid.Column="1" Margin="5,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="300"></RowDefinition>
</Grid.RowDefinitions>
<Image Source="{Binding SelectedPlayerInfo.HalfPicture,Converter={StaticResource String2ImageSourceConverter}}"></Image>
</Grid>
</Grid> </Grid>
</Border> </Border>
</Grid> </Grid>
......
using System; using log4net;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; 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.Core; using VIZ.Framework.Core;
using VIZ.TVP.Golf.Domain; using VIZ.TVP.Golf.Domain;
using VIZ.TVP.Golf.Storage; using VIZ.TVP.Golf.Storage;
...@@ -15,6 +17,11 @@ namespace VIZ.TVP.Golf.Module ...@@ -15,6 +17,11 @@ namespace VIZ.TVP.Golf.Module
/// </summary> /// </summary>
public class PlayerListViewModel : ViewModelBase, IPlayerListSupport public class PlayerListViewModel : ViewModelBase, IPlayerListSupport
{ {
/// <summary>
/// 日志
/// </summary>
private readonly static ILog log = LogManager.GetLogger(typeof(PlayerListViewModel));
public PlayerListViewModel() public PlayerListViewModel()
{ {
// 初始化属性 // 初始化属性
...@@ -36,8 +43,9 @@ namespace VIZ.TVP.Golf.Module ...@@ -36,8 +43,9 @@ namespace VIZ.TVP.Golf.Module
this.LoadTestDataCommand = new VCommand(this.LoadTestData); this.LoadTestDataCommand = new VCommand(this.LoadTestData);
this.LoadLocalDataCommand = new VCommand(this.LoadLocalData); this.LoadLocalDataCommand = new VCommand(this.LoadLocalData);
this.LoadRemoteDataCommand = new VCommand(this.LoadRemoteData); this.LoadRemoteDataCommand = new VCommand(this.LoadRemoteData);
this.SaveLocalDataCommand = new VCommand(this.SaveLocalData); this.SaveLocalDataCommand = new VCommand(this.SaveLocalData);
this.AddCommand = new VCommand(this.Add);
this.DeleteCommand = new VCommand(this.Delete);
} }
/// <summary> /// <summary>
...@@ -166,7 +174,59 @@ namespace VIZ.TVP.Golf.Module ...@@ -166,7 +174,59 @@ namespace VIZ.TVP.Golf.Module
/// </summary> /// </summary>
private void SaveLocalData() private void SaveLocalData()
{ {
this.playerListController.SaveToDB(); try
{
this.playerListController.SaveToDB();
MessageBox.Show("保存成功");
}
catch (Exception ex)
{
log.Error(ex);
MessageBox.Show("保存失败");
}
}
#endregion
#region AddCommand -- 添加命令
/// <summary>
/// 添加命令
/// </summary>
public VCommand AddCommand { get; set; }
/// <summary>
/// 添加
/// </summary>
private void Add()
{
PlayerInfoModel model = new PlayerInfoModel();
model.PlayerID = this.PlayerInfos.Max(p => p.PlayerID) + 1;
model.Entity = new PlayerInfo();
this.PlayerInfos.Add(model);
}
#endregion
#region DeleteCommand -- 删除命令
/// <summary>
/// 删除命令
/// </summary>
public VCommand DeleteCommand { get; set; }
/// <summary>
/// 删除
/// </summary>
private void Delete()
{
if (this.SelectedPlayerInfo == null)
return;
this.PlayerInfos.Remove(this.SelectedPlayerInfo);
} }
#endregion #endregion
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common" xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:storage="clr-namespace:VIZ.TVP.Golf.Storage;assembly=VIZ.TVP.Golf.Storage" xmlns:storage="clr-namespace:VIZ.TVP.Golf.Storage;assembly=VIZ.TVP.Golf.Storage"
xmlns:local="clr-namespace:VIZ.TVP.Golf.Module" xmlns:local="clr-namespace:VIZ.TVP.Golf.Module"
xmlns:domain="clr-namespace:VIZ.TVP.Golf.Domain;assembly=VIZ.TVP.Golf.Domain"
d:DataContext="{d:DesignInstance Type=local:TeamListViewModel}" d:DataContext="{d:DesignInstance Type=local:TeamListViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
x:Name="uc" x:Name="uc"
...@@ -18,6 +19,7 @@ ...@@ -18,6 +19,7 @@
<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.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<core:Enum2EnumDescriptionConverter x:Key="Enum2EnumDescriptionConverter" EnumType="{x:Type storage:SexEnum}"></core:Enum2EnumDescriptionConverter> <core:Enum2EnumDescriptionConverter x:Key="Enum2EnumDescriptionConverter" EnumType="{x:Type storage:SexEnum}"></core:Enum2EnumDescriptionConverter>
<core:String2ImageSourceConverter x:Key="String2ImageSourceConverter" Type="Relative" WorkPath="picture/team"></core:String2ImageSourceConverter>
</ResourceDictionary> </ResourceDictionary>
</UserControl.Resources> </UserControl.Resources>
<Grid> <Grid>
...@@ -28,30 +30,47 @@ ...@@ -28,30 +30,47 @@
<!-- 操作项 --> <!-- 操作项 -->
<Border BorderBrush="#44000000" BorderThickness="1" Background="#66b6f2e3" Margin="5" Padding="5"> <Border BorderBrush="#44000000" BorderThickness="1" Background="#66b6f2e3" Margin="5" Padding="5">
<StackPanel Orientation="Horizontal"> <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" <fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/db_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/db_16x16.png"
Content="加载本地数据"></fcommon:IconButton> Content="加载本地数据" Command="{Binding LoadLocalDataCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/save_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/save_16x16.png"
Content="保存"></fcommon:IconButton> Content="保存" Command="{Binding SaveLocalDataCommand}"></fcommon:IconButton>
<Rectangle Width="2" Height="30" Fill="#44000000" Margin="25,0,20,0"></Rectangle>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/add_16x16.png"
Content="添加" Command="{Binding AddCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Default}" Margin="5,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/delete_16x16.png"
Content="删除" Command="{Binding DeleteCommand}"></fcommon:IconButton>
</StackPanel> </StackPanel>
</Border> </Border>
<!-- 内容 --> <!-- 内容 -->
<Border Grid.Row="1" BorderBrush="#44000000" BorderThickness="1" Margin="5" Padding="5"> <Border Grid.Row="1" BorderBrush="#44000000" BorderThickness="1" Margin="5" Padding="5">
<Grid> <Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<!-- 数据表格 --> <!-- 数据表格 -->
<DataGrid CanUserAddRows="False" AutoGenerateColumns="False" <DataGrid CanUserAddRows="False" AutoGenerateColumns="False" Margin="0,0,5,0" SelectionMode="Single"
ItemsSource="{Binding Path=TeamInfos,Mode=OneWay}" FontSize="14" ItemsSource="{Binding Path=TeamInfos,Mode=OneWay}" FontSize="14"
SelectedValue="{Binding Path=SelectedTeamInfo,Mode=TwoWay}"> SelectedValue="{Binding Path=SelectedTeamInfo,Mode=TwoWay}">
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn Header="球队编号" Width="80" Binding="{Binding Path=TeamID,Mode=TwoWay}"></DataGridTextColumn> <DataGridTextColumn Header="球队编号" Width="80" Binding="{Binding Path=TeamID,Mode=TwoWay}"></DataGridTextColumn>
<DataGridTextColumn Header="名称" Width="200" Binding="{Binding Path=Name,Mode=TwoWay}"></DataGridTextColumn> <DataGridTextColumn Header="名称" Width="200" Binding="{Binding Path=Name,Mode=TwoWay}"></DataGridTextColumn>
<DataGridTextColumn Header="照片" Width="80" Binding="{Binding Path=Picture,Mode=TwoWay}"></DataGridTextColumn> <DataGridComboBoxColumn x:Name="c1" Header="Logo" Width="240"
ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.TeamLogos}}"
SelectedValueBinding="{Binding Path=Logo}"></DataGridComboBoxColumn>
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
<!-- 图片 -->
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="300"></RowDefinition>
</Grid.RowDefinitions>
<Image Source="{Binding Path=SelectedTeamInfo.Logo,Converter={StaticResource String2ImageSourceConverter}}"></Image>
</Grid>
</Grid> </Grid>
</Border> </Border>
</Grid> </Grid>
......
using System; using log4net;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; 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.Core; using VIZ.Framework.Core;
using VIZ.TVP.Golf.Domain; using VIZ.TVP.Golf.Domain;
using VIZ.TVP.Golf.Storage; using VIZ.TVP.Golf.Storage;
...@@ -15,6 +17,10 @@ namespace VIZ.TVP.Golf.Module ...@@ -15,6 +17,10 @@ namespace VIZ.TVP.Golf.Module
/// </summary> /// </summary>
public class TeamListViewModel : ViewModelBase, ITeamListSupport public class TeamListViewModel : ViewModelBase, ITeamListSupport
{ {
/// <summary>
/// 日志
/// </summary>
private readonly static ILog log = LogManager.GetLogger(typeof(TeamListViewModel));
public TeamListViewModel() public TeamListViewModel()
{ {
...@@ -26,7 +32,6 @@ namespace VIZ.TVP.Golf.Module ...@@ -26,7 +32,6 @@ namespace VIZ.TVP.Golf.Module
// 初始化命令 // 初始化命令
this.InitCommand(); this.InitCommand();
} }
/// <summary> /// <summary>
...@@ -37,8 +42,9 @@ namespace VIZ.TVP.Golf.Module ...@@ -37,8 +42,9 @@ namespace VIZ.TVP.Golf.Module
this.LoadTestDataCommand = new VCommand(this.LoadTestData); this.LoadTestDataCommand = new VCommand(this.LoadTestData);
this.LoadLocalDataCommand = new VCommand(this.LoadLocalData); this.LoadLocalDataCommand = new VCommand(this.LoadLocalData);
this.LoadRemoteDataCommand = new VCommand(this.LoadRemoteData); this.LoadRemoteDataCommand = new VCommand(this.LoadRemoteData);
this.SaveLocalDataCommand = new VCommand(this.SaveLocalData); this.SaveLocalDataCommand = new VCommand(this.SaveLocalData);
this.AddCommand = new VCommand(this.Add);
this.DeleteCommand = new VCommand(this.Delete);
} }
/// <summary> /// <summary>
...@@ -167,7 +173,59 @@ namespace VIZ.TVP.Golf.Module ...@@ -167,7 +173,59 @@ namespace VIZ.TVP.Golf.Module
/// </summary> /// </summary>
private void SaveLocalData() private void SaveLocalData()
{ {
this.teamListController.SaveToDB(); try
{
this.teamListController.SaveToDB();
MessageBox.Show("保存成功");
}
catch (Exception ex)
{
log.Error(ex);
MessageBox.Show("保存失败");
}
}
#endregion
#region AddCommand -- 添加命令
/// <summary>
/// 添加命令
/// </summary>
public VCommand AddCommand { get; set; }
/// <summary>
/// 添加
/// </summary>
private void Add()
{
TeamInfoModel model = new TeamInfoModel();
model.Entity = new TeamInfo();
model.TeamID = this.TeamInfos.Max(p => p.TeamID) + 1;
this.TeamInfos.Add(model);
}
#endregion
#region DeleteCommand -- 删除命令
/// <summary>
/// 删除命令
/// </summary>
public VCommand DeleteCommand { get; set; }
/// <summary>
/// 删除
/// </summary>
private void Delete()
{
if (this.SelectedTeamInfo == null)
return;
this.TeamInfos.Remove(this.SelectedTeamInfo);
} }
#endregion #endregion
......
...@@ -56,20 +56,12 @@ ...@@ -56,20 +56,12 @@
<Border Background="#ff4d449f" Height="40"> <Border Background="#ff4d449f" Height="40">
<TextBlock Text="包装" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"></TextBlock> <TextBlock Text="包装" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"></TextBlock>
</Border> </Border>
<RadioButton x:Name="rb_BeginView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="开场版"></RadioButton>
<RadioButton x:Name="rb_BottomInformationView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}" <RadioButton x:Name="rb_BottomInformationView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="底部信息版"></RadioButton> Content="底部信息版"></RadioButton>
<RadioButton x:Name="rb_WeatherView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="天气版"></RadioButton>
<RadioButton x:Name="rb_CenterInformationView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="中部信息版"></RadioButton>
<RadioButton x:Name="rb_CountdownView" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
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}" <RadioButton x:Name="rb_CenterPlayerRanking" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="中部球员排名"></RadioButton> Content="中部球员排名"></RadioButton>
<RadioButton x:Name="rb_CenterTeamRanking" GroupName="MAIN" Style="{StaticResource RadioButton_MainView}"
Content="中部球队排名"></RadioButton>
</StackPanel> </StackPanel>
</Grid> </Grid>
</Border> </Border>
...@@ -86,20 +78,12 @@ ...@@ -86,20 +78,12 @@
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.TournamentInfoView}" ViewType="{x:Type local:PlayerListView}" <fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.TournamentInfoView}" ViewType="{x:Type local:PlayerListView}"
IsSelected="{Binding ElementName=rb_PlayerListView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl> IsSelected="{Binding ElementName=rb_PlayerListView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<!-- 包装 --> <!-- 包装 -->
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.BeginView}" ViewType="{x:Type local:BeginView}"
IsSelected="{Binding ElementName=rb_BeginView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.BottomInformationView}" ViewType="{x:Type local:BottomInformationView}" <fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.BottomInformationView}" ViewType="{x:Type local:BottomInformationView}"
IsSelected="{Binding ElementName=rb_BottomInformationView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl> IsSelected="{Binding ElementName=rb_BottomInformationView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.WeatherView}" ViewType="{x:Type local:WeatherView}"
IsSelected="{Binding ElementName=rb_WeatherView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.CenterInformationView}" ViewType="{x:Type local:CenterInformationView}"
IsSelected="{Binding ElementName=rb_CenterInformationView,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.CenterInformationView}" ViewType="{x:Type local:CountdownView}"
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}" <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> IsSelected="{Binding ElementName=rb_CenterPlayerRanking,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl Key="{x:Static Member=domain:ViewKeys.CenterTeamRanking}" ViewType="{x:Type local:CenterTeamRankingView}"
IsSelected="{Binding ElementName=rb_CenterTeamRanking,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
</fcommon:NavigationControl> </fcommon:NavigationControl>
</Border> </Border>
......
<UserControl x:Class="VIZ.TVP.Golf.Module.BeginView"
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:BeginViewModel}"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="1200">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.TVP.Golf.Module.Resource;component/Style/IconButton/IconButton_Default.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/db_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="40"></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>
<toolkit:IntegerUpDown Grid.Column="1" Padding="3" Margin="5" Height="30"
VerticalContentAlignment="Center"
Value="{Binding Path=Round,Mode=TwoWay}"></toolkit:IntegerUpDown>
<!-- 时间 -->
<TextBlock Text="时间:" HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,10,0" Grid.Row="1"></TextBlock>
<TextBox Grid.Column="1" Padding="3" AcceptsReturn="True" Margin="5" Height="30"
TextWrapping="NoWrap" VerticalContentAlignment="Center" Grid.Row="1"
Text="{Binding Path=BeginTime,Mode=TwoWay}"></TextBox>
</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/Begin.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>
/// BeginView.xaml 的交互逻辑
/// </summary>
public partial class BeginView : UserControl
{
public BeginView()
{
InitializeComponent();
WPFHelper.BindingViewModel(this, new BeginViewModel());
}
}
}
<UserControl x:Class="VIZ.TVP.Golf.Module.CenterInformationView"
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:CenterInformationViewModel}"
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.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/db_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="40"></RowDefinition>
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="40"></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>
<toolkit:IntegerUpDown Grid.Column="1" Padding="3" Margin="5" Height="30"
VerticalContentAlignment="Center"
Value="{Binding Path=PlayerCounts,Mode=TwoWay}"></toolkit:IntegerUpDown>
<!-- 总轮次 -->
<TextBlock Text="总轮次:" HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,10,0" Grid.Row="1"></TextBlock>
<toolkit:IntegerUpDown Grid.Column="1" Padding="3" Margin="5" Height="30"
VerticalContentAlignment="Center" Grid.Row="1"
Value="{Binding Path=TotalRound,Mode=TwoWay}"></toolkit:IntegerUpDown>
<!-- 总奖金池 -->
<TextBlock Text="总奖金池:" HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,10,0" Grid.Row="2"></TextBlock>
<toolkit:DoubleUpDown Grid.Column="1" Padding="3" Margin="5" Height="30"
VerticalContentAlignment="Center" Grid.Row="2"
Text="{Binding Path=TotalPrizeMoney,Mode=TwoWay}"></toolkit:DoubleUpDown>
<!-- 第一名奖金 -->
<TextBlock Text="第一名奖金:" HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,10,0" Grid.Row="3"></TextBlock>
<toolkit:DoubleUpDown Grid.Column="1" Padding="3" Margin="5" Height="30"
VerticalContentAlignment="Center" Grid.Row="3"
Text="{Binding Path=FirstPrizeMoney,Mode=TwoWay}"></toolkit:DoubleUpDown>
<!-- 第二名奖金 -->
<TextBlock Text="第二名奖金:" HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,10,0" Grid.Row="4"></TextBlock>
<toolkit:DoubleUpDown Grid.Column="1" Padding="3" Margin="5" Height="30"
VerticalContentAlignment="Center" Grid.Row="4"
Text="{Binding Path=SecondPrizeMoney,Mode=TwoWay}"></toolkit:DoubleUpDown>
<!-- 第三名奖金 -->
<TextBlock Text="第三名奖金:" HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,10,0" Grid.Row="5"></TextBlock>
<toolkit:DoubleUpDown Grid.Column="1" Padding="3" Margin="5" Height="30"
VerticalContentAlignment="Center" Grid.Row="5"
Text="{Binding Path=ThirdPrizeMoney,Mode=TwoWay}"></toolkit:DoubleUpDown>
</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/CenterInformation.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>
/// CenterInformationView.xaml 的交互逻辑
/// </summary>
public partial class CenterInformationView : UserControl
{
public CenterInformationView()
{
InitializeComponent();
WPFHelper.BindingViewModel(this, new CenterInformationViewModel());
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
namespace VIZ.TVP.Golf.Module
{
/// <summary>
/// 包装视图模型 -- 中间信息版
/// </summary>
public class CenterInformationViewModel : PackageViewModelBase
{
public CenterInformationViewModel()
{
}
// ===================================================================================
// Property
// ===================================================================================
#region PlayerCounts -- 参数人数
private int playerCounts;
/// <summary>
/// 参数人数
/// </summary>
public int PlayerCounts
{
get { return playerCounts; }
set { playerCounts = value; this.RaisePropertyChanged(nameof(PlayerCounts)); }
}
#endregion
#region TotalRound -- 总共几局
private int totalRound;
/// <summary>
/// 总共几局
/// </summary>
public int TotalRound
{
get { return totalRound; }
set { totalRound = value; this.RaisePropertyChanged(nameof(TotalRound)); }
}
#endregion
#region TotalPrizeMoney -- 奖金总额
private double totalPrizeMoney;
/// <summary>
/// 奖金总额
/// </summary>
public double TotalPrizeMoney
{
get { return totalPrizeMoney; }
set { totalPrizeMoney = value; this.RaisePropertyChanged(nameof(TotalPrizeMoney)); }
}
#endregion
#region FirstPrizeMoney -- 第一名奖金
private double firstPrizeMoney;
/// <summary>
/// 第一名奖金
/// </summary>
public double FirstPrizeMoney
{
get { return firstPrizeMoney; }
set { firstPrizeMoney = value; this.RaisePropertyChanged(nameof(FirstPrizeMoney)); }
}
#endregion
#region SecondPrizeMoney -- 第二名奖金
private double secondPrizeMoney;
/// <summary>
/// 第二名奖金
/// </summary>
public double SecondPrizeMoney
{
get { return secondPrizeMoney; }
set { secondPrizeMoney = value; this.RaisePropertyChanged(nameof(SecondPrizeMoney)); }
}
#endregion
#region ThirdPrizeMoney -- 第三名奖金
private double thirdPrizeMoney;
/// <summary>
/// 第三名奖金
/// </summary>
public double ThirdPrizeMoney
{
get { return thirdPrizeMoney; }
set { thirdPrizeMoney = value; this.RaisePropertyChanged(nameof(ThirdPrizeMoney)); }
}
#endregion
// ===================================================================================
// Command
// ===================================================================================
#region SendCommand -- 发送命令
/// <summary>
/// 执行发送命令
/// </summary>
protected override void Send()
{
}
#endregion
}
}
...@@ -70,53 +70,15 @@ ...@@ -70,53 +70,15 @@
<!-- 排名 --> <!-- 排名 -->
<TextBlock Text="排名:" HorizontalAlignment="Right" VerticalAlignment="Top" <TextBlock Text="排名:" HorizontalAlignment="Right" VerticalAlignment="Top"
Margin="0,10,10,0" Grid.Row="2"></TextBlock> Margin="0,10,10,0" Grid.Row="2"></TextBlock>
<Grid Grid.Row="2" Grid.Column="1" Margin="0,0,5,0"> <DataGrid Grid.Row="2" Grid.Column="1" Margin="5,0,5,0" AutoGenerateColumns="False"
<Grid.RowDefinitions> ItemsSource="{Binding Path=PlayerRankings}" SelectionMode="Single">
<RowDefinition Height="40"></RowDefinition> <DataGrid.Columns>
<RowDefinition Height="*"></RowDefinition> <DataGridTextColumn Header="排名" Width="80" Binding="{Binding Path=Position}" CanUserSort="False"></DataGridTextColumn>
</Grid.RowDefinitions> <DataGridTextColumn Header="Logo" Width="120" Binding="{Binding Path=TeamLogo}" CanUserSort="False"></DataGridTextColumn>
<!-- Header --> <DataGridTextColumn Header="名字" Width="120" Binding="{Binding Path=Name}" CanUserSort="False"></DataGridTextColumn>
<Grid Background="#22ffd7c0" Margin="5,0,0,0"> <DataGridTextColumn Header="杆数" Width="80" Binding="{Binding Path=Strokes}" CanUserSort="False"></DataGridTextColumn>
<Grid.ColumnDefinitions> </DataGrid.Columns>
<ColumnDefinition Width="80"></ColumnDefinition> </DataGrid>
<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> </Grid>
</Border> </Border>
<!-- 示意图 --> <!-- 示意图 -->
......
<UserControl x:Class="VIZ.TVP.Golf.Module.CountdownView" <UserControl x:Class="VIZ.TVP.Golf.Module.CenterTeamRankingView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
...@@ -6,15 +6,18 @@ ...@@ -6,15 +6,18 @@
xmlns:local="clr-namespace:VIZ.TVP.Golf.Module" xmlns:local="clr-namespace:VIZ.TVP.Golf.Module"
xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common" xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
d:Background="White" d:Background="White"
d:DataContext="{d:DesignInstance Type=local:CountdownViewModel}" d:DataContext="{d:DesignInstance Type=local:CenterTeamRankingViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="1200"> d:DesignHeight="800" d:DesignWidth="1200">
<UserControl.Resources> <UserControl.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.TVP.Golf.Module.Resource;component/Style/IconButton/IconButton_Default.xaml"></ResourceDictionary> <ResourceDictionary Source="/VIZ.TVP.Golf.Module.Resource;component/Style/IconButton/IconButton_Default.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.Framework.Common.Resource;component/Style/ListBox/ListBox_None.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<fcore:Bool2VisibilityConverter x:Key="Bool2VisibilityConverter" TrueVisibility="Visible" FalseVisibility="Collapsed"></fcore:Bool2VisibilityConverter>
</ResourceDictionary> </ResourceDictionary>
</UserControl.Resources> </UserControl.Resources>
...@@ -30,7 +33,16 @@ ...@@ -30,7 +33,16 @@
<!-- 版子操作 --> <!-- 版子操作 -->
<Border Grid.Row="0" Grid.ColumnSpan="2" BorderBrush="#44000000" Background="#66b6f2e3" BorderThickness="1" Margin="5" Padding="5"> <Border Grid.Row="0" Grid.ColumnSpan="2" BorderBrush="#44000000" Background="#66b6f2e3" BorderThickness="1" Margin="5" Padding="5">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<fcommon:IconButton Style="{StaticResource IconButton_Default}"
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> </StackPanel>
</Border> </Border>
<!-- 版子信息 --> <!-- 版子信息 -->
...@@ -39,24 +51,53 @@ ...@@ -39,24 +51,53 @@
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="40"></RowDefinition> <RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="40"></RowDefinition> <RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="40"></RowDefinition> <RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="80"></ColumnDefinition> <ColumnDefinition Width="80"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition> <ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- 文本 --> <!-- 轮次 -->
<TextBlock Text="文本:" HorizontalAlignment="Right" VerticalAlignment="Center" <TextBlock Text="轮次:" HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,10,0" Grid.Row="0"></TextBlock> Margin="0,0,10,0" Grid.Row="0"></TextBlock>
<TextBox Grid.Column="1" Padding="3" AcceptsReturn="False" Margin="5" Height="30" <TextBox Grid.Column="1" Padding="3" AcceptsReturn="False" Margin="5" Height="30"
TextWrapping="NoWrap" VerticalContentAlignment="Center" TextWrapping="NoWrap" VerticalContentAlignment="Center"
Text="{Binding Path=Text,Mode=TwoWay}"></TextBox> Text="{Binding Path=CurrentRound,Mode=TwoWay}"></TextBox>
<!-- 时间 --> <!-- 总洞数 -->
<TextBlock Text="时间:" HorizontalAlignment="Right" VerticalAlignment="Center" <TextBlock Text="总洞数:" HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,10,0" Grid.Row="1"></TextBlock> Margin="0,0,10,0" Grid.Row="1"></TextBlock>
<toolkit:TimeSpanUpDown Grid.Column="1" Padding="3" Margin="5" Height="30" <toolkit:IntegerUpDown Grid.Column="1" Grid.Row="1" Padding="3" Margin="5" Height="30"
VerticalContentAlignment="Center" Grid.Row="1" VerticalContentAlignment="Center"
Text="{Binding Path=Time,Mode=TwoWay}"></toolkit:TimeSpanUpDown> Value="{Binding Path=TotalHole,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="5,0,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<!-- 球队 -->
<DataGrid ItemsSource="{Binding Path=TeamRankings}" SelectionMode="Single" CanUserAddRows="False"
CanUserSortColumns="False" CanUserDeleteRows="False" AutoGenerateColumns="False"
SelectedItem="{Binding Path=SelectedTeamRanking,Mode=TwoWay}" Margin="0,0,5,0">
<DataGrid.Columns>
<DataGridTextColumn Header="排名" Binding="{Binding Path=Position}"></DataGridTextColumn>
<DataGridTextColumn Header="名称" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="Logo" Binding="{Binding Path=Logo}"></DataGridTextColumn>
<DataGridTextColumn Header="总杆数" Binding="{Binding Path=Strokes}"></DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
<!-- 球员 -->
<DataGrid Grid.Column="1" ItemsSource="{Binding Path=SelectedTeamRanking.Players}" SelectionMode="Single" CanUserAddRows="False"
CanUserSortColumns="False" CanUserDeleteRows="False" AutoGenerateColumns="False" Margin="5,0,0,0">
<DataGrid.Columns>
<DataGridTextColumn Header="名称" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="总杆数" Binding="{Binding Path=Strokes}"></DataGridTextColumn>
<DataGridTextColumn Header="半身像" Binding="{Binding Path=PlayerInfoModel.HalfPicture}"></DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Grid> </Grid>
</Border> </Border>
<!-- 示意图 --> <!-- 示意图 -->
...@@ -66,7 +107,7 @@ ...@@ -66,7 +107,7 @@
<RowDefinition Height="300"></RowDefinition> <RowDefinition Height="300"></RowDefinition>
<RowDefinition Height="80"></RowDefinition> <RowDefinition Height="80"></RowDefinition>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Image Source="pack://SiteOfOrigin:,,,/images/Countdown.jpg" /> <Image Source="pack://SiteOfOrigin:,,,/images/CenterTeamRanking.jpg" />
<StackPanel Orientation="Horizontal" Grid.Row="1"> <StackPanel Orientation="Horizontal" Grid.Row="1">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
......
...@@ -17,13 +17,15 @@ using VIZ.Framework.Core; ...@@ -17,13 +17,15 @@ using VIZ.Framework.Core;
namespace VIZ.TVP.Golf.Module namespace VIZ.TVP.Golf.Module
{ {
/// <summary> /// <summary>
/// FourNameBarPanel.xaml 的交互逻辑 /// CenterTeamRankingView.xaml 的交互逻辑
/// </summary> /// </summary>
public partial class FourNameBarPanel : UserControl public partial class CenterTeamRankingView : UserControl
{ {
public FourNameBarPanel() public CenterTeamRankingView()
{ {
InitializeComponent(); InitializeComponent();
WPFHelper.BindingViewModel(this, new CenterTeamRankingViewModel());
} }
} }
} }
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Xml.Linq;
using VIZ.Framework.Core; using VIZ.Framework.Core;
using VIZ.TVP.Golf.Domain;
using VIZ.TVP.Golf.Storage;
using Xceed.Wpf.Toolkit;
namespace VIZ.TVP.Golf.Module namespace VIZ.TVP.Golf.Module
{ {
/// <summary> /// <summary>
/// 包装视图模型 -- 开场 /// 包装视图模型 -- 中间队伍排名
/// </summary> /// </summary>
public class BeginViewModel : PackageViewModelBase public class CenterTeamRankingViewModel : PackageViewModelBase
{ {
public BeginViewModel() public CenterTeamRankingViewModel()
{ {
// 初始化命令
this.InitCommand();
}
/// <summary>
/// 初始化命令
/// </summary>
private void InitCommand()
{
this.LoadLocalDataCommand = new VCommand(this.LoadLocalData);
} }
// =================================================================================== // ===================================================================================
// Property // Property
// =================================================================================== // ===================================================================================
#region CurrentRound -- 当前第几局 #region CurrentRound -- 当前轮次
private int currentRound; private int currentRound;
/// <summary> /// <summary>
/// 当前第几局 /// 当前轮次
/// </summary> /// </summary>
public int CurrentRound public int CurrentRound
{ {
...@@ -35,16 +50,44 @@ namespace VIZ.TVP.Golf.Module ...@@ -35,16 +50,44 @@ namespace VIZ.TVP.Golf.Module
#endregion #endregion
#region BeginTime -- 开始时间 #region TotalHole -- 总洞数
private int totalHole;
/// <summary>
/// 总洞数
/// </summary>
public int TotalHole
{
get { return totalHole; }
set { totalHole = value; this.RaisePropertyChanged(nameof(TotalHole)); }
}
#endregion
#region TeamRankings -- 队伍排名
private ObservableCollection<TeamRealModel> teamRankings;
/// <summary>
/// 队伍排名
/// </summary>
public ObservableCollection<TeamRealModel> TeamRankings
{
get { return teamRankings; }
set { teamRankings = value; this.RaisePropertyChanged(nameof(TeamRankings)); }
}
#endregion
#region SelectedTeamRanking -- 当前选中的队伍
private string beginTime; private TeamRealModel selectedTeamRanking;
/// <summary> /// <summary>
/// 开始时间 /// 当前选中的队伍
/// </summary> /// </summary>
public string BeginTime public TeamRealModel SelectedTeamRanking
{ {
get { return beginTime; } get { return selectedTeamRanking; }
set { beginTime = value; this.RaisePropertyChanged(nameof(BeginTime)); } set { selectedTeamRanking = value; this.RaisePropertyChanged(nameof(SelectedTeamRanking)); }
} }
#endregion #endregion
...@@ -64,5 +107,55 @@ namespace VIZ.TVP.Golf.Module ...@@ -64,5 +107,55 @@ namespace VIZ.TVP.Golf.Module
} }
#endregion #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);
}
ObservableCollection<TeamRealModel> teamRankings = new ObservableCollection<TeamRealModel>();
foreach (TeamInfoModel teamModel in ApplicationDomainEx.TeamInfos)
{
TeamRealModel realModel = new TeamRealModel();
realModel.FromModel(teamModel);
for (int i = 0; i < 12; i++)
{
realModel.Players.Add(rankings[i]);
}
teamRankings.Add(realModel);
}
this.TeamRankings = teamRankings;
}
}
#endregion
} }
} }
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>
/// CountdownView.xaml 的交互逻辑
/// </summary>
public partial class CountdownView : UserControl
{
public CountdownView()
{
InitializeComponent();
WPFHelper.BindingViewModel(this, new CountdownViewModel());
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
using Xceed.Wpf.Toolkit;
namespace VIZ.TVP.Golf.Module
{
/// <summary>
/// 包装视图模型 -- 倒计时版
/// </summary>
public class CountdownViewModel : PackageViewModelBase
{
public CountdownViewModel()
{
}
// ===================================================================================
// Property
// ===================================================================================
#region Text -- 文本
private string text;
/// <summary>
/// 文本
/// </summary>
public string Text
{
get { return text; }
set { text = value; this.RaisePropertyChanged(nameof(Text)); }
}
#endregion
#region Time -- 时间
private TimeSpan time;
/// <summary>
/// 时间
/// </summary>
public TimeSpan Time
{
get { return time; }
set { time = value; this.RaisePropertyChanged(nameof(Time)); }
}
#endregion
// ===================================================================================
// Command
// ===================================================================================
#region SendCommand -- 发送命令
/// <summary>
/// 执行发送命令
/// </summary>
protected override void Send()
{
}
#endregion
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.TVP.Golf.Module
{
/// <summary>
/// 四格人名条面板键
/// </summary>
public enum FourNameBarPanelKeys
{
/// <summary>
/// 视图 1
/// </summary>
CAM_1,
/// <summary>
/// 视图 2
/// </summary>
CAM_2,
/// <summary>
/// 视图 3
/// </summary>
CAM_3,
/// <summary>
/// 视图 4
/// </summary>
CAM_4
}
}
<UserControl x:Class="VIZ.TVP.Golf.Module.FourNameBarPanel"
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:FourNameBarPanelModel}"
mc:Ignorable="d"
d:DesignHeight="400" d:DesignWidth="400">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="40"></RowDefinition>
<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=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=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=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=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=Info,Mode=TwoWay}"></TextBox>
</Grid>
</UserControl>
<UserControl x:Class="VIZ.TVP.Golf.Module.FourNameBarView"
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:FourNameBarViewModel}"
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.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">
</StackPanel>
</Border>
<!-- 版子信息 -->
<Border Grid.Row="1" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<!-- CAM 1 -->
<GroupBox Header="CAM 1" Padding="5" Margin="5">
<local:FourNameBarPanel DataContext="{Binding Cam1}"></local:FourNameBarPanel>
</GroupBox>
<!-- CAM 2 -->
<GroupBox Header="CAM 2" Padding="5" Margin="5" Grid.Column="1">
<local:FourNameBarPanel DataContext="{Binding Cam2}"></local:FourNameBarPanel>
</GroupBox>
<!-- CAM 3 -->
<GroupBox Header="CAM 3" Padding="5" Margin="5" Grid.Column="0" Grid.Row="1">
<local:FourNameBarPanel DataContext="{Binding Cam3}"></local:FourNameBarPanel>
</GroupBox>
<!-- CAM 4 -->
<GroupBox Header="CAM 4" Padding="5" Margin="5" Grid.Column="1" Grid.Row="1">
<local:FourNameBarPanel DataContext="{Binding Cam4}"></local:FourNameBarPanel>
</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/FourNameBar.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>
/// FourNameBarView.xaml 的交互逻辑
/// </summary>
public partial class FourNameBarView : UserControl
{
public FourNameBarView()
{
InitializeComponent();
WPFHelper.BindingViewModel(this, new FourNameBarViewModel());
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
namespace VIZ.TVP.Golf.Module
{
/// <summary>
/// 包装视图模型 -- 四格人名条
/// </summary>
public class FourNameBarViewModel : PackageViewModelBase
{
public FourNameBarViewModel()
{
}
// ===================================================================================
// Property
// ===================================================================================
#region Cam1 -- 视图1面板模型
private FourNameBarPanelModel cam1 = new FourNameBarPanelModel();
/// <summary>
/// 视图1面板模型
/// </summary>
public FourNameBarPanelModel Cam1
{
get { return cam1; }
set { cam1 = value; this.RaisePropertyChanged(nameof(Cam1)); }
}
#endregion
#region Cam2 -- 视图2面板模型
private FourNameBarPanelModel cam2 = new FourNameBarPanelModel();
/// <summary>
/// 视图2面板模型
/// </summary>
public FourNameBarPanelModel Cam2
{
get { return cam2; }
set { cam2 = value; this.RaisePropertyChanged(nameof(Cam2)); }
}
#endregion
#region Cam3 -- 视图3面板模型
private FourNameBarPanelModel cam3 = new FourNameBarPanelModel();
/// <summary>
/// 视图3面板模型
/// </summary>
public FourNameBarPanelModel Cam3
{
get { return cam3; }
set { cam3 = value; this.RaisePropertyChanged(nameof(Cam3)); }
}
#endregion
#region Cam4 -- 视图4面板模型
private FourNameBarPanelModel cam4 = new FourNameBarPanelModel();
/// <summary>
/// 视图4面板模型
/// </summary>
public FourNameBarPanelModel Cam4
{
get { return cam4; }
set { cam4 = value; this.RaisePropertyChanged(nameof(Cam4)); }
}
#endregion
// ===================================================================================
// Command
// ===================================================================================
#region SendCommand -- 发送命令
/// <summary>
/// 执行发送命令
/// </summary>
protected override void Send()
{
}
#endregion
}
}
<UserControl x:Class="VIZ.TVP.Golf.Module.WeatherView"
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:WeatherViewModel}"
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.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">
</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="40"></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=Temperature,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="True" Margin="5" Height="30"
TextWrapping="NoWrap" VerticalContentAlignment="Center" Grid.Row="1"
Text="{Binding Path=Wind,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="True" Margin="5" Height="30"
TextWrapping="NoWrap" VerticalContentAlignment="Center" Grid.Row="2"
Text="{Binding Path=Humidity,Mode=TwoWay}"></TextBox>
</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/Weather.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>
/// WeatherView.xaml 的交互逻辑
/// </summary>
public partial class WeatherView : UserControl
{
public WeatherView()
{
InitializeComponent();
WPFHelper.BindingViewModel(this, new WeatherViewModel());
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
namespace VIZ.TVP.Golf.Module
{
/// <summary>
/// 包装视图模型 -- 天气版
/// </summary>
public class WeatherViewModel : PackageViewModelBase
{
public WeatherViewModel()
{
}
// ===================================================================================
// Property
// ===================================================================================
#region Temperature -- 温度
private string temperature;
/// <summary>
/// 温度
/// </summary>
public string Temperature
{
get { return temperature; }
set { temperature = value; this.RaisePropertyChanged(nameof(Temperature)); }
}
#endregion
#region Wind --
private string wind;
/// <summary>
/// 风
/// </summary>
public string Wind
{
get { return wind; }
set { wind = value; this.RaisePropertyChanged(nameof(Wind)); }
}
#endregion
#region Humidity -- 湿度
private string humidity;
/// <summary>
/// 湿度
/// </summary>
public string Humidity
{
get { return humidity; }
set { humidity = value; this.RaisePropertyChanged(nameof(Humidity)); }
}
#endregion
// ===================================================================================
// Command
// ===================================================================================
#region SendCommand -- 发送命令
/// <summary>
/// 执行发送命令
/// </summary>
protected override void Send()
{
}
#endregion
}
}
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>
/// 应用程序启动 -- 初始化资源
/// </summary>
public class AppSetup_InitResource : AppSetupBase
{
/// <summary>
/// 日志
/// </summary>
private static ILog log = LogManager.GetLogger(typeof(AppSetup_InitResource));
/// <summary>
/// 描述
/// </summary>
public override string Detail { get; } = "应用程序启动 -- 初始化资源";
/// <summary>
/// 执行启动
/// </summary>
/// <param name="context">应用程序启动上下文</param>
/// <returns>是否成功执行</returns>
public override bool Setup(AppSetupContext context)
{
// 初始化队伍Logo
this.InitTeamLogo();
// 初始化洞图片
this.InitHolePicture();
// 初始化球员图片
this.InitPlayerPicture();
return true;
}
/// <summary>
/// 执行关闭
/// </summary>
/// <param name="context">应用程序启动上下文</param>
public override void Shutdown(AppSetupContext context)
{
}
/// <summary>
/// 初始化球员信息
/// </summary>
private void InitTeamLogo()
{
string path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "picture", "team");
string[] files = System.IO.Directory.GetFiles(path);
ObservableCollection<string> logos = new ObservableCollection<string>();
foreach (string file in files)
{
logos.Add(System.IO.Path.GetFileName(file));
}
TvpStaticResource.TeamLogos = logos;
}
/// <summary>
/// 初始化洞图片
/// </summary>
private void InitHolePicture()
{
string path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "picture", "hole");
string[] files = System.IO.Directory.GetFiles(path);
ObservableCollection<string> holes = new ObservableCollection<string>();
foreach (string file in files)
{
holes.Add(System.IO.Path.GetFileName(file));
}
TvpStaticResource.HolePictures = holes;
}
/// <summary>
/// 初始化球员图片
/// </summary>
private void InitPlayerPicture()
{
string path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "picture", "player");
string[] files = System.IO.Directory.GetFiles(path);
ObservableCollection<string> players = new ObservableCollection<string>();
foreach (string file in files)
{
players.Add(System.IO.Path.GetFileName(file));
}
TvpStaticResource.PlayerPictures = players;
}
}
}
\ No newline at end of file
...@@ -90,10 +90,6 @@ ...@@ -90,10 +90,6 @@
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Page Include="Package\Begin\View\BeginView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Package\BottomInformation\View\BottomInformationView.xaml"> <Page Include="Package\BottomInformation\View\BottomInformationView.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
...@@ -114,27 +110,11 @@ ...@@ -114,27 +110,11 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="Package\CenterInformation\View\CenterInformationView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Package\CenterPlayerRanking\View\CenterPlayerRankingView.xaml"> <Page Include="Package\CenterPlayerRanking\View\CenterPlayerRankingView.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="Package\Countdown\View\CountdownView.xaml"> <Page Include="Package\CenterTeamRanking\View\CenterTeamRankingView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Package\FourNameBar\View\FourNameBarPanel.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Package\FourNameBar\View\FourNameBarView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Package\Weather\View\WeatherView.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
...@@ -148,10 +128,6 @@ ...@@ -148,10 +128,6 @@
</Page> </Page>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Package\Begin\ViewModel\BeginViewModel.cs" />
<Compile Include="Package\Begin\View\BeginView.xaml.cs">
<DependentUpon>BeginView.xaml</DependentUpon>
</Compile>
<Compile Include="Package\BottomInformation\ViewModel\BottomInformationViewModel.cs" /> <Compile Include="Package\BottomInformation\ViewModel\BottomInformationViewModel.cs" />
<Compile Include="Package\BottomInformation\View\BottomInformationView.xaml.cs"> <Compile Include="Package\BottomInformation\View\BottomInformationView.xaml.cs">
<DependentUpon>BottomInformationView.xaml</DependentUpon> <DependentUpon>BottomInformationView.xaml</DependentUpon>
...@@ -179,29 +155,11 @@ ...@@ -179,29 +155,11 @@
<Compile Include="Package\CenterPlayerRanking\View\CenterPlayerRankingView.xaml.cs"> <Compile Include="Package\CenterPlayerRanking\View\CenterPlayerRankingView.xaml.cs">
<DependentUpon>CenterPlayerRankingView.xaml</DependentUpon> <DependentUpon>CenterPlayerRankingView.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Package\FourNameBar\Enum\FourNameBarPanelKeys.cs" /> <Compile Include="Package\CenterTeamRanking\ViewModel\CenterTeamRankingViewModel.cs" />
<Compile Include="Package\FourNameBar\Enum\FourNameBarPanelType.cs" /> <Compile Include="Package\CenterTeamRanking\View\CenterTeamRankingView.xaml.cs">
<Compile Include="Package\FourNameBar\ViewModel\FourNameBarPanelModel.cs" /> <DependentUpon>CenterTeamRankingView.xaml</DependentUpon>
<Compile Include="Package\FourNameBar\View\FourNameBarPanel.xaml.cs">
<DependentUpon>FourNameBarPanel.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Package\PackageViewModelBase.cs" /> <Compile Include="Package\PackageViewModelBase.cs" />
<Compile Include="Package\CenterInformation\ViewModel\CenterInformationViewModel.cs" />
<Compile Include="Package\CenterInformation\View\CenterInformationView.xaml.cs">
<DependentUpon>CenterInformationView.xaml</DependentUpon>
</Compile>
<Compile Include="Package\Countdown\ViewModel\CountdownViewModel.cs" />
<Compile Include="Package\Countdown\View\CountdownView.xaml.cs">
<DependentUpon>CountdownView.xaml</DependentUpon>
</Compile>
<Compile Include="Package\FourNameBar\ViewModel\FourNameBarViewModel.cs" />
<Compile Include="Package\FourNameBar\View\FourNameBarView.xaml.cs">
<DependentUpon>FourNameBarView.xaml</DependentUpon>
</Compile>
<Compile Include="Package\Weather\ViewModel\WeatherViewModel.cs" />
<Compile Include="Package\Weather\View\WeatherView.xaml.cs">
<DependentUpon>WeatherView.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs"> <Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
...@@ -215,6 +173,7 @@ ...@@ -215,6 +173,7 @@
<DependentUpon>Settings.settings</DependentUpon> <DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput> <DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile> </Compile>
<Compile Include="Setup\Provider\Setup\AppSetup_InitResource.cs" />
<Compile Include="Setup\Provider\Setup\AppSetup_InitLiteDB.cs" /> <Compile Include="Setup\Provider\Setup\AppSetup_InitLiteDB.cs" />
<Compile Include="Information\Team\Controller\ITeamListSupport.cs" /> <Compile Include="Information\Team\Controller\ITeamListSupport.cs" />
<Compile Include="Information\Team\Controller\TeamListController.cs" /> <Compile Include="Information\Team\Controller\TeamListController.cs" />
......
...@@ -29,8 +29,8 @@ namespace VIZ.TVP.Golf.Storage ...@@ -29,8 +29,8 @@ namespace VIZ.TVP.Golf.Storage
public string Name { get; set; } public string Name { get; set; }
/// <summary> /// <summary>
/// 队伍照片 /// 标志
/// </summary> /// </summary>
public string Picture { get; set; } public string Logo { get; set; }
} }
} }
...@@ -54,9 +54,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.Framework.Connection", ...@@ -54,9 +54,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.Framework.Connection",
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.Framework.Module", "..\VIZ.Framework\VIZ.Framework.Module\VIZ.Framework.Module.csproj", "{47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.Framework.Module", "..\VIZ.Framework\VIZ.Framework.Module\VIZ.Framework.Module.csproj", "{47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "70-TVP", "70-TVP", "{B2591788-4947-4FE8-9BCE-D19402638450}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "45-TVP", "45-TVP", "{B2591788-4947-4FE8-9BCE-D19402638450}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.Framework.TVP", "..\VIZ.Framework\VIZ.Framework.TVP\VIZ.Framework.TVP.csproj", "{38B69125-343F-4DDA-AE90-9BF4B21BF875}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.Framework.TVP.Golf", "..\VIZ.Framework\VIZ.Framework.TVP.Golf\VIZ.Framework.TVP.Golf.csproj", "{6FBD7D1A-C16E-486B-A98C-727C09E514B8}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.Framework.TVP.Golf", "..\VIZ.Framework\VIZ.Framework.TVP.Golf\VIZ.Framework.TVP.Golf.csproj", "{6FBD7D1A-C16E-486B-A98C-727C09E514B8}"
EndProject EndProject
...@@ -66,6 +64,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP.Golf.Module.Resourc ...@@ -66,6 +64,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP.Golf.Module.Resourc
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP.Golf.UnitTest", "VIZ.TVP.Golf.UnitTest\VIZ.TVP.Golf.UnitTest.csproj", "{31C30CEE-6C67-4501-9D27-FE1434F0022F}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.TVP.Golf.UnitTest", "VIZ.TVP.Golf.UnitTest\VIZ.TVP.Golf.UnitTest.csproj", "{31C30CEE-6C67-4501-9D27-FE1434F0022F}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.Framework.TVP", "..\VIZ.Framework\VIZ.Framework.TVP\VIZ.Framework.TVP.csproj", "{3E7AF8B3-24AA-44EE-A242-30E4E3DCC20C}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
...@@ -232,18 +232,6 @@ Global ...@@ -232,18 +232,6 @@ Global
{47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}.Release|x64.Build.0 = Release|x64 {47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}.Release|x64.Build.0 = Release|x64
{47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}.Release|x86.ActiveCfg = Release|Any CPU {47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}.Release|x86.ActiveCfg = Release|Any CPU
{47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}.Release|x86.Build.0 = Release|Any CPU {47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}.Release|x86.Build.0 = Release|Any CPU
{38B69125-343F-4DDA-AE90-9BF4B21BF875}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{38B69125-343F-4DDA-AE90-9BF4B21BF875}.Debug|Any CPU.Build.0 = Debug|Any CPU
{38B69125-343F-4DDA-AE90-9BF4B21BF875}.Debug|x64.ActiveCfg = Debug|x64
{38B69125-343F-4DDA-AE90-9BF4B21BF875}.Debug|x64.Build.0 = Debug|x64
{38B69125-343F-4DDA-AE90-9BF4B21BF875}.Debug|x86.ActiveCfg = Debug|Any CPU
{38B69125-343F-4DDA-AE90-9BF4B21BF875}.Debug|x86.Build.0 = Debug|Any CPU
{38B69125-343F-4DDA-AE90-9BF4B21BF875}.Release|Any CPU.ActiveCfg = Release|Any CPU
{38B69125-343F-4DDA-AE90-9BF4B21BF875}.Release|Any CPU.Build.0 = Release|Any CPU
{38B69125-343F-4DDA-AE90-9BF4B21BF875}.Release|x64.ActiveCfg = Release|x64
{38B69125-343F-4DDA-AE90-9BF4B21BF875}.Release|x64.Build.0 = Release|x64
{38B69125-343F-4DDA-AE90-9BF4B21BF875}.Release|x86.ActiveCfg = Release|Any CPU
{38B69125-343F-4DDA-AE90-9BF4B21BF875}.Release|x86.Build.0 = Release|Any CPU
{6FBD7D1A-C16E-486B-A98C-727C09E514B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6FBD7D1A-C16E-486B-A98C-727C09E514B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6FBD7D1A-C16E-486B-A98C-727C09E514B8}.Debug|Any CPU.Build.0 = Debug|Any CPU {6FBD7D1A-C16E-486B-A98C-727C09E514B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6FBD7D1A-C16E-486B-A98C-727C09E514B8}.Debug|x64.ActiveCfg = Debug|x64 {6FBD7D1A-C16E-486B-A98C-727C09E514B8}.Debug|x64.ActiveCfg = Debug|x64
...@@ -292,6 +280,18 @@ Global ...@@ -292,6 +280,18 @@ Global
{31C30CEE-6C67-4501-9D27-FE1434F0022F}.Release|x64.Build.0 = Release|Any CPU {31C30CEE-6C67-4501-9D27-FE1434F0022F}.Release|x64.Build.0 = Release|Any CPU
{31C30CEE-6C67-4501-9D27-FE1434F0022F}.Release|x86.ActiveCfg = Release|Any CPU {31C30CEE-6C67-4501-9D27-FE1434F0022F}.Release|x86.ActiveCfg = Release|Any CPU
{31C30CEE-6C67-4501-9D27-FE1434F0022F}.Release|x86.Build.0 = Release|Any CPU {31C30CEE-6C67-4501-9D27-FE1434F0022F}.Release|x86.Build.0 = Release|Any CPU
{3E7AF8B3-24AA-44EE-A242-30E4E3DCC20C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3E7AF8B3-24AA-44EE-A242-30E4E3DCC20C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3E7AF8B3-24AA-44EE-A242-30E4E3DCC20C}.Debug|x64.ActiveCfg = Debug|Any CPU
{3E7AF8B3-24AA-44EE-A242-30E4E3DCC20C}.Debug|x64.Build.0 = Debug|Any CPU
{3E7AF8B3-24AA-44EE-A242-30E4E3DCC20C}.Debug|x86.ActiveCfg = Debug|Any CPU
{3E7AF8B3-24AA-44EE-A242-30E4E3DCC20C}.Debug|x86.Build.0 = Debug|Any CPU
{3E7AF8B3-24AA-44EE-A242-30E4E3DCC20C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3E7AF8B3-24AA-44EE-A242-30E4E3DCC20C}.Release|Any CPU.Build.0 = Release|Any CPU
{3E7AF8B3-24AA-44EE-A242-30E4E3DCC20C}.Release|x64.ActiveCfg = Release|Any CPU
{3E7AF8B3-24AA-44EE-A242-30E4E3DCC20C}.Release|x64.Build.0 = Release|Any CPU
{3E7AF8B3-24AA-44EE-A242-30E4E3DCC20C}.Release|x86.ActiveCfg = Release|Any CPU
{3E7AF8B3-24AA-44EE-A242-30E4E3DCC20C}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
...@@ -310,11 +310,11 @@ Global ...@@ -310,11 +310,11 @@ Global
{76EF480A-E486-41B7-B7A5-2A849FC8D5BF} = {128ED687-1A48-4DAC-8F08-51CCD0D2FDB2} {76EF480A-E486-41B7-B7A5-2A849FC8D5BF} = {128ED687-1A48-4DAC-8F08-51CCD0D2FDB2}
{E07528DD-9DEE-47C2-B79D-235ECFA6B003} = {4C86C0FA-C6AF-44BD-A5E7-684B76ABB019} {E07528DD-9DEE-47C2-B79D-235ECFA6B003} = {4C86C0FA-C6AF-44BD-A5E7-684B76ABB019}
{47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892} = {97EF3462-638D-43A2-91F0-A8711C3B2441} {47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892} = {97EF3462-638D-43A2-91F0-A8711C3B2441}
{38B69125-343F-4DDA-AE90-9BF4B21BF875} = {B2591788-4947-4FE8-9BCE-D19402638450}
{6FBD7D1A-C16E-486B-A98C-727C09E514B8} = {B2591788-4947-4FE8-9BCE-D19402638450} {6FBD7D1A-C16E-486B-A98C-727C09E514B8} = {B2591788-4947-4FE8-9BCE-D19402638450}
{B62C822E-701F-480F-BBB1-0E02217D622C} = {C8BC2310-EC1F-4740-B0E1-5D1970CB8ABC} {B62C822E-701F-480F-BBB1-0E02217D622C} = {C8BC2310-EC1F-4740-B0E1-5D1970CB8ABC}
{21F2A416-8D25-4EA9-8B49-23030D2E70CF} = {97EF3462-638D-43A2-91F0-A8711C3B2441} {21F2A416-8D25-4EA9-8B49-23030D2E70CF} = {97EF3462-638D-43A2-91F0-A8711C3B2441}
{31C30CEE-6C67-4501-9D27-FE1434F0022F} = {C8BC2310-EC1F-4740-B0E1-5D1970CB8ABC} {31C30CEE-6C67-4501-9D27-FE1434F0022F} = {C8BC2310-EC1F-4740-B0E1-5D1970CB8ABC}
{3E7AF8B3-24AA-44EE-A242-30E4E3DCC20C} = {B2591788-4947-4FE8-9BCE-D19402638450}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {707D0154-A468-43A1-B3B7-C21E1B09C409} SolutionGuid = {707D0154-A468-43A1-B3B7-C21E1B09C409}
......
...@@ -19,6 +19,8 @@ namespace VIZ.TVP.Golf ...@@ -19,6 +19,8 @@ namespace VIZ.TVP.Golf
{ {
// 初始化 LiteDB // 初始化 LiteDB
AppSetup.AppendSetup(new AppSetup_InitLiteDB()); AppSetup.AppendSetup(new AppSetup_InitLiteDB());
// 初始化 包装资源
AppSetup.AppendSetup(new AppSetup_InitResource());
// 启动 // 启动
AppSetupContext context = AppSetup.Setup(); AppSetupContext context = AppSetup.Setup();
......
...@@ -233,5 +233,104 @@ ...@@ -233,5 +233,104 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="images\CenterTeamRanking.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<None Include="picture\team\东北大学.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\云南大学.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\北大国发院.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\华南理工.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\南京大学.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\复旦大学.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\西安交通大学.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="picture\hole\北大国发院.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="picture\hole\东北大学.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="picture\hole\复旦大学.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="picture\hole\华南理工.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="picture\hole\南京大学.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="picture\hole\西安交通大学.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="picture\hole\云南大学.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="picture\player\北大国发院.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="picture\player\东北大学.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="picture\player\复旦大学.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="picture\player\华南理工.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="picture\player\南京大学.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="picture\player\西安交通大学.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="picture\player\云南大学.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
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