Commit d63873d8 by wangonghui

足球功能开发

parent c7866116
...@@ -9,10 +9,13 @@ ...@@ -9,10 +9,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core" xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:storage="clr-namespace:VIZ.TVP.CBA.Module" xmlns:storage="clr-namespace:VIZ.TVP.CBA.Module"
xmlns:common="clr-namespace:VIZ.Package.Common;assembly=VIZ.Package.Common"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="400" d:DesignHeight="400"
d:DesignWidth="750" d:DesignWidth="750"
x:Name="uc"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"> VerticalAlignment="Stretch">
<UserControl.Resources> <UserControl.Resources>
...@@ -200,12 +203,38 @@ ...@@ -200,12 +203,38 @@
<!--#endregion--> <!--#endregion-->
<dxg:GridControl.View> <dxg:GridControl.View>
<dxg:TableView AutoWidth="True" ShowGroupPanel="False" <!--<dxg:TableView AutoWidth="True" ShowGroupPanel="False"
IsColumnChooserVisible="{Binding Path=IsColumnChooserVisible,Mode=TwoWay}"
BorderThickness="0" BorderThickness="0"
ShowFilterPanelMode="Never" ShowFilterPanelMode="Never"
AllowColumnFiltering="False" AllowColumnFiltering="False"
AllowSorting="False" AllowSorting="False"
IsColumnMenuEnabled="False" > IsColumnMenuEnabled="False" >-->
<dxg:TableView IsColumnMenuEnabled="True"
IsColumnChooserVisible="{Binding Path=IsColumnChooserVisible,Mode=TwoWay}"
AllowEditing="True" 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:TableView>
</dxg:GridControl.View> </dxg:GridControl.View>
......
...@@ -7,9 +7,10 @@ using System.Threading.Tasks; ...@@ -7,9 +7,10 @@ using System.Threading.Tasks;
using VIZ.Framework.Core; using VIZ.Framework.Core;
using log4net; using log4net;
using VIZ.Package.Domain; using VIZ.Package.Domain;
using VIZ.TVP.CBA.Module.Message.ViewModel;
using VIZ.Package.Service; using VIZ.Package.Service;
using VIZ.Package.Storage; using VIZ.Package.Storage;
using DevExpress.Xpf.Grid;
using VIZ.Package.Common;
namespace VIZ.TVP.CBA.Module namespace VIZ.TVP.CBA.Module
{ {
...@@ -33,6 +34,8 @@ namespace VIZ.TVP.CBA.Module ...@@ -33,6 +34,8 @@ namespace VIZ.TVP.CBA.Module
BtnMatchDayUp = new VCommand(BtnMatchDayUpData); BtnMatchDayUp = new VCommand(BtnMatchDayUpData);
BtnRoundCmd = new VCommand(BtmRoundCommand); BtnRoundCmd = new VCommand(BtmRoundCommand);
PromptCommand = new VCommand(PromptCmd); PromptCommand = new VCommand(PromptCmd);
ColumnChoiceCommand = new VCommand(ColumnChoice);
ShowGridMenuCommand = new VCommand<GridMenuEventArgs>(ShowGridMenu);
matchDate = DateTime.Today.ToShortDateString(); matchDate = DateTime.Today.ToShortDateString();
GetSchedule(); GetSchedule();
...@@ -330,6 +333,57 @@ namespace VIZ.TVP.CBA.Module ...@@ -330,6 +333,57 @@ namespace VIZ.TVP.CBA.Module
set { roundBtnEnable = value; this.RaisePropertyChanged(nameof(RoundBtnEnable)); } set { roundBtnEnable = value; this.RaisePropertyChanged(nameof(RoundBtnEnable)); }
} }
#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.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
#region 打开更新数据时间日志 #region 打开更新数据时间日志
/// <summary> /// <summary>
/// 打开数据更新日志 /// 打开数据更新日志
......
...@@ -341,7 +341,7 @@ namespace VIZ.TVP.CBA.Module ...@@ -341,7 +341,7 @@ namespace VIZ.TVP.CBA.Module
ScheduleID = selectMatchData.ScheduleID; ScheduleID = selectMatchData.ScheduleID;
Matchtypeid = selectMatchData.ScheduleTypeID; Matchtypeid = selectMatchData.ScheduleTypeID;
#region 统计信息 #region 统计信息
//if (TeamStatsViewModel.TeamStatsViewModelInstance.Count>0) //if (TeamStatsViewModel.TeamStatsViewModelInstance.Count>0)
...@@ -381,6 +381,48 @@ namespace VIZ.TVP.CBA.Module ...@@ -381,6 +381,48 @@ namespace VIZ.TVP.CBA.Module
#endregion #endregion
#region 球队任务统计信息
//if (TeamStatsViewModel.TeamStatsViewModelInstance.Count>0)
//{
// // Log.Error(string.Format("TeamStatsViewModel.CreateInstance Count:{0}", TeamStatsViewModel.TeamStatsViewModelInstance.Count));
// foreach(var tempTeamStatsViewModel in TeamStatsViewModel.TeamStatsViewModelInstance)
// {
// // if(ApplicationDomainEx.CurrentPage == page;
// // 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();
// }
//}
if (TeamStatsTaskViewModel.TeamStatsTaskViewModelInstance.Count > 0)
{
foreach (var tempTeamStatsViewModel in TeamStatsTaskViewModel.TeamStatsTaskViewModelInstance)
{
tempTeamStatsViewModel.ScheduleID = selectMatchData.ScheduleID;
tempTeamStatsViewModel.Matchtypeid = selectMatchData.ScheduleTypeID;
if (tempTeamStatsViewModel.page != null && ApplicationDomainEx.CurrentPage == tempTeamStatsViewModel.page)
{
tempTeamStatsViewModel.SetTeamData();
}
}
}
#endregion
#region 单个球员信息 #region 单个球员信息
//if(SinglePlayerViewModel.SinglePlayerViewModelInstance.Count>0) //if(SinglePlayerViewModel.SinglePlayerViewModelInstance.Count>0)
...@@ -396,7 +438,7 @@ namespace VIZ.TVP.CBA.Module ...@@ -396,7 +438,7 @@ namespace VIZ.TVP.CBA.Module
//} //}
if(NewSinglePlayerViewModel.SinglePlayerViewModelInstance.Count>0) if (NewSinglePlayerViewModel.SinglePlayerViewModelInstance.Count>0)
{ {
foreach (var tempSinglePlayerViewModel in NewSinglePlayerViewModel.SinglePlayerViewModelInstance) foreach (var tempSinglePlayerViewModel in NewSinglePlayerViewModel.SinglePlayerViewModelInstance)
{ {
...@@ -466,6 +508,26 @@ namespace VIZ.TVP.CBA.Module ...@@ -466,6 +508,26 @@ namespace VIZ.TVP.CBA.Module
} }
#region 双球员————任务
if (PlayerComPareViewModelTask.PlayerCompareViewModelTaskInstance.Count > 0)
{
foreach (var playerCompareViewModel in PlayerComPareViewModelTask.PlayerCompareViewModelTaskInstance)
{
playerCompareViewModel.ScheduleID = selectMatchData.ScheduleID;
playerCompareViewModel.Matchtypeid = selectMatchData.ScheduleTypeID;
//PlayerCompareViewModel playerCompareViewModel = PlayerCompareViewModel.CreateInstance;
if (playerCompareViewModel.page != null && ApplicationDomainEx.CurrentPage == playerCompareViewModel.page)
{
playerCompareViewModel.SetCompareData();
}
}
}
#endregion 双球员---任务
//设置球队赛季数据 //设置球队赛季数据
GetTeamSeasonData(); GetTeamSeasonData();
#endregion #endregion
...@@ -474,7 +536,7 @@ namespace VIZ.TVP.CBA.Module ...@@ -474,7 +536,7 @@ namespace VIZ.TVP.CBA.Module
private void ClearData() private void ClearData()
{ {
#region 统计信息 #region 统计信息
if (NewTeamStatsViewModel.TeamStatsViewModelInstance.Count > 0) if (NewTeamStatsViewModel.TeamStatsViewModelInstance.Count > 0)
{ {
...@@ -492,6 +554,26 @@ namespace VIZ.TVP.CBA.Module ...@@ -492,6 +554,26 @@ namespace VIZ.TVP.CBA.Module
} }
//球队任务统计
if (TeamStatsTaskViewModel.TeamStatsTaskViewModelInstance.Count > 0)
{
foreach (var tempTeamStatsViewModel in TeamStatsTaskViewModel.TeamStatsTaskViewModelInstance)
{
tempTeamStatsViewModel.ScheduleID = "";
tempTeamStatsViewModel.Matchtypeid = "";
if (tempTeamStatsViewModel.page != null && ApplicationDomainEx.CurrentPage == tempTeamStatsViewModel.page)
{
tempTeamStatsViewModel.SetTeamData();
}
}
}
#endregion #endregion
#region 单个球员信息 #region 单个球员信息
...@@ -556,6 +638,28 @@ namespace VIZ.TVP.CBA.Module ...@@ -556,6 +638,28 @@ namespace VIZ.TVP.CBA.Module
} }
#endregion #endregion
#region 球员对比任务
if (PlayerComPareViewModelTask.PlayerCompareViewModelTaskInstance.Count > 0)
{
foreach (var playerCompareViewModel in PlayerComPareViewModelTask.PlayerCompareViewModelTaskInstance)
{
playerCompareViewModel.ScheduleID = "";
playerCompareViewModel.Matchtypeid ="";
//PlayerCompareViewModel playerCompareViewModel = PlayerCompareViewModel.CreateInstance;
if (playerCompareViewModel.page != null && ApplicationDomainEx.CurrentPage == playerCompareViewModel.page)
{
playerCompareViewModel.SetCompareData();
}
}
}
#endregion 球员对比任务
} }
......
...@@ -12,7 +12,6 @@ using VIZ.Framework.Core; ...@@ -12,7 +12,6 @@ using VIZ.Framework.Core;
using VIZ.Package.Domain; using VIZ.Package.Domain;
using System.Windows.Media; using System.Windows.Media;
using System.IO; using System.IO;
using VIZ.TVP.CBA.Module.Message.ViewModel;
using VIZ.Package.Service; using VIZ.Package.Service;
using VIZ.Package.Storage; using VIZ.Package.Storage;
......
...@@ -12,7 +12,6 @@ using System.Windows.Media; ...@@ -12,7 +12,6 @@ using System.Windows.Media;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using System.Windows.Shapes; using System.Windows.Shapes;
using VIZ.Framework.Core; using VIZ.Framework.Core;
using VIZ.TVP.CBA.Module.Message.ViewModel;
namespace VIZ.TVP.CBA.Module namespace VIZ.TVP.CBA.Module
{ {
......
...@@ -8,7 +8,7 @@ using VIZ.Framework.Core; ...@@ -8,7 +8,7 @@ using VIZ.Framework.Core;
using VIZ.Package.Domain; using VIZ.Package.Domain;
using VIZ.Package.Module; using VIZ.Package.Module;
namespace VIZ.TVP.CBA.Module.Message.ViewModel namespace VIZ.TVP.CBA.Module
{ {
public class MessageLRDateViewModel : ViewModelBase public class MessageLRDateViewModel : ViewModelBase
{ {
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Package.Domain;
namespace VIZ.TVP.CBA.Module
{
public class PlayerCompareViewModelPluginTask : IPluginLifeCycle
{
/// <summary>
/// 插件ID
/// </summary>
/// <remarks>
/// 插件ID不能包含点号
/// </remarks>
public const string PLUGIN_ID = "PlayerComPareViewTask";
/// <summary>
/// 插件显示名称
/// </summary>
public const string PLUGIN_NAME = "球员数据对比(任务测试)";
public void Dispose()
{
}
public void Initialize()
{
}
public PluginInfo Register()
{
PluginInfo info = new PluginInfo();
info.Group = PluginConstant.GroupName;
info.ID = PLUGIN_ID;
info.Name = PLUGIN_NAME;
info.PluginType = PluginType.Page;
info.ViewType = typeof(PlayerComPareViewTask);
//info.SettingViewType = typeof(DayMatchUI);
return info;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VIZ.Framework.Core;
using VIZ.Package.Domain;
using VIZ.Package.Module;
using VIZ.Package.Service;
using VIZ.Package.Storage;
namespace VIZ.TVP.CBA.Module
{
/// <summary>
/// Interaction logic for PlayerComPareViewTask.xaml
/// </summary>
public partial class PlayerComPareViewTask : UserControl,IPluginView
{
public PlayerComPareViewModelTask vm = new PlayerComPareViewModelTask();
/// <summary>
/// 操作日志服务
/// </summary>
private RecordLogService recordLogService = new RecordLogService();
public PlayerComPareViewTask()
{
InitializeComponent();
PlayerComPareViewModelTask.PlayerCompareViewModelTaskInstance.Add(vm);
WPFHelper.BindingViewModel(this, vm);
task_Start.IsEnabled = true;
task_Stop.IsEnabled = false;
task_continue.IsEnabled = false;
this.Loaded += NewPlayerComPareView_Loaded;
this.IsVisibleChanged += NewPlayerComPareView_IsVisibleChanged;
}
private void NewPlayerComPareView_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
{
if (!string.IsNullOrEmpty(vm.ScheduleID) && !string.IsNullOrEmpty(vm.Matchtypeid))
{
if (e.NewValue != null && Convert.ToBoolean(e.NewValue))
{
vm.SetCompareData();
}
}
}
private void NewPlayerComPareView_Loaded(object sender, RoutedEventArgs e)
{
var service = ApplicationDomainEx.ServiceManager.GetService<IPluginService>(ViewServiceKeys.PLUGIN_SERVICE);
if (service == null)
return;
vm.page = service.GetPageModelFromView(this);
}
public void Dispose()
{
}
public void PreviewContinue(ConnModel conn)
{
}
public void PreviewIn(ConnModel conn)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_PLAY);
if (conn.IsConnected)
{
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "dqyData", vm.CombinePlayerCommand()));
}
}
public void PreviewOut(ConnModel conn)
{
//if(conn.IsConnected)
// {
// conn.EndpointManager.Send(VizEngineCommands.STAGE_CONTINUE);
// }
}
public void TakeContinue(ConnModel conns)
{
}
public void TakeOut(ConnModel conns)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_TAKE_OUT);
if (conns.IsConnected)
{
conns.EndpointManager.Send(VizEngineCommands.STAGE_CONTINUE);
}
}
public void TakeUpdate(ConnModel conns)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_TAKE_UPDATE);
if (conns.IsConnected)
{
conns.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "dqyData", vm.CombinePlayerCommand()));
}
}
public void TakIn(ConnModel conns)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_TAKE_TAKE);
if (conns.IsConnected)
{
conns.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "dqyData", vm.CombinePlayerCommand()));
}
}
/// <summary>
/// 注册任务
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void PlayerComPareView_Init()
{
if (task != null)
return;
task = new PackageTaskModel(this);
task.PreviewUpdateAction = OnPreviewUpdate;
task.TakeUpdateAction = OnTakeUpdate;
task.IsPreviewEnabled = true;
task.IsTakeEnabled = true;
task.IsRunning = true;
task.Name = "球员对比";
service = ApplicationDomainEx.ServiceManager.GetService<IPackageTaskService>(ViewServiceKeys.PACKAGE_TASK_SERVICE);
if (service == null)
return;
service.Register(task);
}
/// <summary>
/// 任务模型
/// </summary>
public PackageTaskModel task;
IPackageTaskService service;
private void OnPreviewUpdate(ConnModel conn)
{
if (conn.IsConnected)
{
vm.BtnCmd();
//task.CanExecute = vm.flag;
//SCRIPT_INVOKE
if (vm.onAirDataModel != null)
{
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "dqyData", vm.CombinePlayerCommand()));
}
}
}
private void OnTakeUpdate(ConnModel conn)
{
if (conn.IsConnected)
{
vm.BtnCmd();
if (vm.onAirDataModel != null)
{
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "dqyData", vm.CombinePlayerCommand()));
}
//SCRIPT_INVOKE
}
}
private void task_Start_Click(object sender, RoutedEventArgs e)
{
PlayerComPareView_Init();
task_Start.IsEnabled = false;
task_Stop.IsEnabled = true;
task_continue.IsEnabled = true;
}
private void task_continue_Click(object sender, RoutedEventArgs e)
{
if (task.IsRunning)
{
task.IsRunning = false;
task_continue.Content = "任务继续";
}
else
{
task.IsRunning = true;
task_continue.Content = "任务暂停";
}
task_Start.IsEnabled = false;
task_Stop.IsEnabled = true;
}
private void task_Stop_Click(object sender, RoutedEventArgs e)
{
service.Cancel(task);
task = null;
task_Start.IsEnabled = true;
task_continue.Content = "任务暂停";
task_continue.IsEnabled = false;
task_Stop.IsEnabled = false;
}
public void PageOpend(ConnModel conn, PageModel page)
{
if (conn.IsConnected)
{
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "dqyData", vm.CombinePlayerCommand()));
}
}
public void PreviewUpdate(ConnModel conn)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_UPDATE);
if (conn.IsConnected)
{
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "dqyData", vm.CombinePlayerCommand()));
}
}
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -15,7 +15,6 @@ using DevExpress.Data; ...@@ -15,7 +15,6 @@ using DevExpress.Data;
using System.IO; using System.IO;
using VIZ.Package.Domain; using VIZ.Package.Domain;
using VIZ.Package.Module; using VIZ.Package.Module;
using VIZ.TVP.CBA.Module.Message.ViewModel;
using VIZ.Package.Service; using VIZ.Package.Service;
using VIZ.Package.Storage; using VIZ.Package.Storage;
......
...@@ -12,7 +12,6 @@ using VIZ.Framework.Core; ...@@ -12,7 +12,6 @@ using VIZ.Framework.Core;
using System.Windows.Media; using System.Windows.Media;
using System.IO; using System.IO;
using VIZ.Package.Domain; using VIZ.Package.Domain;
using VIZ.TVP.CBA.Module.Message.ViewModel;
using VIZ.Package.Service; using VIZ.Package.Service;
using VIZ.Package.Storage; using VIZ.Package.Storage;
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core" xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:storage="clr-namespace:VIZ.TVP.CBA.Module" 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" mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="650"> d:DesignHeight="800" d:DesignWidth="650">
<UserControl.Resources> <UserControl.Resources>
...@@ -139,12 +142,38 @@ ...@@ -139,12 +142,38 @@
</dxg:GridColumn>--> </dxg:GridColumn>-->
<!--#endregion--> <!--#endregion-->
<dxg:GridControl.View> <dxg:GridControl.View>
<dxg:TableView AutoWidth="True" ShowGroupPanel="False" <!--<dxg:TableView AutoWidth="True" ShowGroupPanel="False"
BorderThickness="0" BorderThickness="0"
ShowFilterPanelMode="Never" ShowFilterPanelMode="Never"
AllowColumnFiltering="False" AllowColumnFiltering="False"
AllowSorting="False" AllowSorting="False"
IsColumnMenuEnabled="False" > IsColumnMenuEnabled="False" >
</dxg:TableView>-->
<dxg:TableView IsColumnMenuEnabled="True"
IsColumnChooserVisible="{Binding Path=IsColumnChooserVisible,Mode=TwoWay}"
AllowEditing="True" 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:TableView>
</dxg:GridControl.View> </dxg:GridControl.View>
</dxg:GridControl> </dxg:GridControl>
......
...@@ -6,10 +6,12 @@ using System.Text; ...@@ -6,10 +6,12 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using VIZ.Framework.Core; using VIZ.Framework.Core;
using log4net; using log4net;
using VIZ.TVP.CBA.Module.Message.ViewModel;
using VIZ.Package.Service; using VIZ.Package.Service;
using VIZ.Package.Domain; using VIZ.Package.Domain;
using VIZ.Package.Storage; using VIZ.Package.Storage;
using DevExpress.Xpf.Grid;
using VIZ.Package.Common;
namespace VIZ.TVP.CBA.Module namespace VIZ.TVP.CBA.Module
{ {
...@@ -139,6 +141,9 @@ namespace VIZ.TVP.CBA.Module ...@@ -139,6 +141,9 @@ namespace VIZ.TVP.CBA.Module
BtnCmdTeamStandingUp = new VCommand(BtnCmdTeamStandingUpData); BtnCmdTeamStandingUp = new VCommand(BtnCmdTeamStandingUpData);
BtnCmdNextPage = new VCommand(BtnCmdNextPageData); BtnCmdNextPage = new VCommand(BtnCmdNextPageData);
PromptCommand = new VCommand(PromptCmd); PromptCommand = new VCommand(PromptCmd);
ColumnChoiceCommand = new VCommand(ColumnChoice);
ShowGridMenuCommand = new VCommand<GridMenuEventArgs>(ShowGridMenu);
} }
...@@ -268,6 +273,59 @@ namespace VIZ.TVP.CBA.Module ...@@ -268,6 +273,59 @@ namespace VIZ.TVP.CBA.Module
set { title = value;this.RaisePropertyChanged(nameof(Title)); } set { title = value;this.RaisePropertyChanged(nameof(Title)); }
} }
#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.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
#region 打开更新数据时间日志 #region 打开更新数据时间日志
/// <summary> /// <summary>
/// 打开数据更新日志 /// 打开数据更新日志
......
...@@ -14,7 +14,7 @@ using VIZ.Framework.Core; ...@@ -14,7 +14,7 @@ using VIZ.Framework.Core;
using VIZ.Package.Domain; using VIZ.Package.Domain;
using VIZ.Package.Service; using VIZ.Package.Service;
using VIZ.Package.Storage; using VIZ.Package.Storage;
using VIZ.TVP.CBA.Module.Message.ViewModel;
namespace VIZ.TVP.CBA.Module namespace VIZ.TVP.CBA.Module
{ {
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Package.Domain;
namespace VIZ.TVP.CBA.Module
{
public class TeamStatsTaskPlugin : IPluginLifeCycle
{
/// <summary>
/// 插件ID
/// </summary>
/// <remarks>
/// 插件ID不能包含点号
/// </remarks>
public const string PLUGIN_ID = "TeamStatsTaskView";
/// <summary>
/// 插件显示名称
/// </summary>
public const string PLUGIN_NAME = "球队数据对比(任务测试)";
public void Dispose()
{
}
public void Initialize()
{
}
public PluginInfo Register()
{
PluginInfo info = new PluginInfo();
info.Group = PluginConstant.GroupName;
info.ID = PLUGIN_ID;
info.Name = PLUGIN_NAME;
info.PluginType = PluginType.Page;
info.ViewType = typeof(TeamStatsTaskView);
//info.SettingViewType = typeof(DayMatchUI);
return info;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VIZ.Framework.Core;
using VIZ.Package.Domain;
using VIZ.Package.Module;
using VIZ.Package.Service;
using VIZ.Package.Storage;
namespace VIZ.TVP.CBA.Module
{
/// <summary>
/// Interaction logic for TeamStatsTaskView.xaml
/// </summary>
public partial class TeamStatsTaskView : UserControl, IPluginView
{
public TeamStatsTaskViewModel vm = new TeamStatsTaskViewModel();
/// <summary>
/// 操作日志服务
/// </summary>
private RecordLogService recordLogService = new RecordLogService();
public TeamStatsTaskView()
{
InitializeComponent();
TeamStatsTaskViewModel.TeamStatsTaskViewModelInstance.Add(vm);
WPFHelper.BindingViewModel(this, vm);
task_Start.IsEnabled = true;
task_Stop.IsEnabled = false;
task_continue.IsEnabled = false;
this.Loaded += NewTeamStatsView_Loaded;
this.IsVisibleChanged += NewTeamStatsView_IsVisibleChanged;
}
private void NewTeamStatsView_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
{
if (!string.IsNullOrEmpty(vm.ScheduleID) && !string.IsNullOrEmpty(vm.Matchtypeid))
{
if (e.NewValue != null && Convert.ToBoolean(e.NewValue))
{
vm.SetTeamData();
}
}
}
private void NewTeamStatsView_Loaded(object sender, RoutedEventArgs e)
{
var service = ApplicationDomainEx.ServiceManager.GetService<IPluginService>(ViewServiceKeys.PLUGIN_SERVICE);
if (service == null)
return;
vm.page = service.GetPageModelFromView(this);
}
public void Dispose()
{
}
public void PreviewContinue(ConnModel conn)
{
}
public void PreviewIn(ConnModel conn)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_PLAY);
if (conn.IsConnected)
{
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "dqyData", vm.CombineTeamComData()));
}
}
public void PreviewOut(ConnModel conn)
{
//if(conn.IsConnected)
//{
// conn.EndpointManager.Send(VizEngineCommands.STAGE_CONTINUE);
//}
}
public void TakeContinue(ConnModel conns)
{
}
public void TakeOut(ConnModel conns)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_TAKE_OUT);
if (conns.IsConnected)
{
conns.EndpointManager.Send(VizEngineCommands.STAGE_CONTINUE);
}
}
public void TakeUpdate(ConnModel conns)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_TAKE_UPDATE);
if (conns.IsConnected)
{
conns.EndpointManager.Send(string.Format(VizEngineCommands.SCRIPT_INVOKE, "dqyData", vm.CombineTeamComData()));
}
}
public void TakIn(ConnModel conns)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_TAKE_TAKE);
if (conns.IsConnected)
{
conns.EndpointManager.Send(string.Format(VizEngineCommands.SCRIPT_INVOKE, "dqyData", vm.CombineTeamComData()));
}
}
private void OnPreviewUpdate(ConnModel conn)
{
if (conn.IsConnected)
{
vm.BtnCmd();
if (vm.onAirDataModel != null)
{
conn.EndpointManager.Send(string.Format(VizEngineCommands.SCRIPT_INVOKE, "dqyData", vm.CombineTeamComData()));
}
//task.CanExecute = vm.flag;
//SCRIPT_INVOKE
}
}
private void OnTakeUpdate(ConnModel conn)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_TAKE_UPDATE);
if (conn.IsConnected)
{
vm.BtnCmd();
if (vm.onAirDataModel != null)
{
conn.EndpointManager.Send(string.Format(VizEngineCommands.SCRIPT_INVOKE, "dqyData", vm.CombineTeamComData()));
}
//SCRIPT_INVOKE
}
}
private void task_Start_Click(object sender, RoutedEventArgs e)
{
TeamStatsView_Init();
task_Start.IsEnabled = false;
task_Stop.IsEnabled = true;
task_continue.IsEnabled = true;
}
private void task_continue_Click(object sender, RoutedEventArgs e)
{
if (task.IsRunning)
{
task.IsRunning = false;
task_continue.Content = "任务继续";
}
else
{
task.IsRunning = true;
task_continue.Content = "任务暂停";
}
task_Start.IsEnabled = false;
task_Stop.IsEnabled = true;
}
private void task_Stop_Click(object sender, RoutedEventArgs e)
{
service.Cancel(task);
task = null;
task_Start.IsEnabled = true;
task_continue.Content = "任务暂停";
task_continue.IsEnabled = false;
task_Stop.IsEnabled = false;
}
/// <summary>
/// 任务模型
/// </summary>
public PackageTaskModel task;
/// <summary>
/// 服务
/// </summary>
IPackageTaskService service;
/// <summary>
/// 注册任务
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void TeamStatsView_Init()
{
if (task != null)
return;
task = new PackageTaskModel(this);
task.PreviewUpdateAction = OnPreviewUpdate;
task.TakeUpdateAction = OnTakeUpdate;
task.IsPreviewEnabled = true;
task.IsTakeEnabled = true;
task.IsRunning = true;
task.Name = "球队对比数据";
service = ApplicationDomainEx.ServiceManager.GetService<IPackageTaskService>(ViewServiceKeys.PACKAGE_TASK_SERVICE);
if (service == null)
return;
service.Register(task);
//var service2 = ApplicationDomainEx.ServiceManager.GetService<IPluginService>(ViewServiceKeys.PLUGIN_SERVICE);
//if (service2 == null)
// return;
//PageModel page= service2.GetPageModelFromView(this);
//ApplicationDomainEx.CurrentPage == page;
}
public void PageOpend(ConnModel conn, PageModel page)
{
if (conn.IsConnected)
{
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "dqyData", vm.CombineTeamComData()));
}
}
public void PreviewUpdate(ConnModel conn)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_UPDATE);
if (conn.IsConnected)
{
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "dqyData", vm.CombineTeamComData()));
}
}
}
}
...@@ -151,6 +151,11 @@ ...@@ -151,6 +151,11 @@
<Compile Include="OnAirData\LiveTeamStatH.cs" /> <Compile Include="OnAirData\LiveTeamStatH.cs" />
<Compile Include="OnAirData\LiveTeamStatV.cs" /> <Compile Include="OnAirData\LiveTeamStatV.cs" />
<Compile Include="OnAirData\OnAirDataModel.cs" /> <Compile Include="OnAirData\OnAirDataModel.cs" />
<Compile Include="PlayerComPareTask\PlayerCompareViewModelPluginTask.cs" />
<Compile Include="PlayerComPareTask\ViewModel\PlayerComPareViewModelTask.cs" />
<Compile Include="PlayerComPareTask\View\PlayerComPareViewTask.xaml.cs">
<DependentUpon>PlayerComPareViewTask.xaml</DependentUpon>
</Compile>
<Compile Include="PlayerCompare\Model\PlayerComModel.cs" /> <Compile Include="PlayerCompare\Model\PlayerComModel.cs" />
<Compile Include="PlayerCompare\PlayerComparePlugin.cs" /> <Compile Include="PlayerCompare\PlayerComparePlugin.cs" />
<Compile Include="PlayerCompare\ViewModel\NewPlayerComPareViewModel.cs" /> <Compile Include="PlayerCompare\ViewModel\NewPlayerComPareViewModel.cs" />
...@@ -197,6 +202,11 @@ ...@@ -197,6 +202,11 @@
<Compile Include="TeamStandings\View\TeamStandingView.xaml.cs"> <Compile Include="TeamStandings\View\TeamStandingView.xaml.cs">
<DependentUpon>TeamStandingView.xaml</DependentUpon> <DependentUpon>TeamStandingView.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="TeamStatsTask\TeamStatsTaskPlugin.cs" />
<Compile Include="TeamStatsTask\ViewModel\TeamStatsTaskViewModel.cs" />
<Compile Include="TeamStatsTask\View\TeamStatsTaskView.xaml.cs">
<DependentUpon>TeamStatsTaskView.xaml</DependentUpon>
</Compile>
<Compile Include="TeamStats\Model\MatchStatsNumbers.cs" /> <Compile Include="TeamStats\Model\MatchStatsNumbers.cs" />
<Compile Include="TeamStats\TeamStatsPlugin.cs" /> <Compile Include="TeamStats\TeamStatsPlugin.cs" />
<Compile Include="TeamStats\ViewModel\NewTeamStatsViewModel.cs" /> <Compile Include="TeamStats\ViewModel\NewTeamStatsViewModel.cs" />
...@@ -280,6 +290,10 @@ ...@@ -280,6 +290,10 @@
<Project>{06b80c09-343d-4bb2-aeb1-61cfbfbf5cad}</Project> <Project>{06b80c09-343d-4bb2-aeb1-61cfbfbf5cad}</Project>
<Name>VIZ.Framework.Storage</Name> <Name>VIZ.Framework.Storage</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\VIZ.Package\VIZ.Package.Common\VIZ.Package.Common.csproj">
<Project>{e4912bce-bc90-4457-9ee3-06435496d979}</Project>
<Name>VIZ.Package.Common</Name>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Package\VIZ.Package.Connection\VIZ.Package.Connection.csproj"> <ProjectReference Include="..\..\VIZ.Package\VIZ.Package.Connection\VIZ.Package.Connection.csproj">
<Project>{421527f6-37b8-4615-9317-ffd5e272181b}</Project> <Project>{421527f6-37b8-4615-9317-ffd5e272181b}</Project>
<Name>VIZ.Package.Connection</Name> <Name>VIZ.Package.Connection</Name>
...@@ -330,6 +344,10 @@ ...@@ -330,6 +344,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="PlayerComPareTask\View\PlayerComPareViewTask.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="PlayerCompare\View\NewPlayerComPareView.xaml"> <Page Include="PlayerCompare\View\NewPlayerComPareView.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
...@@ -366,6 +384,10 @@ ...@@ -366,6 +384,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="TeamStatsTask\View\TeamStatsTaskView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="TeamStats\View\NewTeamStatsView.xaml"> <Page Include="TeamStats\View\NewTeamStatsView.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
......
...@@ -171,7 +171,7 @@ namespace VIZ.TVP.FTB.Module ...@@ -171,7 +171,7 @@ namespace VIZ.TVP.FTB.Module
/// <param name="footballType"></param> /// <param name="footballType"></param>
/// <param name="seasonId"></param> /// <param name="seasonId"></param>
/// <returns></returns> /// <returns></returns>
public async static Task<ShootPlayerRanks> Post_ShootPlayerRankData(string footballType, string seasonId) public async static Task<ShootPlayerRanks> Post_ShootPlayerRankData(string footballType, string seasonId,string startOffset,string endOffset)
{ {
try try
{ {
...@@ -184,6 +184,8 @@ namespace VIZ.TVP.FTB.Module ...@@ -184,6 +184,8 @@ namespace VIZ.TVP.FTB.Module
dict.Add("competitionId", footballType); dict.Add("competitionId", footballType);
dict.Add("seasonId", seasonId);//"110000005454" dict.Add("seasonId", seasonId);//"110000005454"
dict.Add("startOffset", startOffset);
dict.Add("endOffset", endOffset);
string newKey = Utils.GetKey(appID, appKey); string newKey = Utils.GetKey(appID, appKey);
......
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core" xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:storage="clr-namespace:VIZ.TVP.FTB.Module" xmlns:storage="clr-namespace:VIZ.TVP.FTB.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" mc:Ignorable="d"
d:DesignHeight="400" d:DesignHeight="400"
d:DesignWidth="750" d:DesignWidth="750"
...@@ -134,12 +138,40 @@ ...@@ -134,12 +138,40 @@
<dxg:GridColumn FieldName="status" Header="比赛状态" Width="180" /> <dxg:GridColumn FieldName="status" Header="比赛状态" Width="180" />
<dxg:GridControl.View> <dxg:GridControl.View>
<dxg:TableView AutoWidth="True" ShowGroupPanel="False" <!--<dxg:TableView AutoWidth="True" ShowGroupPanel="False"
BorderThickness="0" BorderThickness="0"
ShowFilterPanelMode="Never" ShowFilterPanelMode="Never"
AllowColumnFiltering="False" AllowColumnFiltering="False"
AllowSorting="False" AllowSorting="False"
IsColumnMenuEnabled="False" > IsColumnMenuEnabled="False" >
</dxg:TableView>-->
<dxg:TableView IsColumnMenuEnabled="True"
IsColumnChooserVisible="{Binding Path=IsColumnChooserVisible,Mode=TwoWay}"
AllowEditing="True" 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:TableView>
</dxg:GridControl.View> </dxg:GridControl.View>
......
using log4net; using DevExpress.Xpf.Grid;
using log4net;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
...@@ -7,6 +8,7 @@ using System.Text; ...@@ -7,6 +8,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Markup; using System.Windows.Markup;
using VIZ.Framework.Core; using VIZ.Framework.Core;
using VIZ.Package.Common;
namespace VIZ.TVP.FTB.Module namespace VIZ.TVP.FTB.Module
{ {
...@@ -208,6 +210,8 @@ namespace VIZ.TVP.FTB.Module ...@@ -208,6 +210,8 @@ namespace VIZ.TVP.FTB.Module
BtnRoundCmd = new VCommand(BtmRoundCommand); BtnRoundCmd = new VCommand(BtmRoundCommand);
PromptCommand = new VCommand(PromptCmd); PromptCommand = new VCommand(PromptCmd);
ColumnChoiceCommand = new VCommand(ColumnChoice);
ShowGridMenuCommand = new VCommand<GridMenuEventArgs>(ShowGridMenu);
RoundMatchs = new ObservableCollection<int>(); RoundMatchs = new ObservableCollection<int>();
for (int i = 1; i < 39; i++) for (int i = 1; i < 39; i++)
...@@ -223,6 +227,58 @@ namespace VIZ.TVP.FTB.Module ...@@ -223,6 +227,58 @@ namespace VIZ.TVP.FTB.Module
} }
#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.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
/// <summary> /// <summary>
/// 组装往包装发送得数据 /// 组装往包装发送得数据
/// </summary> /// </summary>
......
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core" xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:storage="clr-namespace:VIZ.TVP.FTB.Module" xmlns:storage="clr-namespace:VIZ.TVP.FTB.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" mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="650"> d:DesignHeight="800" d:DesignWidth="650">
...@@ -97,12 +101,39 @@ ...@@ -97,12 +101,39 @@
<dxg:GridColumn FieldName="score" Header="积分" Width="180" /> <dxg:GridColumn FieldName="score" Header="积分" Width="180" />
<dxg:GridControl.View> <dxg:GridControl.View>
<dxg:TableView AutoWidth="True" ShowGroupPanel="False" <!--<dxg:TableView AutoWidth="True" ShowGroupPanel="False"
BorderThickness="0" BorderThickness="0"
ShowFilterPanelMode="Never" ShowFilterPanelMode="Never"
AllowColumnFiltering="False" AllowColumnFiltering="False"
AllowSorting="False" AllowSorting="False"
IsColumnMenuEnabled="False" > IsColumnMenuEnabled="False" >
</dxg:TableView>-->
<dxg:TableView IsColumnMenuEnabled="True"
IsColumnChooserVisible="{Binding Path=IsColumnChooserVisible,Mode=TwoWay}"
AllowEditing="True" 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:TableView>
</dxg:GridControl.View> </dxg:GridControl.View>
</dxg:GridControl> </dxg:GridControl>
......
using log4net; using DevExpress.Xpf.Grid;
using log4net;
using System; using System;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using VIZ.Framework.Core; using VIZ.Framework.Core;
using VIZ.Package.Common;
namespace VIZ.TVP.FTB.Module namespace VIZ.TVP.FTB.Module
{ {
...@@ -192,10 +194,65 @@ namespace VIZ.TVP.FTB.Module ...@@ -192,10 +194,65 @@ namespace VIZ.TVP.FTB.Module
PromptCommand = new VCommand(PromptCmd); PromptCommand = new VCommand(PromptCmd);
ColumnChoiceCommand = new VCommand(ColumnChoice);
ShowGridMenuCommand = new VCommand<GridMenuEventArgs>(ShowGridMenu);
FoolballType = DateHeaderViewModel.FoolballType; FoolballType = DateHeaderViewModel.FoolballType;
SeasonId = DateHeaderViewModel.SeasonId; SeasonId = DateHeaderViewModel.SeasonId;
} }
#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.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
#region 打开更新数据时间日志 #region 打开更新数据时间日志
/// <summary> /// <summary>
/// 打开数据更新日志 /// 打开数据更新日志
......
...@@ -42,10 +42,6 @@ ...@@ -42,10 +42,6 @@
<RowDefinition Height="40"></RowDefinition> <RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="40"></RowDefinition> <RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="40"></RowDefinition> <RowDefinition Height="40"></RowDefinition>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!-- 地址 --> <!-- 地址 -->
......
...@@ -10,8 +10,12 @@ ...@@ -10,8 +10,12 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core" xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:storage="clr-namespace:VIZ.TVP.FTB.Module" xmlns:storage="clr-namespace:VIZ.TVP.FTB.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" mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="650"> d:DesignHeight="800" d:DesignWidth="800">
<UserControl.Resources> <UserControl.Resources>
<ResourceDictionary> <ResourceDictionary>
...@@ -37,13 +41,13 @@ ...@@ -37,13 +41,13 @@
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<WrapPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Width="650" > <WrapPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Width="800" >
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="70"/> <ColumnDefinition Width="70"/>
<ColumnDefinition Width="285"/> <ColumnDefinition Width="285"/>
<ColumnDefinition Width="0"/> <ColumnDefinition Width="0"/>
<ColumnDefinition Width="150"/> <ColumnDefinition Width="300"/>
<ColumnDefinition Width="140"/> <ColumnDefinition Width="140"/>
<!--<ColumnDefinition Width="120"/>--> <!--<ColumnDefinition Width="120"/>-->
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
...@@ -53,6 +57,33 @@ ...@@ -53,6 +57,33 @@
<dxe:TextEdit Grid.Column="1" Width="280" FontSize="16" HorizontalContentAlignment="Left" <dxe:TextEdit Grid.Column="1" Width="280" FontSize="16" HorizontalContentAlignment="Left"
HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding Title,Mode=TwoWay }"></dxe:TextEdit> HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding Title,Mode=TwoWay }"></dxe:TextEdit>
<WrapPanel Grid.Row="0" Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Center" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="75"/>
<ColumnDefinition Width="75"/>
<ColumnDefinition Width="75"/>
<ColumnDefinition Width="75"/>
</Grid.ColumnDefinitions>
<TextBlock Text="起始:" FontSize="16" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
<dxe:TextEdit Grid.Column="1" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" HorizontalContentAlignment="Center"
Text="{Binding StartOffset,Mode=TwoWay}" Width="60"/>
<TextBlock Text="结束:" FontSize="16" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
<dxe:TextEdit Grid.Column="4" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" HorizontalContentAlignment="Center"
Text="{Binding EndOffset,Mode=TwoWay}" Width="60"/>
</Grid>
</WrapPanel>
<WrapPanel Grid.Row="0" Grid.Column="4" HorizontalAlignment="Center" VerticalAlignment="Center"> <WrapPanel Grid.Row="0" Grid.Column="4" HorizontalAlignment="Center" VerticalAlignment="Center">
<Grid> <Grid>
...@@ -94,13 +125,42 @@ ...@@ -94,13 +125,42 @@
<dxg:GridColumn FieldName="PenaltyGoal" Header="点球" Width="100" /> <dxg:GridColumn FieldName="PenaltyGoal" Header="点球" Width="100" />
<dxg:GridControl.View> <dxg:GridControl.View>
<dxg:TableView AutoWidth="True" ShowGroupPanel="False" <!--<dxg:TableView AutoWidth="True" ShowGroupPanel="False"
BorderThickness="0" BorderThickness="0"
ShowFilterPanelMode="Never" ShowFilterPanelMode="Never"
AllowColumnFiltering="False" AllowColumnFiltering="False"
AllowSorting="False" AllowSorting="False"
IsColumnMenuEnabled="False" > IsColumnMenuEnabled="False" >
</dxg:TableView>-->
<dxg:TableView IsColumnMenuEnabled="True"
IsColumnChooserVisible="{Binding Path=IsColumnChooserVisible,Mode=TwoWay}"
AllowEditing="True" 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:TableView>
</dxg:GridControl.View> </dxg:GridControl.View>
</dxg:GridControl> </dxg:GridControl>
</DockPanel> </DockPanel>
......
using DevExpress.Mvvm.POCO; using DevExpress.Mvvm.POCO;
using DevExpress.Xpf.Grid;
using log4net; using log4net;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -7,6 +8,7 @@ using System.Linq; ...@@ -7,6 +8,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using VIZ.Framework.Core; using VIZ.Framework.Core;
using VIZ.Package.Common;
namespace VIZ.TVP.FTB.Module namespace VIZ.TVP.FTB.Module
{ {
...@@ -82,8 +84,7 @@ namespace VIZ.TVP.FTB.Module ...@@ -82,8 +84,7 @@ namespace VIZ.TVP.FTB.Module
SeasonId = AppSetup_InitLiteDB.HttpUrlConfigEntity.SLPSeasonId; SeasonId = AppSetup_InitLiteDB.HttpUrlConfigEntity.SLPSeasonId;
} }
shootPlayerRanks = await JsonModel.Post_ShootPlayerRankData(FoolballType, SeasonId,StartOffset,EndOffset);
shootPlayerRanks = await JsonModel.Post_ShootPlayerRankData(FoolballType, SeasonId);
if (shootPlayerRanks == null) return; if (shootPlayerRanks == null) return;
ShootPlayerModel = new ObservableCollection<ShootPlayerRank>(); ShootPlayerModel = new ObservableCollection<ShootPlayerRank>();
...@@ -157,10 +158,44 @@ namespace VIZ.TVP.FTB.Module ...@@ -157,10 +158,44 @@ namespace VIZ.TVP.FTB.Module
public string Title public string Title
{ {
get { return title; } get { return title; }
set { title = value; this.RaisePropertyChanged(nameof(Title)); } set
{
title = value;
this.RaisePropertyChanged(nameof(Title));
}
} }
/// <summary>
/// 开始条数
/// </summary>
private string startOffset = "0";
public string StartOffset
{
get { return startOffset; }
set
{
startOffset = value;
this.RaisePropertyChanged(nameof(StartOffset));
}
}
/// <summary>
/// 结束条数
/// </summary>
private string endOffset = "5";
public string EndOffset
{
get { return endOffset; }
set
{
endOffset = value;
this.RaisePropertyChanged(nameof(EndOffset));
}
}
/// <summary> /// <summary>
/// 足球赛事类型 /// 足球赛事类型
...@@ -182,10 +217,65 @@ namespace VIZ.TVP.FTB.Module ...@@ -182,10 +217,65 @@ namespace VIZ.TVP.FTB.Module
PromptCommand = new VCommand(PromptCmd); PromptCommand = new VCommand(PromptCmd);
ColumnChoiceCommand = new VCommand(ColumnChoice);
ShowGridMenuCommand = new VCommand<GridMenuEventArgs>(ShowGridMenu);
FoolballType = DateHeaderViewModel.FoolballType; FoolballType = DateHeaderViewModel.FoolballType;
SeasonId = DateHeaderViewModel.SeasonId; SeasonId = DateHeaderViewModel.SeasonId;
} }
#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.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
#region 打开更新数据时间日志 #region 打开更新数据时间日志
/// <summary> /// <summary>
/// 打开数据更新日志 /// 打开数据更新日志
......
...@@ -172,6 +172,10 @@ ...@@ -172,6 +172,10 @@
<Project>{06b80c09-343d-4bb2-aeb1-61cfbfbf5cad}</Project> <Project>{06b80c09-343d-4bb2-aeb1-61cfbfbf5cad}</Project>
<Name>VIZ.Framework.Storage</Name> <Name>VIZ.Framework.Storage</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\VIZ.Package\VIZ.Package.Common\VIZ.Package.Common.csproj">
<Project>{e4912bce-bc90-4457-9ee3-06435496d979}</Project>
<Name>VIZ.Package.Common</Name>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Package\VIZ.Package.Connection\VIZ.Package.Connection.csproj"> <ProjectReference Include="..\..\VIZ.Package\VIZ.Package.Connection\VIZ.Package.Connection.csproj">
<Project>{421527f6-37b8-4615-9317-ffd5e272181b}</Project> <Project>{421527f6-37b8-4615-9317-ffd5e272181b}</Project>
<Name>VIZ.Package.Connection</Name> <Name>VIZ.Package.Connection</Name>
......
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