631 lines
36 KiB
XML
631 lines
36 KiB
XML
<UserControl x:Class="Plane.FormationCreator.Views.ModifyTaskView"
|
||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
xmlns:local="clr-namespace:Plane.FormationCreator.Views"
|
||
xmlns:vm="clr-namespace:Plane.FormationCreator.ViewModels"
|
||
xmlns:m="clr-namespace:Plane.FormationCreator.Formation"
|
||
mc:Ignorable="d" Height="420" Width="Auto" MinWidth="350">
|
||
<TabControl Margin="0,0,0,0">
|
||
|
||
<TabItem Header="航点设计">
|
||
<TabControl SelectedIndex="{Binding FlightTaskManager.SelectedTask.TaskTypeIndex,UpdateSourceTrigger=PropertyChanged}">
|
||
<TabControl.Resources>
|
||
<Style TargetType="TabItem"
|
||
BasedOn="{StaticResource {x:Type TabItem}}">
|
||
<Setter Property="Visibility"
|
||
Value="Collapsed"/>
|
||
</Style>
|
||
</TabControl.Resources>
|
||
<TabItem Header="起飞">
|
||
<StackPanel Orientation="Vertical" Margin="0,0,0,-30">
|
||
<StackPanel.Resources>
|
||
<Style TargetType="StackPanel">
|
||
<Setter Property="Orientation"
|
||
Value="Horizontal" />
|
||
</Style>
|
||
</StackPanel.Resources>
|
||
<TextBlock Margin="5" Text="起飞任务" Height="20" VerticalAlignment="Center" />
|
||
|
||
|
||
<Separator Margin="5,0,5,0" />
|
||
<Grid Margin="5" DataContext="{Binding FlightTaskManager.SelectedTask.ModifyingSingleCopterInfo}">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition/>
|
||
<ColumnDefinition/>
|
||
<ColumnDefinition/>
|
||
<ColumnDefinition/>
|
||
</Grid.ColumnDefinitions>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition/>
|
||
<RowDefinition/>
|
||
<RowDefinition/>
|
||
</Grid.RowDefinitions>
|
||
|
||
<TextBlock Margin="5" Text="起飞延时" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||
<TextBox Margin="5" Grid.Column="2"
|
||
Text="{Binding TakeOffWaitTime, UpdateSourceTrigger=PropertyChanged}"/>
|
||
<Button Content="应用所选" Margin="5" Grid.Column="3"
|
||
Command="{Binding SetSelTakeOffWaitCommand}"/>
|
||
<Separator Margin="5,5,5,5" Grid.Row="1" Grid.ColumnSpan="4"/>
|
||
|
||
<TextBlock Margin="5" Text="随机时间" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||
<TextBox Margin="5" Grid.Row="2" Grid.Column="1" Text="{Binding TakeOffMinTime}"/>
|
||
<TextBox Margin="5" Grid.Row="2" Grid.Column="2" Text="{Binding TakeOffMaxTime}"/>
|
||
<Button Margin="5" Content="应用所选" Grid.Row="2" Grid.Column="3"
|
||
Command="{Binding SetRandomOffWaitDelayCommand}"/>
|
||
</Grid>
|
||
|
||
</StackPanel>
|
||
</TabItem>
|
||
<TabItem Header="航点">
|
||
<StackPanel Orientation="Vertical" Margin="0,1">
|
||
<StackPanel.Resources>
|
||
<Style TargetType="StackPanel">
|
||
<Setter Property="Orientation" Value="Horizontal" />
|
||
</Style>
|
||
</StackPanel.Resources>
|
||
<StackPanel>
|
||
<TextBlock Margin="0,5,5,0" Text="所有:" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||
<Button Margin="0,5,5,0" Content="导入航点" Command="{Binding ImportWayPointCommand}"
|
||
Visibility="Collapsed"/>
|
||
<Button Margin="0,5,5,0" Content="优化路线" Width="105" Command="{Binding OptimizeRouteCommand}"
|
||
/>
|
||
<Button Margin="0,5,5,0" Content="导出到C4D" Width="105" Command="{Binding ExportWayPointCommand}"/>
|
||
<Button Margin="0,5,5,0" Content="估计时间" Width="105" Command="{Binding AutoWayPointTmCommand}"/>
|
||
|
||
</StackPanel>
|
||
<StackPanel>
|
||
|
||
|
||
<Button Content="回前一任务"
|
||
Margin="40,5,5,0" Width="105"
|
||
Command="{Binding BackToPreviousTaskPoint}" />
|
||
<Button Content="回前一高度"
|
||
Margin="0,5,5,0" Width="105"
|
||
Command="{Binding PrealtCommand}" />
|
||
|
||
<Button Content="回起飞点"
|
||
Margin="0,5,5,0" Width="105"
|
||
Command="{Binding BackTakeOffPointCommand}" />
|
||
|
||
|
||
|
||
</StackPanel>
|
||
|
||
<Separator Margin="5,5,5,0" />
|
||
<StackPanel>
|
||
<TextBlock Text="选中:" Margin="0,5,5,0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||
<Button Content="上边对齐"
|
||
Margin="0,5,5,0"
|
||
Command="{Binding LevelAlignmentCommand}" />
|
||
<Button Content="右边对齐"
|
||
Margin="0,5,5,0"
|
||
Command="{Binding VerticlAlignmentCommand}" />
|
||
<Button Content="水平均分"
|
||
Margin="0,5,5,0"
|
||
Command="{Binding LevelAverageCommand}" />
|
||
<Button Content="垂直均分"
|
||
Margin="0,5,5,0"
|
||
Command="{Binding VerticlAverageCommand}" />
|
||
|
||
</StackPanel>
|
||
|
||
<StackPanel>
|
||
<Button Content="水平旋转"
|
||
Margin="40,5,5,0"
|
||
Command="{Binding LevelRotateCommand}"
|
||
CommandParameter="{Binding ElementName=txtAlignmentLine, Path=Text}"/>
|
||
<Button Content="垂直旋转"
|
||
Margin="0,5,5,0"
|
||
Command="{Binding VerticlRotateCommand}"
|
||
CommandParameter="{Binding ElementName=txtAlignmentLine, Path=Text}"/>
|
||
|
||
<TextBox x:Name="txtAlignmentLine"
|
||
Width="30"
|
||
Margin="0,5,5,0"
|
||
Text="0"
|
||
VerticalContentAlignment="Center"
|
||
HorizontalContentAlignment="Right"/>
|
||
<TextBlock Text="度" Margin="0, 10, 5, 0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||
<Button Content="调整大小"
|
||
Margin="0,5,5,0"
|
||
Command="{Binding ScaleCommand}"
|
||
CommandParameter="{Binding ElementName=txtScaleVale, Path=Text}"/>
|
||
|
||
<TextBox x:Name="txtScaleVale"
|
||
Text="100"
|
||
Width="30"
|
||
Margin="0,5,5,0"
|
||
VerticalContentAlignment="Center"
|
||
HorizontalContentAlignment="Right" />
|
||
<TextBlock Text="%" Margin="0, 10, 5, 0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||
|
||
</StackPanel>
|
||
|
||
|
||
|
||
<StackPanel>
|
||
<Button Content="调整高度"
|
||
Margin="0,5,5,0"
|
||
Command="{Binding ModiSelectedAltCommand}"/>
|
||
<Button Content="移动航点"
|
||
Margin="0,5,5,0"
|
||
Command="{Binding ModiSelectedPosCommand}" />
|
||
<TextBox
|
||
Grid.Column="1"
|
||
Width="30"
|
||
Margin="0,5,5,0"
|
||
VerticalContentAlignment="Center"
|
||
HorizontalContentAlignment="Right"
|
||
Text="{Binding Modialtvalue, UpdateSourceTrigger=PropertyChanged}"/>
|
||
<TextBlock Text="米 方向" Margin="0, 10, 5, 0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||
<TextBox Grid.Column="1"
|
||
Width="30"
|
||
Margin="0,5,5,0"
|
||
VerticalContentAlignment="Center"
|
||
HorizontalContentAlignment="Right"
|
||
Text="{Binding directionvalue, UpdateSourceTrigger=PropertyChanged}"/>
|
||
<TextBlock Text="度" Margin="0, 10, 5, 0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||
<Button Content="最小点距"
|
||
Margin="0,5,5,0"
|
||
Command="{Binding calDistinceCommand}"/>
|
||
<Button Content="最长航距"
|
||
Margin="0,5,5,0"
|
||
Command="{Binding MaxDistinceAndTimeCommand}"/>
|
||
|
||
</StackPanel>
|
||
|
||
|
||
<Separator Margin="0,5,5,0" />
|
||
|
||
|
||
<Grid Margin="0,2"
|
||
DataContext="{Binding FlightTaskManager.SelectedTask.ModifyingSingleCopterInfo}"
|
||
IsEnabled="{Binding CanModifySingleCopterInfo}" >
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
<RowDefinition />
|
||
</Grid.RowDefinitions>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition />
|
||
<ColumnDefinition />
|
||
<ColumnDefinition />
|
||
<ColumnDefinition />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<TextBlock Text="纬度: " VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||
<TextBox Grid.Column="2"
|
||
Grid.ColumnSpan="2"
|
||
Margin="0,5,5,0"
|
||
Text="{Binding TargetLat, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
||
<TextBlock Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left"
|
||
Text="经度: " />
|
||
<TextBox Grid.Row="1"
|
||
Grid.Column="2"
|
||
Grid.ColumnSpan="2"
|
||
Margin="0,5,5,0"
|
||
Text="{Binding TargetLng, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
||
<TextBlock Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left"
|
||
Text="高度: " />
|
||
<TextBox Grid.Row="2"
|
||
Height="24"
|
||
Grid.Column="2"
|
||
Margin="0,5,5,0"
|
||
VerticalContentAlignment="Center"
|
||
HorizontalContentAlignment="Left"
|
||
Text="{Binding TargetAlt, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
||
<Button Grid.Row="2"
|
||
Content="应用到所选"
|
||
Grid.Column="3" Margin="0,5,5,0"
|
||
Command="{Binding SetAllCopterAltCommand}"/>
|
||
</Grid>
|
||
<Separator Margin="0,5,5,5"/>
|
||
<Grid Margin="0,2,0,0"
|
||
DataContext="{Binding FlightTaskManager.SelectedTask.ModifyingSingleCopterInfo}"
|
||
IsEnabled="{Binding CanModifySingleCopterInfo}" >
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition/>
|
||
<ColumnDefinition/>
|
||
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<CheckBox Content="返航点" ToolTip="勾选后航点仅高度有用,经纬度无效,无视原点自动飞回起飞点" Margin="0,5,0,0" IsChecked="{Binding IsLandWaypoint,UpdateSourceTrigger=PropertyChanged}" />
|
||
<Button Content="应用到所选" Margin="0,2,5,0" Command="{Binding SetIsLandCommand}" Grid.Column="1"/>
|
||
|
||
|
||
</Grid>
|
||
<Separator Margin="0,5,5,5" />
|
||
<Grid Margin="0,2"
|
||
DataContext="{Binding FlightTaskManager.SelectedTask.ModifyingSingleCopterInfo}"
|
||
IsEnabled="{Binding CanModifySingleCopterInfo}" >
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition/>
|
||
<ColumnDefinition/>
|
||
|
||
</Grid.ColumnDefinitions>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition/>
|
||
<RowDefinition/>
|
||
</Grid.RowDefinitions>
|
||
<CheckBox Content="改变速度" Margin="0,3"
|
||
IsChecked="{Binding IsChangeSpeed, UpdateSourceTrigger=PropertyChanged}"/>
|
||
<StackPanel Margin="0,0" Grid.Column="1">
|
||
<TextBlock Text="水平" Margin="0,0,5,5" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||
<TextBox Width="45" Margin="5,0,5,5" VerticalAlignment ="Center"
|
||
Text="{Binding LevelSpeed, UpdateSourceTrigger=PropertyChanged}"/>
|
||
<TextBlock Text="上升" Margin="0,0,5,5" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||
<TextBox Width="45" Margin="5,0,0,5" VerticalAlignment="Center"
|
||
Text="{Binding UpSpeed, UpdateSourceTrigger=PropertyChanged}"/>
|
||
<TextBlock Text="下降" Margin="5,0,0,5" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||
<TextBox Width="45" Margin="5,0,5,5" VerticalAlignment="Center"
|
||
Text="{Binding DownSpeed, UpdateSourceTrigger=PropertyChanged}"/>
|
||
</StackPanel>
|
||
<Button Content="应用到所选" Margin="5,0,5,5" Grid.Row="1" Grid.Column="1" Command="{Binding SetIsChangeCommand}"/>
|
||
|
||
</Grid>
|
||
</StackPanel>
|
||
</TabItem>
|
||
<TabItem Header="降落">
|
||
<StackPanel Orientation="Vertical" Margin="0,0,0,-30">
|
||
<StackPanel.Resources>
|
||
<Style TargetType="StackPanel">
|
||
<Setter Property="Orientation"
|
||
Value="Horizontal" />
|
||
</Style>
|
||
</StackPanel.Resources>
|
||
<TextBlock Margin="5" Text="降落任务" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||
<Separator Margin="5,0,5,5" />
|
||
<Grid Margin="5" DataContext="{Binding FlightTaskManager.SelectedTask.ModifyingSingleCopterInfo}"
|
||
IsEnabled="{Binding CanModifySingleCopterInfo}" >
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition/>
|
||
<ColumnDefinition/>
|
||
<ColumnDefinition/>
|
||
<ColumnDefinition/>
|
||
</Grid.ColumnDefinitions>
|
||
<TextBlock Margin="5" Text="降落延时" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||
|
||
<TextBox Margin="5" Grid.Column="2"
|
||
Text="{Binding LandWaitTime, UpdateSourceTrigger=PropertyChanged}"/>
|
||
<Button Content="应用所选" Command="{Binding SetSelLandWaitTimeCommand}" Grid.Column="3"/>
|
||
|
||
</Grid>
|
||
</StackPanel>
|
||
|
||
</TabItem>
|
||
</TabControl>
|
||
|
||
</TabItem>
|
||
<TabItem Header="灯光设计">
|
||
|
||
<StackPanel x:Name="lightDesign">
|
||
<StackPanel Orientation="Horizontal" Margin="0,5,0,5" >
|
||
<TextBlock Margin="5,7,0,0" Text="扫光颜色"/>
|
||
<TextBox Height="25" Margin="5,3,5,3" Width="55" Text="{Binding ChangeRGB, UpdateSourceTrigger=PropertyChanged}"
|
||
ToolTip="灯带或跑马灯扫过的颜色"
|
||
Foreground="Black"
|
||
Background="{Binding DrawChangeRGB, UpdateSourceTrigger=PropertyChanged}"
|
||
MouseDoubleClick="TextBox_MouseDoubleClick"/>
|
||
<TextBlock Margin="0,7,0,0" Text="方向"/>
|
||
<TextBox Height="25"
|
||
ToolTip="默认90度表示从左到右扫过,0度从下向上扫"
|
||
Margin="5,3,0,3" Width="30" Text="{Binding BeltDirection}"/>
|
||
|
||
<TextBlock Margin="5,7,0,0" Text="起始时间"/>
|
||
<TextBox Height="25"
|
||
ToolTip="扫光开始时间"
|
||
Margin="5,3,0,3" Width="30" Text="{Binding BeginTime}"/>
|
||
<TextBlock Margin="5,7,0,0" Text="结束时间"/>
|
||
<TextBox Height="25" Margin="5,3,0,3" Width="30" Text="{Binding EndTime}"
|
||
ToolTip="扫光完成时间" />
|
||
<TextBlock Margin="5,7,0,0" Text="分段"/>
|
||
<TextBox Height="25" Margin="5,3,0,3" Width="30" Text="{Binding AverageSum}"
|
||
ToolTip="图案分成几段扫过,段数越多灯带越窄,同样时间扫得越快" />
|
||
<Button Width="78" Content="灯带" Margin="10,0,0,0"
|
||
ToolTip="选择的飞机用一个光带扫过"
|
||
Command="{Binding SetHorseRaceLampCommand}" HorizontalAlignment="Right"/>
|
||
|
||
</StackPanel>
|
||
<Grid >
|
||
<StackPanel Orientation="Horizontal" Margin="0,2,0,0">
|
||
<TextBlock Margin="5,7,0,0" Text="结束颜色"/>
|
||
<TextBox Height="25" Margin="5,3,40,3" Width="55" Text="{Binding EndRGB, UpdateSourceTrigger=PropertyChanged}" ToolTip="设置为0表示扫过后回到原色"
|
||
Foreground="Black"
|
||
Background="{Binding DrawEndRGB, UpdateSourceTrigger=PropertyChanged}"
|
||
|
||
MouseDoubleClick="TextBox_MouseDoubleClick"/>
|
||
<TextBlock Margin="29,7,0,0" Text="起始时间"/>
|
||
<TextBox Height="25" Margin="5,3,0,3" Width="30" Text="{Binding StrokesTime}"
|
||
ToolTip="跑马灯开始时间" />
|
||
|
||
<TextBlock Margin="5,7,0,0" Text="扫光数量"/>
|
||
<TextBox Height="25" Margin="5,3,0,3" Width="30" Text="{Binding SingleNum}"
|
||
ToolTip="一次扫光改变颜色的数量" />
|
||
<TextBlock Margin="5,7,0,0" Text="间隔"/>
|
||
<TextBox Height="25" Margin="5,3,0,3" Width="30" Text="{Binding IntervalTime}"
|
||
ToolTip="下一个扫光的间隔(秒)" />
|
||
<Button Width="78" Content="跑马灯" Margin="10,0,0,0"
|
||
Command="{Binding SetStrokesLampCommamd}" HorizontalAlignment="Right"
|
||
ToolTip="根据航点选择的顺序改变为扫光的颜色,经过扫光的航点变为结束颜色"
|
||
/>
|
||
</StackPanel>
|
||
|
||
</Grid>
|
||
<Separator Margin="5,5,5,5" />
|
||
<StackPanel Orientation="Horizontal">
|
||
<TextBlock Margin="5,7,3,0" Text="时间"/>
|
||
<TextBox Height="25" Margin="5,2,3,3" Width="30" Text="{Binding GradientRampTime}"
|
||
ToolTip="开始时间" />
|
||
<TextBlock Margin="5,7,3,0" Text="方向"/>
|
||
<TextBox Height="25" Margin="5,2,5,3" Width="30" Text="{Binding GradualDirection}"
|
||
ToolTip="默认90度表示从左到右渐变,0度从下向上渐变" />
|
||
<TextBlock Margin="5,7,3,0" Text="起始颜色"/>
|
||
<TextBox Height="25" Margin="5,2,3,3" Width="55" Text="{Binding LeftRGB, UpdateSourceTrigger=PropertyChanged}"
|
||
Foreground="Black"
|
||
ToolTip="渐变起始颜色"
|
||
Background="{Binding DrawLeftRGB, UpdateSourceTrigger=PropertyChanged}"
|
||
|
||
MouseDoubleClick="TextBox_MouseDoubleClick"/>
|
||
<TextBlock Margin="5,7,3,0" Text="结束颜色"/>
|
||
<TextBox Height="25" Margin="5,2,7,3" Width="55" Text="{Binding RightRGB, UpdateSourceTrigger=PropertyChanged}"
|
||
Foreground="Black"
|
||
ToolTip="渐变结束颜色"
|
||
Background="{Binding DrawRightRGB, UpdateSourceTrigger=PropertyChanged}"
|
||
|
||
MouseDoubleClick="TextBox_MouseDoubleClick"/>
|
||
<Button Margin="42,0,0,3" Width="78" Content="渐变灯"
|
||
ToolTip="自动生成渐变过度颜色"
|
||
Command="{Binding SetGradientRampCommand}" />
|
||
</StackPanel>
|
||
|
||
<Separator Margin="5,5,5,5" />
|
||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,12,0" >
|
||
<Button Margin="5,0,0,3" Content="最长时间" Width="90"
|
||
ToolTip="查询所有选择飞机最长灯光时间"
|
||
Command="{Binding QueryMAXTimeCommand}" />
|
||
<TextBlock Margin="5,7,3,0" Text="时间对齐"/>
|
||
<TextBox Height="25" Margin="5,2,3,3" Width="30" Text="{Binding AlignmentTime}"
|
||
ToolTip="对齐时间(秒)" />
|
||
<Button Margin="5,0,0,3" Content="对齐" Width="78"
|
||
ToolTip="所有飞机灯光时间对齐到指定秒数,便于做第二个灯带或跑马灯"
|
||
Command="{Binding AlignmentTimeCommand}" />
|
||
</StackPanel>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<Separator Margin="5,5,5,5" />
|
||
</StackPanel>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</TabItem>
|
||
|
||
|
||
|
||
<TabItem Header="灯光列表">
|
||
<StackPanel>
|
||
|
||
|
||
<StackPanel DataContext="{Binding FlightTaskManager.SelectedTask.ModifyingSingleCopterInfo}">
|
||
<Grid >
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="45*"/>
|
||
<ColumnDefinition Width="61*"/>
|
||
<ColumnDefinition Width="61*"/>
|
||
<ColumnDefinition Width="61*"/>
|
||
</Grid.ColumnDefinitions>
|
||
<StackPanel Orientation="Horizontal" Margin="0,0,0,0" >
|
||
<TextBlock Text="总时长:" Margin="5,7,2,2" VerticalAlignment="Center" Height="15"/>
|
||
<TextBlock Text="{Binding LEDSumTime}" Margin="0,7,2,2" VerticalAlignment="Center" Height="15"/>
|
||
<TextBlock Text="秒" Margin="0,7,10,2" VerticalAlignment="Center" Height="15"/>
|
||
</StackPanel>
|
||
|
||
<Grid Grid.Column="1" Grid.ColumnSpan="3" VerticalAlignment="Center" Height="34">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition />
|
||
<ColumnDefinition />
|
||
<ColumnDefinition />
|
||
<ColumnDefinition />
|
||
</Grid.ColumnDefinitions>
|
||
<Button Content="应用全部" VerticalAlignment="Center"
|
||
Margin="0,5,5,0"
|
||
Command="{Binding SetAllCopterLEDCommand}" />
|
||
<Button Content="应用所选" VerticalAlignment="Center"
|
||
Margin="0,5,5,0"
|
||
Grid.Column="1"
|
||
Command="{Binding SetSelectedCopterLEDCommand}" />
|
||
|
||
|
||
<Button Content="测试/停止" VerticalAlignment="Center"
|
||
Margin="0,5,5,0"
|
||
Grid.Column="2"
|
||
Command="{Binding TestCopterLEDCommand}"
|
||
/>
|
||
|
||
|
||
<Button Content="添加" VerticalAlignment="Center"
|
||
Grid.Column="3"
|
||
Margin="0,5,5,0"
|
||
Command="{Binding AddLEDCommand}" />
|
||
</Grid>
|
||
</Grid>
|
||
|
||
|
||
<ItemsControl Name="LEDItems" Margin="5"
|
||
Grid.Row="1"
|
||
Grid.ColumnSpan="2"
|
||
MinHeight="100"
|
||
Height="346"
|
||
MaxHeight="400"
|
||
ScrollViewer.VerticalScrollBarVisibility="Visible"
|
||
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
|
||
ItemsSource="{Binding Path= LEDInfos}">
|
||
<ItemsControl.Template>
|
||
<ControlTemplate>
|
||
<ScrollViewer x:Name="ScrollViewer" Padding="{TemplateBinding Padding}">
|
||
<ItemsPresenter />
|
||
</ScrollViewer>
|
||
</ControlTemplate>
|
||
</ItemsControl.Template>
|
||
<ItemsControl.ItemsPanel>
|
||
<ItemsPanelTemplate>
|
||
<StackPanel Orientation="Vertical" />
|
||
</ItemsPanelTemplate>
|
||
</ItemsControl.ItemsPanel>
|
||
<ItemsControl.ItemTemplate>
|
||
<DataTemplate>
|
||
<StackPanel Margin="0,5,0,0" Orientation="Horizontal" >
|
||
<TextBlock Text="类型" Margin="0,0,0,0" VerticalAlignment="Center" ></TextBlock>
|
||
<ComboBox Height="25" MinWidth="125" Width="110" Margin="5,0,0,0" Foreground="White" VerticalContentAlignment="Center"
|
||
SelectedIndex="{Binding Path=LEDMode}">
|
||
<ComboBox.ItemContainerStyle>
|
||
<Style>
|
||
<Setter Property="ComboBoxItem.Foreground" Value="White"/>
|
||
</Style>
|
||
</ComboBox.ItemContainerStyle>
|
||
<ComboBoxItem Content="常亮" />
|
||
<ComboBoxItem Content="同步闪烁(单色)" />
|
||
<ComboBoxItem Content="异步闪烁(随机)" />
|
||
<ComboBoxItem Content="同步闪烁(随机)" />
|
||
<ComboBoxItem Content="异步闪烁(单色)" />
|
||
<ComboBoxItem Content="渐亮" />
|
||
<ComboBoxItem Content="渐暗" />
|
||
<ComboBoxItem Content="呼吸灯(单色)" />
|
||
<ComboBoxItem Content="呼吸灯(随机)" />
|
||
<ComboBoxItem Content="异步呼吸(单色)" />
|
||
<ComboBoxItem Content="异步呼吸(随机)" />
|
||
<ComboBoxItem Content="拉烟"/>
|
||
|
||
</ComboBox>
|
||
|
||
<TextBlock Text="时间" Margin="12,0,0,0" VerticalAlignment="Center"></TextBlock>
|
||
<TextBox Height="25" MinWidth="40" MaxWidth="45" Margin="5,0,0,0"
|
||
ToolTip="单位:秒,最小设置0.1秒"
|
||
Text="{Binding Delay,UpdateSourceTrigger=PropertyChanged}" />
|
||
|
||
<TextBlock Text="间隔" Margin="12,0,0,0" VerticalAlignment="Center"></TextBlock>
|
||
<TextBox Height="25" MinWidth="35" MaxWidth="40" Margin="5,0,0,0"
|
||
ToolTip="单位:秒,最小设置0.1秒"
|
||
Text="{Binding Path=LEDInterval, UpdateSourceTrigger=PropertyChanged}" />
|
||
|
||
<TextBlock Text="颜色" Margin="12,0,0,0" VerticalAlignment="Center"></TextBlock>
|
||
<TextBox Height="25" Margin="5,0,0,0" MinWidth="50" Width="55"
|
||
Text="{Binding LEDRGB, UpdateSourceTrigger=PropertyChanged}"
|
||
Foreground="Black"
|
||
Background="{Binding DrawRGB, UpdateSourceTrigger=PropertyChanged}"
|
||
MouseDoubleClick="TextBox_MouseDoubleClick"
|
||
/>
|
||
<Button Content="删除" Margin="12,0,0,0"
|
||
Command="{Binding RemoveLEDCommand}"/>
|
||
|
||
</StackPanel>
|
||
</DataTemplate>
|
||
</ItemsControl.ItemTemplate>
|
||
|
||
|
||
|
||
</ItemsControl>
|
||
</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" Margin="10,5,0,5" Content="导入外部航点" Command="{Binding ImportBlenderWayPointCommand}"/>
|
||
<Button Width="120" Content="自动飞行时间" Margin="10,5,0,5"
|
||
Command="{Binding AutoWayPointAllTmCommand}" HorizontalAlignment="Right" />
|
||
<Button Width="120" Content="飞行图案设计" Margin="10,5,0,5"
|
||
Command="{Binding SetHorseRaceLampCommand}" HorizontalAlignment="Right" Height="26"/>
|
||
</StackPanel>
|
||
<Separator Margin="5,0,5,0" />
|
||
</StackPanel>
|
||
|
||
<StackPanel x:Name="PanelDesign2">
|
||
<StackPanel Orientation="Horizontal" Margin="0,5,0,5" >
|
||
<Button Content="整体旋转" Width="120"
|
||
Margin="10,5,0,5" Height="26"
|
||
Command="{Binding TaskRotateCommand}"
|
||
CommandParameter="{Binding ElementName=txtAlignmentLine1, Path=Text}"/>
|
||
<TextBox x:Name="txtAlignmentLine1"
|
||
Width="120"
|
||
Margin="10,5,0,5" Height="26"
|
||
Text="0"
|
||
VerticalContentAlignment="Center" />
|
||
<TextBlock Text="度" Margin="10, 10, 5, 0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||
|
||
</StackPanel>
|
||
<StackPanel Orientation="Horizontal" Margin="0,0,0,5" >
|
||
|
||
<Button Content="整体调整高度"
|
||
Width="120"
|
||
Margin="10,5,0,5" Height="26"
|
||
Command="{Binding ModiAltCommand}"
|
||
CommandParameter="{Binding ElementName=txtModialtvalue, Path=Text}"
|
||
/>
|
||
<Button Content="整体移动"
|
||
Width="120"
|
||
Margin="10,5,0,5" Height="26"
|
||
Command="{Binding ModiAllPosCommand}"
|
||
CommandParameter="{Binding ElementName=txtModialtvalue, Path=Text}"
|
||
/>
|
||
|
||
<TextBox x:Name="txtModialtvalue"
|
||
Grid.Column="1"
|
||
Width="35"
|
||
Margin="10,5,0,5" Height="26"
|
||
HorizontalContentAlignment="Right"
|
||
Text="0"/>
|
||
<TextBlock Text="米 方向" Margin="5, 10, 5, 0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||
<TextBox Grid.Column="1" x:Name="txtdirectionvalue"
|
||
Width="35"
|
||
Margin="0,5,0,5" Height="26"
|
||
HorizontalContentAlignment="Right"
|
||
Text="{Binding directionvalueall, UpdateSourceTrigger=PropertyChanged}"/>
|
||
<TextBlock Text="度" Margin="5, 10, 5, 0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||
|
||
|
||
</StackPanel>
|
||
<Separator Margin="5,0,5,0" />
|
||
</StackPanel>
|
||
<StackPanel Orientation="Horizontal" Margin="0,0,0,5" >
|
||
|
||
<Button Content="显示所有航点" Width="120"
|
||
Margin="10,5,0,5" Height="26"
|
||
Command="{Binding ShowallTaskpointCommand}"
|
||
/>
|
||
|
||
|
||
|
||
</StackPanel>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</StackPanel>
|
||
</TabItem>
|
||
|
||
</TabControl>
|
||
</UserControl>
|