Commit d4849a6e by wangonghui

修改bug

parent 0c172b99
......@@ -64,7 +64,7 @@
</Grid>
</WrapPanel>
<WrapPanel Width="650" HorizontalAlignment="Left" Grid.Row="1" VerticalAlignment="Center" Margin="-2,0,0,0" >
<!--<WrapPanel Width="650" HorizontalAlignment="Left" Grid.Row="1" VerticalAlignment="Center" Margin="-2,0,0,0" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"/>
......@@ -81,7 +81,7 @@
<Button Content="任务停止" Name="task_Stop" Click="task_Stop_Click" Grid.Column="2" FontSize="16" Height="30" Width="90"/>
</Grid>
</WrapPanel>
</WrapPanel>-->
<DockPanel Grid.Row="2" >
......
......@@ -38,9 +38,9 @@ namespace VIZ.TVP.CBA.Module
WPFHelper.BindingViewModel(this, new DayMatchViewModel());
vm=this.DataContext as DayMatchViewModel;
task_Start.IsEnabled = true;
task_Stop.IsEnabled = false;
task_continue.IsEnabled = false;
//task_Start.IsEnabled = true;
//task_Stop.IsEnabled = false;
//task_continue.IsEnabled = false;
}
......@@ -204,41 +204,41 @@ namespace VIZ.TVP.CBA.Module
}
private void task_Start_Click(object sender, RoutedEventArgs e)
{
DayMatchView_TaskInit();
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_Start_Click(object sender, RoutedEventArgs e)
//{
// DayMatchView_TaskInit();
// //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;
}
//}
//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;
//}
}
}
......@@ -68,7 +68,20 @@
<TabItem Header="今日赛程" >
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<DockPanel Grid.Row="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="150"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Content="刷新赛程" FontSize="14" Width="100" Height="30" Command="{Binding RefreshDayMatchCmd}" />
</Grid>
</DockPanel>
<DockPanel Grid.Row="1" Grid.ColumnSpan="2">
......@@ -103,7 +116,6 @@
AllowColumnFiltering="False"
AllowSorting="False"
AllowEditing="False"
AllowResizing="True"
IsColumnMenuEnabled="False">
</dxg:TableView>
</dxg:GridControl.View>
......@@ -168,7 +180,6 @@
<TabItem Header="球队数据" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="*"/>
......
......@@ -26,10 +26,12 @@ namespace VIZ.TVP.CBA.Module
BtnCmd = new VCommand(BtmCommand);
RefreshCommand = new VCommand(RefreshTeamStats);
GetSchedule();
BtmCommand();
RefreshDayMatchCmd = new VCommand(RefreshDayMatch);
PlayerHCommand = new VCommand(SetHPlayerStats);
PlayerACommand = new VCommand(SetAPlayerStats);
RefreshPlayerCommand = new VCommand(RefreshPlayer);
......@@ -44,6 +46,8 @@ namespace VIZ.TVP.CBA.Module
private ObservableCollection<string> matchItems;
public VCommand RefreshDayMatchCmd { get; set; }
/// <summary>
/// 下拉框绑定得赛程详细信息
/// </summary>
......@@ -190,6 +194,12 @@ namespace VIZ.TVP.CBA.Module
}
private void RefreshDayMatch()
{
GetSchedule();
}
private Dayschedule selectMatchData;
......
......@@ -29,7 +29,7 @@ namespace VIZ.TVP.CBA.Module
WPFHelper.BindingViewModel(this,new RoundMatchViewModel());
vm = this.DataContext as RoundMatchViewModel;
this.Loaded += RoundMatchView_Load;
}
public void Dispose()
......@@ -89,34 +89,34 @@ namespace VIZ.TVP.CBA.Module
/// <summary>
/// 注册任务
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void RoundMatchView_Load(object sender, RoutedEventArgs e)
{
if (task != null)
return;
///// <summary>
///// 注册任务
///// </summary>
///// <param name="sender"></param>
///// <param name="e"></param>
//private void RoundMatchView_Load(object sender, RoutedEventArgs e)
//{
// if (task != null)
// return;
task = new PackageTaskModel(this);
task.PreviewUpdateAction = OnPreviewUpdate;
task.TakeUpdateAction = OnTakeUpdate;
task.Name = "比赛轮次";
// task = new PackageTaskModel(this);
// task.PreviewUpdateAction = OnPreviewUpdate;
// task.TakeUpdateAction = OnTakeUpdate;
// task.Name = "比赛轮次";
IPackageTaskService service = ApplicationDomainEx.ServiceManager.GetService<IPackageTaskService>(ViewServiceKeys.PACKAGE_TASK_SERVICE);
if (service == null)
return;
// IPackageTaskService service = ApplicationDomainEx.ServiceManager.GetService<IPackageTaskService>(ViewServiceKeys.PACKAGE_TASK_SERVICE);
// if (service == null)
// return;
service.Register(task);
// service.Register(task);
}
//}
/// <summary>
/// 任务模型
/// </summary>
public PackageTaskModel task;
// public PackageTaskModel task;
private void OnPreviewUpdate(ConnModel conn)
{
......
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