Commit 0953231d by liulongfei

资源添加

parent 54553cdc
......@@ -60,7 +60,7 @@
<local:GroupPickerPanelNoPlayer DataContext="{Binding Path=GroupPickerPanelModel}" Margin="5"></local:GroupPickerPanelNoPlayer>
</GroupBox>
<!-- 洞得分信息 -->
<GroupBox Padding="10" Grid.Row="1">
<GroupBox Padding="10" Grid.Row="1" Grid.RowSpan="2">
<GroupBox.Header>
<TextBlock Text="每洞杆数信息" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
......@@ -83,7 +83,7 @@
</Grid>
</GroupBox>
<!-- 总杆数汇总 -->
<GroupBox Padding="10" Grid.Row="2">
<!--<GroupBox Padding="10" Grid.Row="2" Visibility="Collapsed">
<GroupBox.Header>
<TextBlock Text="总杆数汇总" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
......@@ -94,24 +94,31 @@
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<!-- 前9洞 -->
-->
<!-- 前9洞 -->
<!--
<fcommon:LabelValue Style="{StaticResource LabelValue_Default}" LabelWidth="60"
Label="前9洞:" Text="{Binding Path=FirstHoleStrokes,Mode=TwoWay}"></fcommon:LabelValue>
<!-- 后9洞 -->
-->
<!-- 后9洞 -->
<!--
<fcommon:LabelValue Style="{StaticResource LabelValue_Default}" LabelWidth="60"
Label="后9洞:" Text="{Binding Path=SecendHoleStrokes,Mode=TwoWay}" Grid.Column="1"></fcommon:LabelValue>
<!-- 总计 -->
-->
<!-- 总计 -->
<!--
<fcommon:LabelValue Style="{StaticResource LabelValue_Default}" LabelWidth="60"
Label="总计:" Text="{Binding Path=TotalHoleStrokes,Mode=TwoWay}" Grid.Column="2"></fcommon:LabelValue>
<!-- 计算 -->
-->
<!-- 计算 -->
<!--
<fcommon:IconButton Style="{StaticResource IconButton_Green}" VerticalAlignment="Center" HorizontalAlignment="Left"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/presets_16x16.png"
Content="汇总计算" Grid.Column="3" Width="80" Height="30" Margin="40,0,0,0"
Command="{Binding SummaryCommand}"></fcommon:IconButton>
</Grid>
</GroupBox>
</GroupBox>-->
</Grid>
</Border>
<!-- 示意图 -->
......
......@@ -143,7 +143,7 @@ namespace VIZ.TVP.Golf.Module
Dictionary<string, IVizControlObjctsValue> dic = new Dictionary<string, IVizControlObjctsValue>();
// 队伍图标
dic["1"] = new VizControlObjectsStringValue(this.resourceService.GetImageName(this.GroupPickerPanelModel.SelectedGroupInfo.TeamLogo));
dic["1"] = new VizControlObjectsStringValue(this.resourceService.GetImageName(ResourceType.SHOOL, this.GroupPickerPanelModel.SelectedGroupInfo.TeamLogo));
// 分组
dic["NUMBER"] = new VizControlObjectsStringValue(this.GroupPickerPanelModel.SelectedGroupInfo.Group);
// 队员
......
......@@ -7,6 +7,7 @@ using System.Web.WebSockets;
using System.Windows;
using VIZ.Framework.Core;
using VIZ.TVP.Golf.Domain;
using VIZ.TVP.Golf.Service;
using VIZ.TVP.Golf.Storage;
namespace VIZ.TVP.Golf.Module
......@@ -123,7 +124,7 @@ namespace VIZ.TVP.Golf.Module
Dictionary<string, string> team1 = new Dictionary<string, string>();
// 队伍Logo
team1["FLAG"] = this.resourceService.GetImageName(this.GroupPickerPanelModel1.SelectedGroupInfo.TeamLogo);
team1["FLAG"] = this.resourceService.GetImageName(ResourceType.SHOOL, this.GroupPickerPanelModel1.SelectedGroupInfo.TeamLogo);
// 排名
team1["NUMBER"] = this.GroupPickerPanelModel1.PlayersPosition;
// 得分
......@@ -135,7 +136,7 @@ namespace VIZ.TVP.Golf.Module
Dictionary<string, string> team2 = new Dictionary<string, string>();
// 队伍Logo
team2["FLAG"] = this.resourceService.GetImageName(this.GroupPickerPanelModel2.SelectedGroupInfo.TeamLogo);
team2["FLAG"] = this.resourceService.GetImageName(ResourceType.SHOOL, this.GroupPickerPanelModel2.SelectedGroupInfo.TeamLogo);
// 排名
team2["NUMBER"] = this.GroupPickerPanelModel2.PlayersPosition;
// 得分
......
......@@ -7,6 +7,7 @@ using System.Threading.Tasks;
using System.Windows;
using VIZ.Framework.Core;
using VIZ.TVP.Golf.Domain;
using VIZ.TVP.Golf.Service;
namespace VIZ.TVP.Golf.Module
{
......@@ -80,7 +81,7 @@ namespace VIZ.TVP.Golf.Module
// 得分
item["D2"] = grpup.PlayersScore;
// 球队logo
item["FLAGE"] = this.resourceService.GetImageName(grpup.TeamLogo);
item["FLAGE"] = this.resourceService.GetImageName(ResourceType.SHOOL, grpup.TeamLogo);
// ??
item["KG.active"] = "true";
// 排名
......
......@@ -9,6 +9,7 @@ using System.Windows.Markup;
using System.Windows.Navigation;
using VIZ.Framework.Core;
using VIZ.TVP.Golf.Domain;
using VIZ.TVP.Golf.Service;
namespace VIZ.TVP.Golf.Module
{
......@@ -133,7 +134,7 @@ namespace VIZ.TVP.Golf.Module
// 得分
item["SCORE"] = grpup.PlayersScore;
// 球队logo
item["FLAG"] = this.resourceService.GetImageName(grpup.TeamLogo);
item["FLAG"] = this.resourceService.GetImageName(ResourceType.SHOOL, grpup.TeamLogo);
// 排名
item["NUMBER"] = grpup.Position;
// 队伍名称
......
......@@ -9,6 +9,7 @@ using System.Windows.Markup;
using System.Windows.Navigation;
using VIZ.Framework.Core;
using VIZ.TVP.Golf.Domain;
using VIZ.TVP.Golf.Service;
namespace VIZ.TVP.Golf.Module
{
......@@ -156,9 +157,9 @@ namespace VIZ.TVP.Golf.Module
// 球员2 姓名
item["PLAYER2"] = players[1].Name;
// 球员1 照片
item["PLAYERPHOTOLEFT"] = this.resourceService.GetImageName(players[0].HalfPicture);
item["PLAYERPHOTOLEFT"] = this.resourceService.GetImageName(ResourceType.PLAYER, players[0].HalfPicture);
// 球员2 照片
item["PLAYERPHOTORIGHT"] = this.resourceService.GetImageName(players[1].HalfPicture);
item["PLAYERPHOTORIGHT"] = this.resourceService.GetImageName(ResourceType.PLAYER, players[1].HalfPicture);
}
}
......@@ -227,7 +228,7 @@ namespace VIZ.TVP.Golf.Module
// 球员 姓名
item["PLAYER1"] = players[i].Name;
// 球员 照片
item["PLAYERPHOTOLEFT"] = this.resourceService.GetImageName(players[i].HalfPicture);
item["PLAYERPHOTOLEFT"] = this.resourceService.GetImageName(ResourceType.PLAYER, players[i].HalfPicture);
// 是否显示
item["SHOW"] = "1";
}
......
......@@ -82,7 +82,7 @@ namespace VIZ.TVP.Golf.Module
// 得分
item["D2"] = team.TotalScore;
// 球队logo
item["FLAGE"] = this.resourceService.GetImageName(team.Logo);
item["FLAGE"] = this.resourceService.GetImageName(ResourceType.SHOOL, team.Logo);
// ??
item["KG.active"] = "true";
// 排名
......
......@@ -82,7 +82,7 @@ namespace VIZ.TVP.Golf.Module
// 得分
item["D2"] = team.TotalScore;
// 球队logo
item["FLAGE"] = this.resourceService.GetImageName(team.Logo);
item["FLAGE"] = this.resourceService.GetImageName(ResourceType.SHOOL, team.Logo);
// ??
item["KG.active"] = "true";
// 排名
......
......@@ -79,7 +79,7 @@ namespace VIZ.TVP.Golf.Module
// 得分
item["SCORE"] = team.TotalScore;
// 球队logo
item["1"] = this.resourceService.GetImageName(team.Logo);
item["1"] = this.resourceService.GetImageName(ResourceType.SHOOL, team.Logo);
// 高亮
item["HL.active"] = team.IsActive ? "1" : "0";
// 排名
......
......@@ -161,10 +161,13 @@ namespace VIZ.TVP.Golf.Module
private void InitDetails()
{
ObservableCollection<string> details = new ObservableCollection<string>();
for (int i = 1; i <= 10; i++)
{
details.Add($"Detail {i}");
}
//Par,Birdie,Eagle,double eagle,Albatross,Bogey
details.Add("Par");
details.Add("Birdie");
details.Add("Eagle");
details.Add("double eagle");
details.Add("Albatross");
details.Add("Bogey");
TvpStaticResource.Details = details;
}
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.TVP.Golf.Service
{
/// <summary>
/// 资源类型
/// </summary>
public enum ResourceType
{
/// <summary>
/// 学校Logo
/// </summary>
SHOOL,
/// <summary>
/// 洞
/// </summary>
HOLE,
/// <summary>
/// 球员
/// </summary>
PLAYER
}
}
......@@ -33,11 +33,27 @@ namespace VIZ.TVP.Golf.Service
/// <summary>
/// 获取图片名字
/// </summary>
/// <param name="type">资源类型</param>
/// <param name="path">图片路径</param>
/// <returns>图片资源名字</returns>
public string GetImageName(string path)
public string GetImageName(ResourceType type, string path)
{
return "IMAGE*/MyTestProject/Images/1";
if (type == ResourceType.SHOOL)
{
return $"IMAGE*/MyTestProject/Images/shool_logo/path";
}
if (type == ResourceType.HOLE)
{
return "IMAGE*/MyTestProject/Images/1";
}
if (type == ResourceType.PLAYER)
{
return "IMAGE*/MyTestProject/Images/1";
}
return path;
}
/// <summary>
......
......@@ -22,9 +22,10 @@ namespace VIZ.TVP.Golf.Service
/// <summary>
/// 获取图片名字
/// </summary>
/// <param name="type">资源类型</param>
/// <param name="path">图片路径</param>
/// <returns>图片资源名字</returns>
string GetImageName(string path);
string GetImageName(ResourceType type, string path);
/// <summary>
/// 获取分组名字
......
......@@ -78,6 +78,7 @@
<Compile Include="Excel\Implementation\ExcelService.cs" />
<Compile Include="Excel\Interface\IExcelService.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RealData\Enum\ResourceType.cs" />
<Compile Include="RealData\Implementation\FileDataService.cs" />
<Compile Include="RealData\Implementation\RealDataService.cs" />
<Compile Include="RealData\Implementation\ResourceService.cs" />
......
......@@ -243,38 +243,6 @@
</None>
</ItemGroup>
<ItemGroup>
<None Include="picture\team\Tbeidaguofa.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\Tbeidahuifeng.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\Tbeijindaxue.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\Tchangjiangshangxueyuan.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\Tchuanda.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\Tdongbeidaxue.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\Tfudandaxue.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\Thaerbingdaxue.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\Thuananligong.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\Tsinghua.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="picture\hole\hole_01.jfif">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
......@@ -405,5 +373,70 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="picture\team\beidaguofayuan.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\beidahuifeng.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\beijingdaxue.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\changjiangshangxueyuan.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\chongqingdaxue.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\dongbeidaxue.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\fudandaxue.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\haerbingongye.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\hunanligong.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\jinandaxue.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\nanjingdaxue.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\shanghaigaojijinrongxueyuan.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\shanghaijiaotong.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\sichuangdaxue.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\Tsinghua.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\xianggangchengshidaxue.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\xianjiaotong.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\xinancaijing.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\yunnandaxue.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\zhejiangdaxue.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="picture\team\zhongouguoji.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment