加入强制下一步按钮
按完强制下一步后,需要等到任务暂停,并且标识调过不要等待的飞机后再点击运行任务
This commit is contained in:
parent
bfc534c504
commit
dad6373e8f
@ -268,6 +268,15 @@ namespace Plane.FormationCreator.Formation
|
|||||||
AddTakeOffTask(_copterManager.Copters);
|
AddTakeOffTask(_copterManager.Copters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void ForceNextTasks()
|
||||||
|
{
|
||||||
|
Pause();
|
||||||
|
if (CurrentRunningTaskIndex == 0)
|
||||||
|
CurrentRunningTaskIndex++;
|
||||||
|
CurrentRunningTaskIndex++;
|
||||||
|
}
|
||||||
|
|
||||||
public void ResetTasks()
|
public void ResetTasks()
|
||||||
{
|
{
|
||||||
Pause();
|
Pause();
|
||||||
|
@ -49,6 +49,21 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ICommand _NextTasksCommand;
|
||||||
|
public ICommand NextTasksCommand
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _NextTasksCommand ?? (_NextTasksCommand = new RelayCommand( () =>
|
||||||
|
{
|
||||||
|
_flightTaskManager.ForceNextTasks();
|
||||||
|
// Message.Show("任务开始");
|
||||||
|
// await _flightTaskManager.RunAsync();
|
||||||
|
// Message.Show(_flightTaskManager.IsPaused == true ? "任务暂停" : "任务完成");
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private ICommand _ResetTasksCommand;
|
private ICommand _ResetTasksCommand;
|
||||||
public ICommand ResetTasksCommand
|
public ICommand ResetTasksCommand
|
||||||
{
|
{
|
||||||
|
@ -123,6 +123,9 @@
|
|||||||
<Button Content="重置任务"
|
<Button Content="重置任务"
|
||||||
Background="#232323"
|
Background="#232323"
|
||||||
Command="{Binding ResetTasksCommand}" />
|
Command="{Binding ResetTasksCommand}" />
|
||||||
|
<Button Content="强制下一步"
|
||||||
|
Background="#232323"
|
||||||
|
Command="{Binding NextTasksCommand}" />
|
||||||
<!--<Button Content="保存" />
|
<!--<Button Content="保存" />
|
||||||
<Button Content="取消" />-->
|
<Button Content="取消" />-->
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
Loading…
Reference in New Issue
Block a user