Commit aa1d5cc6 by wangonghui

添加图片

parent 40ed7b7b
......@@ -31,6 +31,7 @@
<Grid.RowDefinitions>
<RowDefinition Height="0"/>
<RowDefinition Height="200"/>
<RowDefinition Height="160"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--<WrapPanel Grid.Row="0" VerticalAlignment="Center">
......@@ -61,7 +62,7 @@
</Grid>
</WrapPanel>-->
<WrapPanel Grid.Row="1" Height="190" Width="650" HorizontalAlignment="Left" VerticalAlignment="Center" >
<WrapPanel Grid.Row="1" Height="160" Width="650" HorizontalAlignment="Left" VerticalAlignment="Center" >
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
......@@ -167,49 +168,24 @@
</Grid>
</WrapPanel>
<!--<DataGrid AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False"
ItemsSource="{Binding Path=PlayerComModels}" Grid.Row="1" Background="Black" RowHeaderWidth="0" >
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center"></Setter>
<Setter Property="Background" Value="Black"></Setter>
<Setter Property="Foreground" Value="White"></Setter>
<Setter Property="BorderThickness" Value="1"></Setter>
<Setter Property="FontSize" Value="20"/>
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.Columns>
<DataGridComboBoxColumn Header="" Width="100" SelectedItemBinding="{Binding Path=Light,Mode=TwoWay,Converter={StaticResource Enum2EnumDescriptionConverter}}"
ItemsSource="{Binding Source={x:Static Member=storage:StaticEnumInfos.EnumDescriptions}}"
CellStyle="{StaticResource DataGirdView_UI}" >
</DataGridComboBoxColumn>
<DataGridTextColumn Header="主队球员本场" Width="*" Binding="{Binding Path=HScore}" CellStyle="{StaticResource DataGirdView_UI}" ></DataGridTextColumn>
<DataGridTextColumn Header="主队球员赛季" Width="*" Binding="{Binding Path=HSeasonScore}" CellStyle="{StaticResource DataGirdView_UI}"></DataGridTextColumn>
<DataGridComboBoxColumn Header="" Width="100"
SelectedItemBinding="{Binding Path=TechStats,Mode=TwoWay,Converter={StaticResource TechStatsEnumDescriptionConverter},UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Source={x:Static Member=storage:StaticEnumInfos.EnumTechStatsDescriptions}}"
CellStyle="{StaticResource DataGirdView_UI}" >
<DataGridComboBoxColumn.EditingElementStyle>
<Style TargetType="ComboBox">
<EventSetter Event="SelectionChanged" Handler="ComboBox_SelectionChanged_1"></EventSetter>
</Style>
</DataGridComboBoxColumn.EditingElementStyle>
</DataGridComboBoxColumn>
<DataGridTextColumn Header="客队球员本场" Width="*" Binding="{Binding Path=AScore}" CellStyle="{StaticResource DataGirdView_UI}"></DataGridTextColumn>
<DataGridTextColumn Header="客队球员赛季" Width="*" Binding="{Binding Path=ASeasonScore}" CellStyle="{StaticResource DataGirdView_UI}"></DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>-->
<DockPanel Grid.Row="2">
<WrapPanel Grid.Row="2" Margin="90,0,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="200"/>
</Grid.ColumnDefinitions>
<dxe:ImageEdit Grid.Column="0" Height="150" Width="120" x:Name="HPlayer_Logo" ShowMenu="False" EditValue="{Binding Path=HPlayerLogo}"
ShowLoadDialogOnClickMode="Never"/>
<dxe:ImageEdit Grid.Column="1" Height="150" Width="120" x:Name="APlayer_Logo" ShowMenu="False" EditValue="{Binding Path=APlayerLogo}"
ShowLoadDialogOnClickMode="Never" Margin="-25,0,0,0"/>
</Grid>
</WrapPanel>
<DockPanel Grid.Row="3">
<ScrollViewer HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto"
......
......@@ -11,6 +11,8 @@ using VIZ.Framework.Core;
using DevExpress.Mvvm.POCO;
using System.ComponentModel;
using log4net;
using System.Windows.Media.Imaging;
using System.Windows.Media;
namespace VIZ.TVP.CBA.Module
{
......@@ -603,6 +605,21 @@ namespace VIZ.TVP.CBA.Module
}
/// <summary>
/// 主队球员图片
/// </summary>
private ImageSource hPlayerLogo;
public ImageSource HPlayerLogo
{
get { return hPlayerLogo; }
set { hPlayerLogo = value;this.RaisePropertyChanged(nameof(HPlayerLogo)); }
}
string baesePath = AppDomain.CurrentDomain.BaseDirectory;
private string aPlayer;
......@@ -615,15 +632,27 @@ namespace VIZ.TVP.CBA.Module
this.RaisePropertyChanged(nameof(APlayer));
if (APlayer == null) return;
APlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, HName)));
if (VNameNums.ContainsKey(APlayer))
{
ANums = VNameNums[APlayer];
}
SetAData();
}
}
/// <summary>
/// 客队球员图片
/// </summary>
private ImageSource aPlayerLogo;
public ImageSource APlayerLogo
{
get { return aPlayerLogo; }
set { aPlayerLogo = value;this.RaisePropertyChanged(nameof(APlayerLogo)); }
}
private string hPlayer;
public string HPlayer
......@@ -634,6 +663,15 @@ namespace VIZ.TVP.CBA.Module
hPlayer = value;
this.RaisePropertyChanged(nameof(HPlayer));
if (HPlayer == null) return;
if (AName == "北京控股666")
{
HPlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
}
else
{
HPlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, AName)));
}
if (HNameNums.ContainsKey(HPlayer))
{
HNums = HNameNums[HPlayer];
......
......@@ -28,6 +28,7 @@
<RowDefinition Height="0"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="160"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
......@@ -64,7 +65,9 @@
</Grid>
</WrapPanel>-->
<WrapPanel Grid.Row="1" VerticalAlignment="Center" >
<WrapPanel Grid.Row="2" VerticalAlignment="Center" >
<Grid>
<Grid.ColumnDefinitions>
<!--<ColumnDefinition Width="50"/>
......@@ -118,7 +121,7 @@
</Grid>
</WrapPanel>
<WrapPanel Grid.Row="2" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Center">
<WrapPanel Grid.Row="1" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Center">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="65"/>
......@@ -133,7 +136,7 @@
<dxe:TextEdit Grid.Column="1" Width="120" FontSize="16" HorizontalContentAlignment="Center"
HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding Title,Mode=TwoWay }"></dxe:TextEdit>
<Button Content="刷新" Command="{Binding BtnCmd}" HorizontalContentAlignment="Center"
Grid.Column="2" Width="95" Height="30" FontSize="14"/>
Grid.Column="3" Width="95" Height="30" FontSize="14"/>
<!--<Button Content="单人球员" Command="{Binding SingleCommand}" HorizontalContentAlignment="Center"
Grid.Column="3" Width="95" Height="30" FontSize="14"/>
<Button Content="MVP球员" Command="{Binding MVPCommand}" HorizontalContentAlignment="Center"
......@@ -142,70 +145,23 @@
</Grid>
</WrapPanel>
<!--<DataGrid AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False"
ItemsSource="{Binding Path=SinglePlayerData,Mode=TwoWay}" Grid.Row="1" Background="Black" RowHeaderWidth="0" SelectedItem="{Binding Path= SinglePlayer, Mode=TwoWay}" >
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center"></Setter>
<Setter Property="Background" Value="Black"></Setter>
<Setter Property="Foreground" Value="White"></Setter>
<Setter Property="BorderThickness" Value="1"></Setter>
<Setter Property="FontSize" Value="20"/>
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.Columns>
<DataGridComboBoxColumn Header="" Width="100" SelectedItemBinding="{Binding Path=Light,Mode=TwoWay,Converter={StaticResource Enum2EnumDescriptionConverter}}"
ItemsSource="{Binding Source={x:Static Member=storage:StaticEnumInfos.EnumDescriptions}}"
CellStyle="{StaticResource DataGirdView_UI}" >
</DataGridComboBoxColumn>
<DataGridComboBoxColumn Header="" Width="100" x:Name="com_StatsIds"
ItemsSource="{Binding Source={x:Static Member=storage:StaticEnumInfos.EnumTechStatsDescriptions}}"
SelectedItemBinding="{Binding Path=TechStats,Mode=TwoWay,Converter={StaticResource TechStatsEnumDescriptionConverter},UpdateSourceTrigger=PropertyChanged}"
CellStyle="{StaticResource DataGirdView_UI}" >
<DataGridComboBoxColumn.EditingElementStyle>
<Style TargetType="ComboBox">
<EventSetter Event="SelectionChanged" Handler="ComboBox_SelectionChanged_1"/>
-->
<!--<Setter Property="Background" Value="Red"/>-->
<!--
</Style>
</DataGridComboBoxColumn.EditingElementStyle>
-->
<!--<DataGridComboBoxColumn.ElementStyle>
<Style TargetType="ComboBox">
<Setter Property="Background" Value="Red"></Setter>
</Style>
</DataGridComboBoxColumn.ElementStyle>-->
<!--
</DataGridComboBoxColumn>
-->
<!--<DataGridTemplateColumn Header="TempPlateComBox" >
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<ComboBox ItemsSource="{Binding TechStatsIds,Mode=TwoWay,ElementName=this}" SelectedValue="{Binding Path=TechStatsId,Mode=TwoWay}" Style="{StaticResource ComboBoxStyle}">
</ComboBox>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>-->
<!--
<DataGridTextColumn Header="本场" Width="*" Binding="{Binding Path=Score}" CellStyle="{StaticResource DataGirdView_UI}"></DataGridTextColumn>
<DataGridTextColumn Header="赛季" Width="*" Binding="{Binding Path=SeasonScore}" CellStyle="{StaticResource DataGirdView_UI}"></DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>-->
<DockPanel Grid.Row="3">
<WrapPanel Grid.Row="3" Margin="190,0,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="200"/>
</Grid.ColumnDefinitions>
<dxe:ImageEdit Grid.Column="0" Height="150" Width="120" x:Name="Player_Logo" ShowMenu="False" EditValue="{Binding Path=PlayerLogo}"
ShowLoadDialogOnClickMode="Never" Margin="0,0,0,10"/>
<!--<dxe:ImageEdit Grid.Column="1" Height="150" Width="120" x:Name="Away_TeamLogo" ShowMenu="False" EditValue="{Binding Path=AwayTeamLogo}"
ShowLoadDialogOnClickMode="Never" Margin="-25,0,0,0"/>-->
</Grid>
</WrapPanel>
<DockPanel Grid.Row="4">
<ScrollViewer HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto"
Name="PART_Options"
......
......@@ -8,6 +8,8 @@ using System.Windows;
using VIZ.Framework.Core;
using System.ComponentModel;
using log4net;
using System.Windows.Media.Imaging;
using System.Windows.Media;
namespace VIZ.TVP.CBA.Module
{
......@@ -232,11 +234,26 @@ namespace VIZ.TVP.CBA.Module
if (selectedIndex < 0||selectPlayer==null)
return;
if(selectedIndex==0)
string baesePath = AppDomain.CurrentDomain.BaseDirectory;
if (selectedIndex==0)
{
if(HNameNums.ContainsKey(selectPlayer))
{
PlayNum = HNameNums[selectPlayer];
if (TeamItems[selectedIndex] == "北京控股666")
{
PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
}
else
{
PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, TeamItems[selectedIndex])));
}
}
}
else
......@@ -244,6 +261,16 @@ namespace VIZ.TVP.CBA.Module
if(VNameNums.ContainsKey(selectPlayer))
{
PlayNum = VNameNums[selectPlayer];
if (TeamItems[selectedIndex] == "北京控股666")
{
PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
}
else
{
PlayerLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, TeamItems[selectedIndex])));
}
}
}
......@@ -303,6 +330,18 @@ namespace VIZ.TVP.CBA.Module
}
}
private ImageSource playerLogo;
public ImageSource PlayerLogo
{
get { return playerLogo; }
set
{
playerLogo = value;this.RaisePropertyChanged(nameof(PlayerLogo));
}
}
public VCommand BtnCmd { get; set; }
public VCommand TeamSelectCommand { get; set; }
......@@ -348,11 +387,14 @@ namespace VIZ.TVP.CBA.Module
if (index < 0) return;
MvpHomePlayerCompareNumDictionary.Clear();
MvpVisitPlayerCompareNumDictionary.Clear();
PlayerItems = new System.Collections.ObjectModel.ObservableCollection<string>();
if (index == 0)
{
foreach (var teamLive in onAirDataModel.livePlayerStatH)
{
PlayerItems.Add(teamLive.CNAlias);
......
......@@ -121,14 +121,14 @@
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="110"/>
<ColumnDefinition Width="530"/>
<ColumnDefinition Width="110"/>
</Grid.ColumnDefinitions>
<!--{Binding HomeTeam}-->
<Button Content="刷新" Command="{Binding BtnCommand}" HorizontalContentAlignment="Center"
Grid.Column="0" Width="95" Height="30" FontSize="14"/>
Grid.Column="1" Width="95" Height="30" FontSize="14"/>
<!--<Button Content="上数据" Command="{Binding BtnCmdUpData}" HorizontalContentAlignment="Center"
Grid.Column="1" Width="95" Height="30" FontSize="14"/>-->
</Grid>
......
......@@ -599,16 +599,33 @@ namespace VIZ.TVP.CBA.Module
HomeTeam = onAirDataModel.liveTeamInfo.HomeTeamCNAlias;
if(!string.IsNullOrEmpty(HomeTeam))
string baesePath = AppDomain.CurrentDomain.BaseDirectory;
if (!string.IsNullOrEmpty(HomeTeam))
{
HomeTeamLogo = new BitmapImage(new Uri(""));
if (HomeTeam == "北京控股666")
{
HomeTeamLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
}
else
{
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")
{
AwayTeamLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, "北京控股")));
}
else
{
AwayTeamLogo = new BitmapImage(new Uri(string.Format("{0}Image\\Teamlogo\\{1}.png", baesePath, AwayTeam)));
}
}
TeamSeasonData = await JsonModel.PostTeamSeasonData_Path(Matchtypeid);
......
......@@ -350,66 +350,66 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Resource Include="Image\Teamlogo\上海久事.png">
<None Include="Image\Teamlogo\上海久事.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\Teamlogo\九台农商银行.png">
</None>
<None Include="Image\Teamlogo\九台农商银行.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\Teamlogo\北京控股.png">
</None>
<None Include="Image\Teamlogo\北京控股.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\Teamlogo\北京首钢.png">
</None>
<None Include="Image\Teamlogo\北京首钢.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\Teamlogo\南京同曦宙光.png">
</None>
<None Include="Image\Teamlogo\南京同曦宙光.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\Teamlogo\四川金荣实业.png">
</None>
<None Include="Image\Teamlogo\四川金荣实业.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\Teamlogo\天津先行者.png">
</None>
<None Include="Image\Teamlogo\天津先行者.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\Teamlogo\宁波町渥.png">
</None>
<None Include="Image\Teamlogo\宁波町渥.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\Teamlogo\山东高速.png">
</None>
<None Include="Image\Teamlogo\山东高速.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\Teamlogo\山西汾酒股份.png">
</None>
<None Include="Image\Teamlogo\山西汾酒股份.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\Teamlogo\广东东莞大益.png">
</None>
<None Include="Image\Teamlogo\广东东莞大益.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\Teamlogo\广州龙狮.png">
</None>
<None Include="Image\Teamlogo\广州龙狮.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\Teamlogo\新疆伊力王酒.png">
</None>
<None Include="Image\Teamlogo\新疆伊力王酒.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\Teamlogo\浙江东阳光.png">
</None>
<None Include="Image\Teamlogo\浙江东阳光.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\Teamlogo\浙江稠州金租.png">
</None>
<None Include="Image\Teamlogo\浙江稠州金租.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\Teamlogo\深圳马可波罗.png">
</None>
<None Include="Image\Teamlogo\深圳马可波罗.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\Teamlogo\福建浔兴股份.png">
</None>
<None Include="Image\Teamlogo\福建浔兴股份.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\Teamlogo\苏州肯帝亚.png">
</None>
<None Include="Image\Teamlogo\苏州肯帝亚.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\Teamlogo\辽宁本钢.png">
</None>
<None Include="Image\Teamlogo\辽宁本钢.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Image\Teamlogo\青岛国信水产.png">
</None>
<None Include="Image\Teamlogo\青岛国信水产.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="Image\PlayerLogo\" />
......
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