Commit f5aa11c9 by wangonghui

图片路径修改

parent dd54b206
......@@ -147,22 +147,22 @@ namespace VIZ.TVP.CBA.Module
{
PlayNum = HNameNums[selectPlayer];
if (TeamItems[selectedIndex] == "北京控股666")
{
if (File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")))
{
PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
}
//if (TeamItems[selectedIndex] == "北京控股666")
//{
// if (File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")))
// {
// PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
// }
}
else
{
if (File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, TeamItems[selectedIndex])))
{
PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, TeamItems[selectedIndex])));
}
//}
//else
//{
// if (File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, TeamItems[selectedIndex])))
// {
// PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, TeamItems[selectedIndex])));
// }
}
//}
}
}
......@@ -172,22 +172,22 @@ namespace VIZ.TVP.CBA.Module
{
PlayNum = VNameNums[selectPlayer];
if (TeamItems[selectedIndex] == "北京控股666")
{
if (File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")))
{
PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
}
}
else
{
if (File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, TeamItems[selectedIndex])))
{
PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, TeamItems[selectedIndex])));
}
}
//if (TeamItems[selectedIndex] == "北京控股666")
//{
// if (File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")))
// {
// PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
// }
//}
//else
//{
// if (File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, TeamItems[selectedIndex])))
// {
// PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, TeamItems[selectedIndex])));
// }
//}
}
}
......
......@@ -335,7 +335,7 @@ namespace VIZ.TVP.CBA.Module
string baesePath = AppDomain.CurrentDomain.BaseDirectory;
// string baesePath = AppDomain.CurrentDomain.BaseDirectory;
private string aPlayer;
......@@ -349,21 +349,31 @@ namespace VIZ.TVP.CBA.Module
if (APlayer == null) return;
if (AName == "北京控股666")
//if (AName == "北京控股666")
//{
// if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")))
// {
// APlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
// }
//}
//else
//{
// if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, AName)))
// {
// APlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, AName)));
// }
//}
string playPath = string.Format("{0}\\{1}\\{2}.png", AppSetup_InitCBALiteDB.HttpUrlConfigEntity.PlayersLogo, AName, APlayer);
if (File.Exists(playPath))
{
if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")))
{
APlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
}
APlayerLogo = new BitmapImage(new Uri(playPath));
}
else
{
if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, AName)))
{
APlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, AName)));
}
APlayerLogo = null;
}
if (VNameNums.ContainsKey(APlayer))
......@@ -395,21 +405,32 @@ namespace VIZ.TVP.CBA.Module
hPlayer = value;
this.RaisePropertyChanged(nameof(HPlayer));
if (HPlayer == null) return;
if (HName == "北京控股666")
//if (HName == "北京控股666")
//{
// if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")))
// {
// HPlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
// }
//}
//else
//{
// if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, HName)))
// {
// HPlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, HName)));
// }
//}
string playPath = string.Format("{0}\\{1}\\{2}.png", AppSetup_InitCBALiteDB.HttpUrlConfigEntity.PlayersLogo, HName, hPlayer);
if (File.Exists(playPath))
{
if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")))
{
HPlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
}
HPlayerLogo = new BitmapImage(new Uri(playPath));
}
else
{
if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, HName)))
{
HPlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, HName)));
}
HPlayerLogo = null;
}
if (HNameNums.ContainsKey(HPlayer))
......
......@@ -24,7 +24,7 @@ namespace VIZ.TVP.CBA.Module
/// <summary>
/// 插件名称
/// </summary>
public const string PLUGIN_NAME = "数据访问配置";
public const string PLUGIN_NAME = "CBA赛事配置";
/// <summary>
/// 注册
......
......@@ -17,7 +17,7 @@
<Grid>
<!-- 数据访问设置 -->
<GroupBox Header="主数据访问配置" Margin="10" Padding="10">
<GroupBox Header="CBA赛事配置" Margin="10" Padding="10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"></ColumnDefinition>
......@@ -37,6 +37,9 @@
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
</Grid.RowDefinitions>
......@@ -74,6 +77,19 @@
EditValue="{Binding Path=BAppKey,Mode=TwoWay}"></dxe:TextEdit>
<TextBlock Text="图片地址:" Grid.Row="8" VerticalAlignment="Center" HorizontalAlignment="Center" />
<!-- 球队地址 -->
<TextBlock Text="球队图片地址:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0" Grid.Row="9"></TextBlock>
<dxe:TextEdit Grid.Column="1" Height="30" Grid.Row="9"
EditValue="{Binding Path=TeamsLogo,Mode=TwoWay}"></dxe:TextEdit>
<TextBlock Text="球员图片地址:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0" Grid.Row="10"></TextBlock>
<dxe:TextEdit Grid.Column="1" Height="30" Grid.Row="10"
EditValue="{Binding Path=PlayersLogo,Mode=TwoWay}"></dxe:TextEdit>
</Grid>
</GroupBox>
......
......@@ -149,6 +149,36 @@ namespace VIZ.TVP.CBA.Module
#endregion
#region 图片地址
/// <summary>
/// 球队图片地址
/// </summary>
private string teamsLogo;
public string TeamsLogo
{
get { return teamsLogo; }
set { teamsLogo = value; this.RaisePropertyChanged(nameof(TeamsLogo)); }
}
/// <summary>
/// 球员图片地址
/// </summary>
private string playersLogo;
public string PlayersLogo
{
get { return playersLogo; }
set { playersLogo = value; this.RaisePropertyChanged(nameof(PlayersLogo)); }
}
#endregion
// =========================================================================
// Command
// =========================================================================
......@@ -179,6 +209,10 @@ namespace VIZ.TVP.CBA.Module
this.BAppKey = AppSetup_InitCBALiteDB.HttpUrlConfigEntity.BAppKey;
this.TeamsLogo = AppSetup_InitCBALiteDB.HttpUrlConfigEntity.TeamsLogo;
this.PlayersLogo=AppSetup_InitCBALiteDB.HttpUrlConfigEntity.PlayersLogo;
}
......@@ -203,6 +237,9 @@ namespace VIZ.TVP.CBA.Module
config.BAppId = this.BAppId;
config.BAppKey = this.BAppKey;
config.TeamsLogo = this.TeamsLogo;
config.PlayersLogo = this.PlayersLogo;
AppSetup_InitCBALiteDB.cBALocalDbContext.HttpUrlConfig.Upsert(config);
......
......@@ -149,22 +149,22 @@ namespace VIZ.TVP.CBA.Module
{
PlayNum = HNameNums[selectPlayer];
if (TeamItems[selectedIndex] == "北京控股666")
{
if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")))
{
PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
}
//if (TeamItems[selectedIndex] == "北京控股666")
//{
// if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")))
// {
// PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
// }
}
else
{
if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, TeamItems[selectedIndex])))
{
PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, TeamItems[selectedIndex])));
}
//}
//else
//{
// if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, TeamItems[selectedIndex])))
// {
// PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, TeamItems[selectedIndex])));
// }
}
//}
}
}
......@@ -174,22 +174,22 @@ namespace VIZ.TVP.CBA.Module
{
PlayNum = VNameNums[selectPlayer];
if (TeamItems[selectedIndex] == "北京控股666")
{
if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")))
{
PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
}
}
else
{
if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, TeamItems[selectedIndex])))
{
PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, TeamItems[selectedIndex])));
}
//if (TeamItems[selectedIndex] == "北京控股666")
//{
// if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")))
// {
// PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
// }
//}
//else
//{
// if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, TeamItems[selectedIndex])))
// {
// PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, TeamItems[selectedIndex])));
// }
}
//}
}
}
......
......@@ -56,6 +56,17 @@ namespace VIZ.TVP.CBA.Module
/// </summary>
public string BAppKey { get; set; } = "ffrw7ilc8i6r3pkzvl";
/// <summary>
/// 球队图片地址
/// </summary>
public string TeamsLogo { get; set; } = "Z:\\2022_migu_picture\\teamlogo\\";
/// <summary>
/// 球员图片地址
/// </summary>
public string PlayersLogo { get; set; } = "Z:\\2022_migu_picture\\PlayerHeadLogo\\";
#endregion
......
......@@ -1318,48 +1318,48 @@ namespace VIZ.TVP.CBA.Module
HomeTeam = onAirDataModel.liveTeamInfo.HomeTeamCNAlias;
string baesePath = AppDomain.CurrentDomain.BaseDirectory;
if (!string.IsNullOrEmpty(HomeTeam))
{
if (HomeTeam == "北京控股666")
{
if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")))
{
HomeTeamLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
}
//string baesePath = AppDomain.CurrentDomain.BaseDirectory;
//if (!string.IsNullOrEmpty(HomeTeam))
//{
// if (HomeTeam == "北京控股666")
// {
// if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")))
// {
// HomeTeamLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
// }
}
else
{
if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, HomeTeam)))
{
HomeTeamLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, HomeTeam)));
}
// }
// else
// {
// if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, HomeTeam)))
// {
// HomeTeamLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, HomeTeam)));
// }
}
// }
}
//}
AwayTeam = onAirDataModel.liveTeamInfo.VisitingTeamCNAlias;
if (!string.IsNullOrEmpty(AwayTeam))
{
if (AwayTeam == "北京控股666")
{
if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")))
{
AwayTeamLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
}
//if (!string.IsNullOrEmpty(AwayTeam))
//{
// if (AwayTeam == "北京控股666")
// {
// if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")))
// {
// AwayTeamLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
// }
}
else
{
if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, AwayTeam)))
{
AwayTeamLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, AwayTeam)));
}
}
}
// }
// else
// {
// if(File.Exists(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, AwayTeam)))
// {
// AwayTeamLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, AwayTeam)));
// }
// }
//}
TeamSeasonData = await JsonModel.PostTeamSeasonData_Path(Matchtypeid);
......
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