Commit 58ee56d2 by wangonghui

今日赛程提交显示选择

parent c0a72ad0
......@@ -12,6 +12,9 @@
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:storage="clr-namespace:VIZ.TVP.CBA.Module"
xmlns:common="clr-namespace:VIZ.Package.Common;assembly=VIZ.Package.Common"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
x:Name="uc"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="800" >
......@@ -151,7 +154,7 @@
</dxg:GridControl.Columns>
<!--#endregion-->
<dxg:GridControl.View>
<dxg:TableView AutoWidth="True"
<!--<dxg:TableView AutoWidth="True"
ShowGroupPanel="False"
BorderThickness="0"
ShowFilterPanelMode="Never"
......@@ -159,7 +162,37 @@
AllowSorting="False"
AllowEditing="False"
IsColumnMenuEnabled="False">
</dxg:TableView>-->
<dxg:TableView IsColumnMenuEnabled="True"
IsColumnChooserVisible="{Binding Path=IsColumnChooserVisible,Mode=TwoWay}"
AllowEditing="False" ShowIndicator="False" AutoWidth="True"
NavigationStyle="Cell" ShowVerticalLines="False" ShowHorizontalLines="False"
ShowGroupPanel="False" EditorShowMode="MouseDown"
AllowDragDrop="True"
AlternateRowBackground="#05ffffff"
ShowBandsPanel="False"
ShowTotalSummary="False"
ShowFixedTotalSummary="False"
ShowDragDropHint="False"
AllowSorting="False"
AllowColumnFiltering="False"
ShowTargetInfoInDragDropHint="false">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="ShowGridMenu" Command="{Binding ElementName=uc, Path=DataContext.ShowGridMenuCommand}" PassEventArgsToCommand="True"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
<dxg:TableView.ColumnMenuCustomizations>
<dxb:BarButtonItem Name="ShowColumnChooser" Content="显示列选择"
Command="{Binding ElementName=uc,Path=DataContext.ColumnChoiceCommand}"
Tag="{x:Static Member=common:GridControlHelper.KEEP_MENU_TAG}"/>
</dxg:TableView.ColumnMenuCustomizations>
</dxg:TableView>
</dxg:GridControl.View>
</dxg:GridControl>
</DockPanel>
......@@ -206,14 +239,41 @@
<dxg:GridColumn FieldName="StreakNumber" Header="连胜数" Width="180" />
<dxg:GridColumn FieldName="StreakName" Header="" Width="180" />
<dxg:GridControl.View>
<dxg:TableView AutoWidth="True" ShowGroupPanel="False"
<!--<dxg:TableView AutoWidth="True" ShowGroupPanel="False"
BorderThickness="0"
ShowFilterPanelMode="Never"
AllowColumnFiltering="False"
AllowSorting="False"
AllowEditing="False"
IsColumnMenuEnabled="False">
</dxg:TableView>-->
<dxg:TableView IsColumnMenuEnabled="True"
IsColumnChooserVisible="{Binding Path=IsColumnChooserVisible1,Mode=TwoWay}"
AllowEditing="False" ShowIndicator="False" AutoWidth="True"
NavigationStyle="Cell" ShowVerticalLines="False" ShowHorizontalLines="False"
ShowGroupPanel="False" EditorShowMode="MouseDown"
AllowDragDrop="True"
AlternateRowBackground="#05ffffff"
ShowBandsPanel="False"
ShowTotalSummary="False"
ShowFixedTotalSummary="False"
ShowDragDropHint="False"
AllowSorting="False"
AllowColumnFiltering="False"
ShowTargetInfoInDragDropHint="false">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="ShowGridMenu" Command="{Binding ElementName=uc, Path=DataContext.ShowGridMenuCommand1}" PassEventArgsToCommand="True"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
<dxg:TableView.ColumnMenuCustomizations>
<dxb:BarButtonItem Name="ShowColumnChooser1" Content="显示列选择"
Command="{Binding ElementName=uc,Path=DataContext.ColumnChoiceCommand1}"
Tag="{x:Static Member=common:GridControlHelper.KEEP_MENU_TAG}"/>
</dxg:TableView.ColumnMenuCustomizations>
</dxg:TableView>
</dxg:GridControl.View>
</dxg:GridControl>
</DockPanel>
......@@ -269,13 +329,40 @@
<!--#endregion-->
<dxg:GridControl.View>
<dxg:TableView AutoWidth="True" ShowGroupPanel="False"
<!--<dxg:TableView AutoWidth="True" ShowGroupPanel="False"
BorderThickness="0"
ShowFilterPanelMode="Never"
AllowColumnFiltering="False"
AllowSorting="True"
AllowEditing="False"
IsColumnMenuEnabled="False" >
</dxg:TableView>-->
<dxg:TableView IsColumnMenuEnabled="True"
IsColumnChooserVisible="{Binding Path=IsColumnChooserVisible2,Mode=TwoWay}"
AllowEditing="False" ShowIndicator="False" AutoWidth="True"
NavigationStyle="Cell" ShowVerticalLines="False" ShowHorizontalLines="False"
ShowGroupPanel="False" EditorShowMode="MouseDown"
AllowDragDrop="True"
AlternateRowBackground="#05ffffff"
ShowBandsPanel="False"
ShowTotalSummary="False"
ShowFixedTotalSummary="False"
ShowDragDropHint="False"
AllowSorting="False"
AllowColumnFiltering="False"
ShowTargetInfoInDragDropHint="false">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="ShowGridMenu" Command="{Binding ElementName=uc, Path=DataContext.ShowGridMenuCommand2}" PassEventArgsToCommand="True"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
<dxg:TableView.ColumnMenuCustomizations>
<dxb:BarButtonItem Name="ShowColumnChooser2" Content="显示列选择"
Command="{Binding ElementName=uc,Path=DataContext.ColumnChoiceCommand2}"
Tag="{x:Static Member=common:GridControlHelper.KEEP_MENU_TAG}"/>
</dxg:TableView.ColumnMenuCustomizations>
</dxg:TableView>
</dxg:GridControl.View>
</dxg:GridControl>
......
using DevExpress.Emf;
using DevExpress.Xpf.Editors.Helpers;
using DevExpress.Xpf.Grid;
using DevExpress.Xpo.DB;
using log4net;
using System;
......@@ -9,6 +10,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
using VIZ.Package.Common;
using VIZ.Package.Domain;
using VIZ.Package.Module;
using VIZ.Package.Service;
......@@ -56,6 +58,19 @@ namespace VIZ.TVP.CBA.Module
PlayerSeasonACommand = new VCommand(this.SetAPlayerSeasonStats);
RefreshPlayerSeasonCommand = new VCommand(this.RefreshSeasonPlayer);
//今日赛程数据
ColumnChoiceCommand = new VCommand(ColumnChoice);
ShowGridMenuCommand = new VCommand<GridMenuEventArgs>(ShowGridMenu);
//球队积分数据显示列表
ColumnChoiceCommand1 = new VCommand(ColumnChoic1e1);
ShowGridMenuCommand1 = new VCommand<GridMenuEventArgs>(ShowGridMenu1);
//球队数据显示列表
ColumnChoiceCommand2 = new VCommand(ColumnChoice2);
ShowGridMenuCommand2 = new VCommand<GridMenuEventArgs>(ShowGridMenu2);
}
......@@ -678,6 +693,59 @@ namespace VIZ.TVP.CBA.Module
set { matchData = value; this.RaisePropertyChanged(nameof(MatchData)); }
}
#region IsColumnChooserVisible -- 是否显示列选择器
private bool isColumnChooserVisible;
/// <summary>
/// 是否显示列选择器
/// </summary>
public bool IsColumnChooserVisible
{
get { return isColumnChooserVisible; }
set { isColumnChooserVisible = value; this.RaisePropertyChanged(nameof(IsColumnChooserVisible)); }
}
#endregion
#region ColumnChoiceCommand -- 列选择命令
/// <summary>
/// 列选择命令
/// </summary>
public VCommand ColumnChoiceCommand { get; set; }
/// <summary>
/// 列选择
/// </summary>
private void ColumnChoice()
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, "足球查看轮次赛程显示列表:" + "IsColumnChooserVisible=true");
this.IsColumnChooserVisible = true;
}
#endregion
#region ShowGridMenuCommand -- 显示列命令
/// <summary>
/// 显示列命令
/// </summary>
public VCommand<GridMenuEventArgs> ShowGridMenuCommand { get; set; }
/// <summary>
/// 显示列
/// </summary>
/// <param name="e">事件参数</param>
private void ShowGridMenu(GridMenuEventArgs e)
{
GridControlHelper.RemoveAllDefaultMenuItem(e);
}
#endregion
#endregion
#region 球队积分排行榜
......@@ -697,6 +765,59 @@ namespace VIZ.TVP.CBA.Module
}
#region IsColumnChooserVisible -- 是否显示列选择器
private bool isColumnChooserVisible1;
/// <summary>
/// 是否显示列选择器
/// </summary>
public bool IsColumnChooserVisible1
{
get { return isColumnChooserVisible1; }
set { isColumnChooserVisible1 = value; this.RaisePropertyChanged(nameof(IsColumnChooserVisible1)); }
}
#endregion
#region ColumnChoiceCommand1 -- 列选择命令
/// <summary>
/// 列选择命令
/// </summary>
public VCommand ColumnChoiceCommand1 { get; set; }
/// <summary>
/// 列选择
/// </summary>
private void ColumnChoic1e1()
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, "足球查看球队积分显示列表:" + "IsColumnChooserVisible=true");
this.IsColumnChooserVisible1 = true;
}
#endregion
#region ShowGridMenuCommand -- 显示列命令
/// <summary>
/// 显示列命令
/// </summary>
public VCommand<GridMenuEventArgs> ShowGridMenuCommand1 { get; set; }
/// <summary>
/// 显示列
/// </summary>
/// <param name="e">事件参数</param>
private void ShowGridMenu1(GridMenuEventArgs e)
{
GridControlHelper.RemoveAllDefaultMenuItem(e);
}
#endregion
private void BtmCommand()
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, "CBA查看球队积分:" + PluginConstant.Operate_Load);
......@@ -771,6 +892,59 @@ namespace VIZ.TVP.CBA.Module
}
#region IsColumnChooserVisible2 -- 是否显示列选择器
private bool isColumnChooserVisible2;
/// <summary>
/// 是否显示列选择器
/// </summary>
public bool IsColumnChooserVisible2
{
get { return isColumnChooserVisible2; }
set { isColumnChooserVisible2 = value; this.RaisePropertyChanged(nameof(IsColumnChooserVisible2)); }
}
#endregion
#region ColumnChoiceCommand2 -- 列选择命令
/// <summary>
/// 列选择命令
/// </summary>
public VCommand ColumnChoiceCommand2 { get; set; }
/// <summary>
/// 列选择
/// </summary>
private void ColumnChoice2()
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, "足球查看射手榜显示列表:" + "IsColumnChooserVisible=true");
this.IsColumnChooserVisible2 = true;
}
#endregion
#region ShowGridMenuCommand2 -- 显示列命令
/// <summary>
/// 显示列命令
/// </summary>
public VCommand<GridMenuEventArgs> ShowGridMenuCommand2 { get; set; }
/// <summary>
/// 显示列
/// </summary>
/// <param name="e">事件参数</param>
private void ShowGridMenu2(GridMenuEventArgs e)
{
GridControlHelper.RemoveAllDefaultMenuItem(e);
}
#endregion
private void SetTeamStatsData()
{
if (onAirDataModel == null) return;
......
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