去掉起飞数量
This commit is contained in:
parent
9a1fd805b9
commit
57fc99c434
@ -89,25 +89,7 @@ namespace Plane.FormationCreator.Formation
|
||||
|
||||
private CopterManager _copterManager;
|
||||
|
||||
private int _TakeOffNumAttr = 1;
|
||||
public int TakeOffNumAttr
|
||||
{
|
||||
get { return _TakeOffNumAttr; }
|
||||
set
|
||||
{
|
||||
Set(nameof(TakeOffNumAttr), ref _TakeOffNumAttr, value);
|
||||
|
||||
bool takeOffTaskExisted = Tasks.Count >= 1;
|
||||
FlightTask takeOffTask;
|
||||
if (takeOffTaskExisted)
|
||||
{
|
||||
takeOffTask = Tasks[0];
|
||||
takeOffTask.TakeOffNumAttr = TakeOffNumAttr;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private string _MessageText="test";
|
||||
public string MessageText
|
||||
@ -149,7 +131,6 @@ namespace Plane.FormationCreator.Formation
|
||||
else
|
||||
{
|
||||
takeOffTask = new FlightTask(FlightTaskType.TakeOff);
|
||||
takeOffTask.TakeOffNumAttr = TakeOffNumAttr;
|
||||
Tasks.Add(takeOffTask);
|
||||
RaiseTaskAdded(null, takeOffTask);
|
||||
//TaskAdded?.Invoke(this, new FlightTaskAddedEventArgs { AddedTask = takeOffTask });
|
||||
@ -935,7 +916,7 @@ namespace Plane.FormationCreator.Formation
|
||||
case FlightTaskType.TakeOff:
|
||||
return new {
|
||||
type = type,
|
||||
takeoffnumber = TakeOffNumAttr,
|
||||
takeoffnumber = 1,// TakeOffNumAttr,
|
||||
takeoffTime = task.TakeOffTime,
|
||||
singleCopterInfos = task.SingleCopterInfos.Select(info =>
|
||||
{
|
||||
@ -1098,7 +1079,7 @@ namespace Plane.FormationCreator.Formation
|
||||
case FlightTaskType.TakeOff:
|
||||
return new {
|
||||
type = type,
|
||||
takeoffnumber = TakeOffNumAttr,
|
||||
takeoffnumber = 1,//TakeOffNumAttr,
|
||||
takeoffTime = task.TakeOffTime,
|
||||
singleCopterInfos = task.SingleCopterInfos.Select(info =>
|
||||
{
|
||||
@ -1179,7 +1160,7 @@ namespace Plane.FormationCreator.Formation
|
||||
case FlightTaskType.TakeOff:
|
||||
// AddTakeOffTask(copters); // added by ZJF
|
||||
// TakeOffNumAttr = task.takeoffnumber;
|
||||
TakeOffNumAttr = task.takeoffnumber;
|
||||
// TakeOffNumAttr= task.takeoffnumber;
|
||||
RestoreTakeOffTask((byte)task.takeoffTime, task.singleCopterInfos);
|
||||
break;
|
||||
case FlightTaskType.FlyTo:
|
||||
@ -1516,7 +1497,7 @@ namespace Plane.FormationCreator.Formation
|
||||
{
|
||||
case FlightTaskType.TakeOff:
|
||||
// AddTakeOffTask(copters); // added by ZJF
|
||||
TakeOffNumAttr = task.takeoffnumber;
|
||||
// TakeOffNumAttr = task.takeoffnumber;
|
||||
RestoreTakeOffTask((byte)task.takeoffTime, task.singleCopterInfos);
|
||||
break;
|
||||
case FlightTaskType.FlyTo:
|
||||
|
@ -13,16 +13,6 @@ namespace Plane.FormationCreator.Formation
|
||||
{
|
||||
|
||||
|
||||
private int _TakeOffNumAttr = 1;
|
||||
public int TakeOffNumAttr
|
||||
{
|
||||
get { return _TakeOffNumAttr; }
|
||||
set
|
||||
{
|
||||
Set(nameof(TakeOffNumAttr), ref _TakeOffNumAttr, value);
|
||||
}
|
||||
}
|
||||
|
||||
//起飞到第一个航点高度的飞行时间
|
||||
private byte _TakeOffTime = 10;
|
||||
public byte TakeOffTime
|
||||
|
@ -230,7 +230,7 @@
|
||||
<Grid>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock Margin="10,4"
|
||||
Text="{Binding Message}" Width="300" MouseUp="LogShowHide"/>
|
||||
Text="{Binding Message}" Width="400" MouseUp="LogShowHide"/>
|
||||
<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" Margin="0,8" BorderBrush="LightGray" BorderThickness="1"/>
|
||||
<TextBlock Margin="10,4"
|
||||
Width="300" Text="{Binding SysStatusText}" />
|
||||
|
@ -142,7 +142,7 @@ namespace Plane.FormationCreator.ViewModels
|
||||
get { return _CopterSum; }
|
||||
set { Set(nameof(CopterSum), ref _CopterSum, value); }
|
||||
}
|
||||
private string _CopterColor = "FFFFFF";
|
||||
private string _CopterColor = "330033";
|
||||
public string CopterColor
|
||||
{
|
||||
get { return _CopterColor; }
|
||||
|
@ -26,17 +26,8 @@
|
||||
Value="Horizontal" />
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<TextBlock Margin="5" Text="起飞任务"/>
|
||||
<Separator/>
|
||||
<StackPanel Visibility="Collapsed">
|
||||
<TextBlock Margin="5" Text="起飞任务" Height="20" VerticalAlignment="Center" />
|
||||
|
||||
<TextBlock Text="起飞数量:" Margin="5,10,5,0" />
|
||||
<TextBox x:Name="txttakeoff"
|
||||
Width="25"
|
||||
Margin="0,10,5,0"
|
||||
VerticalContentAlignment="Center"
|
||||
Text="{Binding FlightTaskManager.TakeOffNumAttr, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Separator />
|
||||
<Grid DataContext="{Binding FlightTaskManager.SelectedTask.ModifyingSingleCopterInfo}">
|
||||
@ -76,15 +67,14 @@
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<StackPanel>
|
||||
<TextBlock Margin="5" Text="航点任务"/>
|
||||
<Button Content="导入航点" Command="{Binding ImportWayPointCommand}"
|
||||
<TextBlock Margin="5" Text="航点任务 " VerticalAlignment="Center" />
|
||||
<Button Margin="5" Content="导入航点" Command="{Binding ImportWayPointCommand}"
|
||||
Visibility="Collapsed"/>
|
||||
<Button Content="优化路线" Command="{Binding OptimizeRouteCommand}"
|
||||
<Button Margin="5" Content="优化路线" Command="{Binding OptimizeRouteCommand}"
|
||||
/>
|
||||
<Button Content="导入航点" Command="{Binding ImportBlenderWayPointCommand}"/>
|
||||
<Button Content="导出航点" Command="{Binding ExportWayPointCommand}"/>
|
||||
<Button Content="估计时间" Command="{Binding AutoWayPointTmCommand}"/>
|
||||
<Button Content="自动时间" Command="{Binding AutoWayPointAllTmCommand}"/>
|
||||
<Button Margin="5" Content="导入航点" Command="{Binding ImportBlenderWayPointCommand}"/>
|
||||
<Button Margin="5" Content="导出航点" Command="{Binding ExportWayPointCommand}"/>
|
||||
<Button Margin="5" Content="估计时间" Command="{Binding AutoWayPointTmCommand}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Separator Margin="0,1"/>
|
||||
@ -279,7 +269,7 @@
|
||||
Value="Horizontal" />
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<TextBlock Margin="5" Text="降落任务"/>
|
||||
<TextBlock Margin="5" Text="降落任务" VerticalAlignment="Center" />
|
||||
<Separator/>
|
||||
<Grid DataContext="{Binding FlightTaskManager.SelectedTask.ModifyingSingleCopterInfo}"
|
||||
IsEnabled="{Binding CanModifySingleCopterInfo}" >
|
||||
@ -447,6 +437,20 @@
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
|
||||
<TabItem Header="设计工具" Margin="-2,-2,-2,0">
|
||||
<StackPanel>
|
||||
|
||||
<StackPanel x:Name="PanelDesign1">
|
||||
<StackPanel Orientation="Horizontal" Margin="0,5,0,5" >
|
||||
<Button Width="120" Content="自动飞行时间" Margin="10,5,0,5"
|
||||
Command="{Binding AutoWayPointAllTmCommand}" HorizontalAlignment="Right" Height="26"/>
|
||||
<Button Width="120" Content="飞行图案设计" Margin="10,5,0,5"
|
||||
Command="{Binding SetHorseRaceLampCommand}" HorizontalAlignment="Right" Height="26"/>
|
||||
</StackPanel>
|
||||
<Separator/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
|
||||
</TabControl>
|
||||
</UserControl>
|
||||
|
Loading…
Reference in New Issue
Block a user