Commit 39b2fc61 by wangonghui

CBA界面调整以及修改绑定模板来源同一个数据

parent 83e5094a
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
ShowFilterPanelMode="Never" ShowFilterPanelMode="Never"
AllowColumnFiltering="False" AllowColumnFiltering="False"
AllowSorting="False" AllowSorting="False"
> IsColumnMenuEnabled="False" >
</dxg:TableView> </dxg:TableView>
</dxg:GridControl.View> </dxg:GridControl.View>
......
...@@ -66,40 +66,40 @@ ...@@ -66,40 +66,40 @@
<DockPanel Grid.Row="1" Grid.ColumnSpan="2"> <DockPanel Grid.Row="1" Grid.ColumnSpan="2">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" <!--<ScrollViewer HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
Name="PART_Options" Name="PART_Options"
DockPanel.Dock="Right" DockPanel.Dock="Right"
dx:ScrollBarExtensions.ScrollBarMode="TouchOverlap" dx:ScrollBarExtensions.ScrollBarMode="TouchOverlap"
Focusable="False"> Focusable="False">
</ScrollViewer> </ScrollViewer>-->
<dxg:GridControl x:Name="grid" ShowBorder="False" ItemsSource="{Binding Path= MatchData,Mode=TwoWay}" SelectedItem="{Binding Path=SelectMatchData,Mode=TwoWay}" > <dxg:GridControl x:Name="grid" ShowBorder="False" ItemsSource="{Binding Path= MatchData,Mode=TwoWay}" SelectedItem="{Binding Path=SelectMatchData,Mode=TwoWay}" >
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="dates" Header="日期" Width="112" /> <dxg:GridColumn FieldName="dates" Header="日期" Width="112" />
<dxg:GridColumn FieldName="time" Header="时间" Width="112" /> <dxg:GridColumn FieldName="time" Header="时间" Width="112" />
<dxg:GridColumn FieldName="HomeTeamName" Header="主队" Width="180" /> <dxg:GridColumn FieldName="HomeTeamName" Header="主队" Width="180" />
<dxg:GridColumn FieldName="HomeTeamScore" Header="主队得分" Width="180" DisplayTemplate="{StaticResource HoursActiveDisplayTemplate}" > <dxg:GridColumn FieldName="HomeTeamScore" Header="主队得分" Width="180" DisplayTemplate="{StaticResource HoursActiveDisplayTemplate}" >
<!--<dxg:GridColumn.EditSettings> <!--<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings MaskType="Numeric" Mask="d" HorizontalContentAlignment="Center" /> <dxe:TextEditSettings MaskType="Numeric" Mask="d" HorizontalContentAlignment="Center" />
</dxg:GridColumn.EditSettings>--> </dxg:GridColumn.EditSettings>-->
</dxg:GridColumn> </dxg:GridColumn>
<dxg:GridColumn FieldName="VisitingTeamName" Header="客队" Width="180" /> <dxg:GridColumn FieldName="VisitingTeamName" Header="客队" Width="180" />
<dxg:GridColumn FieldName="VisitingTeamScore" Header="客队得分" Width="180" DisplayTemplate="{StaticResource HoursActiveDisplayTemplate}" /> <dxg:GridColumn FieldName="VisitingTeamScore" Header="客队得分" Width="180" DisplayTemplate="{StaticResource HoursActiveDisplayTemplate}" />
<dxg:GridColumn FieldName="Status" Header="比赛状态" Width="180" /> <dxg:GridColumn FieldName="Status" Header="比赛状态" Width="180" />
</dxg:GridControl.Columns>
<!--#endregion--> <!--#endregion-->
<dxg:GridControl.View> <dxg:GridControl.View>
<dxg:TableView AutoWidth="True" <dxg:TableView AutoWidth="True"
ShowGroupPanel="False" ShowGroupPanel="False"
BorderThickness="0" BorderThickness="0"
ShowFilterPanelMode="Never" ShowFilterPanelMode="Never"
AllowColumnFiltering="False" AllowColumnFiltering="False"
AllowSorting="False" AllowSorting="False"
AllowEditing="False" AllowEditing="False"
> AllowResizing="True"
IsColumnMenuEnabled="False">
</dxg:TableView> </dxg:TableView>
</dxg:GridControl.View> </dxg:GridControl.View>
</dxg:GridControl> </dxg:GridControl>
</DockPanel> </DockPanel>
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
AllowColumnFiltering="False" AllowColumnFiltering="False"
AllowSorting="False" AllowSorting="False"
AllowEditing="False" AllowEditing="False"
> IsColumnMenuEnabled="False">
</dxg:TableView> </dxg:TableView>
</dxg:GridControl.View> </dxg:GridControl.View>
</dxg:GridControl> </dxg:GridControl>
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
AllowColumnFiltering="False" AllowColumnFiltering="False"
AllowSorting="False" AllowSorting="False"
AllowEditing="False" AllowEditing="False"
> IsColumnMenuEnabled="False" >
</dxg:TableView> </dxg:TableView>
</dxg:GridControl.View> </dxg:GridControl.View>
</dxg:GridControl> </dxg:GridControl>
...@@ -288,7 +288,7 @@ ...@@ -288,7 +288,7 @@
AllowColumnFiltering="False" AllowColumnFiltering="False"
AllowSorting="False" AllowSorting="False"
AllowEditing="False" AllowEditing="False"
> IsColumnMenuEnabled="False" >
</dxg:TableView> </dxg:TableView>
</dxg:GridControl.View> </dxg:GridControl.View>
</dxg:GridControl> </dxg:GridControl>
......
...@@ -218,13 +218,23 @@ namespace VIZ.TVP.CBA.Module ...@@ -218,13 +218,23 @@ namespace VIZ.TVP.CBA.Module
#region 球员统计信息 #region 球员统计信息
TeamStatsViewModel teamStatsViewModel = TeamStatsViewModel.CreateInstance; //if (TeamStatsViewModel.CreateInstance)
Log.Error("DateHeaderViewModel_CreateTeamStatsViewModel"); if(TeamStatsViewModel.TeamStatsViewModelInstance.Count>0)
teamStatsViewModel.ScheduleID = selectMatchData.ScheduleID; {
teamStatsViewModel.Matchtypeid = selectMatchData.ScheduleTypeID; Log.Error(string.Format("TeamStatsViewModel.CreateInstance Count:{0}", TeamStatsViewModel.TeamStatsViewModelInstance.Count));
Log.Error(string.Format("DateHeader_ScheduleId:{0}",selectMatchData.ScheduleID)); foreach(var tempTeamStatsViewModel in TeamStatsViewModel.TeamStatsViewModelInstance)
Log.Error(string.Format("DateHeader_ScheduleTypeId:{0}", selectMatchData.ScheduleTypeID)); {
teamStatsViewModel.SetTeamData(); // TeamStatsViewModel teamStatsViewModel = tempTeamStatsViewModel;
Log.Error("DateHeaderViewModel_CreateTeamStatsViewModel");
tempTeamStatsViewModel.ScheduleID = selectMatchData.ScheduleID;
tempTeamStatsViewModel.Matchtypeid = selectMatchData.ScheduleTypeID;
Log.Error(string.Format("DateHeader_ScheduleId:{0}", selectMatchData.ScheduleID));
Log.Error(string.Format("DateHeader_ScheduleTypeId:{0}", selectMatchData.ScheduleTypeID));
tempTeamStatsViewModel.SetTeamData();
}
}
#endregion #endregion
...@@ -232,21 +242,36 @@ namespace VIZ.TVP.CBA.Module ...@@ -232,21 +242,36 @@ namespace VIZ.TVP.CBA.Module
#region 单个球员信息 #region 单个球员信息
SinglePlayerViewModel singlePlayerViewModel = SinglePlayerViewModel.CreateInstance; if(SinglePlayerViewModel.SinglePlayerViewModelInstance.Count>0)
{
foreach(var tempSinglePlayerViewModel in SinglePlayerViewModel.SinglePlayerViewModelInstance)
{
tempSinglePlayerViewModel.ScheduleID = selectMatchData.ScheduleID;
tempSinglePlayerViewModel.Matchtypeid = selectMatchData.ScheduleTypeID;
tempSinglePlayerViewModel.SetSingleData();
}
}
singlePlayerViewModel.ScheduleID = selectMatchData.ScheduleID;
singlePlayerViewModel.Matchtypeid = selectMatchData.ScheduleTypeID;
singlePlayerViewModel.SetSingleData();
#endregion #endregion
#region 球员对比信息 #region 球员对比信息
PlayerCompareViewModel playerCompareViewModel = PlayerCompareViewModel.CreateInstance; if(PlayerCompareViewModel.PlayerCompareViewModelInstance.Count>0)
{
foreach(var playerCompareViewModel in PlayerCompareViewModel.PlayerCompareViewModelInstance)
{
//PlayerCompareViewModel playerCompareViewModel = PlayerCompareViewModel.CreateInstance;
playerCompareViewModel.ScheduleID = selectMatchData.ScheduleID;
playerCompareViewModel.Matchtypeid = selectMatchData.ScheduleTypeID;
playerCompareViewModel.SetCompareData();
}
}
playerCompareViewModel.ScheduleID = selectMatchData.ScheduleID;
playerCompareViewModel.Matchtypeid = selectMatchData.ScheduleTypeID;
playerCompareViewModel.SetCompareData();
#endregion #endregion
} }
......
...@@ -261,7 +261,7 @@ ...@@ -261,7 +261,7 @@
ShowFilterPanelMode="Never" ShowFilterPanelMode="Never"
AllowColumnFiltering="False" AllowColumnFiltering="False"
AllowSorting="False" AllowSorting="False"
> IsColumnMenuEnabled="False" >
</dxg:TableView> </dxg:TableView>
</dxg:GridControl.View> </dxg:GridControl.View>
</dxg:GridControl> </dxg:GridControl>
......
...@@ -22,13 +22,14 @@ namespace VIZ.TVP.CBA.Module ...@@ -22,13 +22,14 @@ namespace VIZ.TVP.CBA.Module
/// </summary> /// </summary>
public partial class PlayerComPareView : UserControl, IPluginView public partial class PlayerComPareView : UserControl, IPluginView
{ {
public PlayerCompareViewModel vm = PlayerCompareViewModel.CreateInstance; public PlayerCompareViewModel vm = new PlayerCompareViewModel();
public PlayerComPareView() public PlayerComPareView()
{ {
InitializeComponent(); InitializeComponent();
PlayerCompareViewModel.PlayerCompareViewModelInstance.Add(vm);
WPFHelper.BindingViewModel(this, vm); WPFHelper.BindingViewModel(this, vm);
} }
......
...@@ -18,19 +18,19 @@ namespace VIZ.TVP.CBA.Module ...@@ -18,19 +18,19 @@ namespace VIZ.TVP.CBA.Module
{ {
private static ILog Log=LogManager.GetLogger(typeof(PlayerCompareViewModel)); private static ILog Log=LogManager.GetLogger(typeof(PlayerCompareViewModel));
private static PlayerCompareViewModel _createInstance = null; //private static PlayerCompareViewModel _createInstance = null;
public static PlayerCompareViewModel CreateInstance public static List<PlayerCompareViewModel> PlayerCompareViewModelInstance = new List<PlayerCompareViewModel>();
{ //{
get // get
{ // {
if (null == _createInstance) // if (null == _createInstance)
{ // {
_createInstance = new PlayerCompareViewModel(); // _createInstance = new PlayerCompareViewModel();
} // }
return _createInstance; // return _createInstance;
} // }
} //}
public PlayerCompareViewModel() public PlayerCompareViewModel()
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
ShowFilterPanelMode="Never" ShowFilterPanelMode="Never"
AllowColumnFiltering="False" AllowColumnFiltering="False"
AllowSorting="False" AllowSorting="False"
> IsColumnMenuEnabled="False" >
</dxg:TableView> </dxg:TableView>
</dxg:GridControl.View> </dxg:GridControl.View>
</dxg:GridControl> </dxg:GridControl>
......
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
ShowFilterPanelMode="Never" ShowFilterPanelMode="Never"
AllowColumnFiltering="False" AllowColumnFiltering="False"
AllowSorting="False" AllowSorting="False"
> IsColumnMenuEnabled="False" >
</dxg:TableView> </dxg:TableView>
</dxg:GridControl.View> </dxg:GridControl.View>
</dxg:GridControl> </dxg:GridControl>
......
...@@ -22,7 +22,7 @@ namespace VIZ.TVP.CBA.Module ...@@ -22,7 +22,7 @@ namespace VIZ.TVP.CBA.Module
/// </summary> /// </summary>
public partial class SinglePlayerView : UserControl, IPluginView public partial class SinglePlayerView : UserControl, IPluginView
{ {
SinglePlayerViewModel vm = SinglePlayerViewModel.CreateInstance; SinglePlayerViewModel vm = new SinglePlayerViewModel();
...@@ -30,7 +30,7 @@ namespace VIZ.TVP.CBA.Module ...@@ -30,7 +30,7 @@ namespace VIZ.TVP.CBA.Module
{ {
InitializeComponent(); InitializeComponent();
//vm = new SinglePlayerViewModel(); dqyData //vm = new SinglePlayerViewModel(); dqyData
SinglePlayerViewModel.SinglePlayerViewModelInstance.Add(vm) ;
WPFHelper.BindingViewModel(this, vm); WPFHelper.BindingViewModel(this, vm);
} }
......
...@@ -16,19 +16,19 @@ namespace VIZ.TVP.CBA.Module ...@@ -16,19 +16,19 @@ namespace VIZ.TVP.CBA.Module
private static ILog Log= LogManager.GetLogger(typeof(SinglePlayerViewModel)); private static ILog Log= LogManager.GetLogger(typeof(SinglePlayerViewModel));
private static SinglePlayerViewModel _createInstance = null; //private static SinglePlayerViewModel _createInstance = null;
public static SinglePlayerViewModel CreateInstance public static List<SinglePlayerViewModel> SinglePlayerViewModelInstance =new List<SinglePlayerViewModel>();
{ //{
get // get
{ // {
if (null == _createInstance) // if (null == _createInstance)
{ // {
_createInstance = new SinglePlayerViewModel(); // _createInstance = new SinglePlayerViewModel();
} // }
return _createInstance; // return _createInstance;
} // }
} //}
public SinglePlayerViewModel() public SinglePlayerViewModel()
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
ShowFilterPanelMode="Never" ShowFilterPanelMode="Never"
AllowColumnFiltering="False" AllowColumnFiltering="False"
AllowSorting="False" AllowSorting="False"
> IsColumnMenuEnabled="False" >
</dxg:TableView> </dxg:TableView>
</dxg:GridControl.View> </dxg:GridControl.View>
</dxg:GridControl> </dxg:GridControl>
......
...@@ -199,7 +199,8 @@ ...@@ -199,7 +199,8 @@
BorderThickness="0" BorderThickness="0"
ShowFilterPanelMode="Never" ShowFilterPanelMode="Never"
AllowColumnFiltering="False" AllowColumnFiltering="False"
AllowSorting="False"> AllowSorting="False"
IsColumnMenuEnabled="False" >
</dxg:TableView> </dxg:TableView>
</dxg:GridControl.View> </dxg:GridControl.View>
</dxg:GridControl> </dxg:GridControl>
......
...@@ -22,13 +22,14 @@ namespace VIZ.TVP.CBA.Module ...@@ -22,13 +22,14 @@ namespace VIZ.TVP.CBA.Module
/// </summary> /// </summary>
public partial class TeamStatsView : UserControl, IPluginView public partial class TeamStatsView : UserControl, IPluginView
{ {
public TeamStatsViewModel vm = TeamStatsViewModel.CreateInstance; public TeamStatsViewModel vm = new TeamStatsViewModel();
public TeamStatsView() public TeamStatsView()
{ {
InitializeComponent(); InitializeComponent();
TeamStatsViewModel.TeamStatsViewModelInstance.Add(vm);
WPFHelper.BindingViewModel(this, vm); WPFHelper.BindingViewModel(this, vm);
} }
......
...@@ -15,22 +15,22 @@ namespace VIZ.TVP.CBA.Module ...@@ -15,22 +15,22 @@ namespace VIZ.TVP.CBA.Module
private static ILog Log=LogManager.GetLogger(typeof(TeamStatsViewModel)); private static ILog Log=LogManager.GetLogger(typeof(TeamStatsViewModel));
private static TeamStatsViewModel _createInstance = null; // private static TeamStatsViewModel _createInstance = null;
public static TeamStatsViewModel CreateInstance public static List<TeamStatsViewModel> TeamStatsViewModelInstance = new List<TeamStatsViewModel>();
{ //{
get // get
{ // {
if (null == _createInstance) // //if (null == _createInstance)
{ // //{
Log.Error("CreateInstance"); // Log.Error("CreateInstance");
_createInstance = new TeamStatsViewModel(); // _createInstance = new TeamStatsViewModel();
} // //}
Log.Error("CreatedInstance"); // Log.Error("CreatedInstance");
return _createInstance; // return _createInstance;
} // }
} //}
public TeamStatsViewModel() public TeamStatsViewModel()
{ {
......
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