[FlightTaskManager.cs]加入强制下一个 [ModifyTaskViewModel.cs]加入调整所有任务高度 [MapView.xaml.cs]加入是否显示所有点
136 lines
6.2 KiB
XML
136 lines
6.2 KiB
XML
<UserControl 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:m="clr-namespace:Plane.FormationCreator.Formation"
|
|
xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
|
|
x:Class="Plane.FormationCreator.Views.TaskBarView"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="40"
|
|
d:DesignWidth="500">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Button HorizontalAlignment="Left"
|
|
Visibility="{Binding FlightTaskManager.IsPaused, Converter={StaticResource IsPausedToRunButtonVisibilityConverter}}"
|
|
Command="{Binding RunTasksCommand}">
|
|
<Button.Template>
|
|
<ControlTemplate>
|
|
<Grid Width="40"
|
|
Height="40"
|
|
Background="#31000000"
|
|
VerticalAlignment="Bottom">
|
|
<ed:RegularPolygon Fill="LightGray"
|
|
InnerRadius="1"
|
|
PointCount="3"
|
|
Width="40"
|
|
Height="40"
|
|
Stretch="Fill"
|
|
Stroke="Gray">
|
|
<ed:RegularPolygon.RenderTransform>
|
|
<TransformGroup>
|
|
<ScaleTransform />
|
|
<SkewTransform />
|
|
<RotateTransform Angle="90" />
|
|
<TranslateTransform X="40" />
|
|
</TransformGroup>
|
|
</ed:RegularPolygon.RenderTransform>
|
|
</ed:RegularPolygon>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button>
|
|
<Button HorizontalAlignment="Left"
|
|
Background="#232323"
|
|
Visibility="{Binding FlightTaskManager.IsPaused, Converter={StaticResource IsPausedToPauseButtonVisibilityConverter}}"
|
|
Command="{Binding PauseTasksCommand}">
|
|
<Button.Template>
|
|
<ControlTemplate>
|
|
<Grid Width="40"
|
|
Height="40"
|
|
VerticalAlignment="Bottom"
|
|
Background="#33000000">
|
|
<Rectangle Fill="LightGray"
|
|
HorizontalAlignment="Left"
|
|
Width="15"
|
|
Height="40"
|
|
Stroke="Gray" />
|
|
<Rectangle Fill="LightGray"
|
|
HorizontalAlignment="Right"
|
|
Width="15"
|
|
Height="40"
|
|
Stroke="Gray" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button>
|
|
|
|
<ItemsControl Grid.Column="1"
|
|
VerticalAlignment="Bottom"
|
|
ItemsSource="{Binding Tasks}"
|
|
Name="TasksControl">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<WrapPanel Orientation="Horizontal" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid x:Name="itemgrid">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Border Background="{Binding Status, Converter={StaticResource FlightTaskStatusToFillConverter}}"
|
|
Width="100"
|
|
Height="15"
|
|
BorderThickness="2"
|
|
BorderBrush="Gray"
|
|
Effect="{Binding IsSelected, Converter={StaticResource FlightTaskIsSelectedToEffectConverter}}"
|
|
MouseLeftButtonUp="SelectTask"
|
|
MouseRightButtonUp="HideTask">
|
|
|
|
<TextBlock Width="auto"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
FontSize="11"
|
|
Foreground="Black"
|
|
Text="{Binding TaskType}" />
|
|
</Border>
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
|
|
<StackPanel Grid.Column="2"
|
|
Orientation="Horizontal"
|
|
VerticalAlignment="Bottom">
|
|
<Button Content="添加任务"
|
|
Background="#232323"
|
|
Command="{Binding AddTaskCommand}" />
|
|
<Button Content="清除任务"
|
|
Background="#232323"
|
|
Command="{Binding ClearTasksCommand}" />
|
|
<Button Content="重置任务"
|
|
Background="#232323"
|
|
Command="{Binding ResetTasksCommand}" />
|
|
<Button Content="强制下一步"
|
|
Background="#232323"
|
|
Command="{Binding NextTasksCommand}" />
|
|
<!--<Button Content="保存" />
|
|
<Button Content="取消" />-->
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
</UserControl>
|