[FlightTaskManager.cs]加入强制下一个 [ModifyTaskViewModel.cs]加入调整所有任务高度 [MapView.xaml.cs]加入是否显示所有点
146 lines
6.4 KiB
XML
146 lines
6.4 KiB
XML
<c:MetroWindow x:Class="Plane.FormationCreator.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:local="clr-namespace:Plane.FormationCreator"
|
|
xmlns:c="http://metro.mahapps.com/winfx/xaml/controls"
|
|
xmlns:m="clr-namespace:Plane.FormationCreator.Formation"
|
|
xmlns:v="clr-namespace:Plane.FormationCreator.Views"
|
|
xmlns:vm="clr-namespace:Plane.FormationCreator.ViewModels"
|
|
xmlns:fc="clr-namespace:Plane.FormationCreator"
|
|
mc:Ignorable="d"
|
|
WindowTransitionsEnabled="False"
|
|
FontFamily="Microsoft YaHei"
|
|
WindowState="Maximized"
|
|
Title="无人机编队控制中心-飞行魔方科技"
|
|
PreviewKeyDown="MetroWindow_PreviewKeyDown"
|
|
PreviewKeyUp="MetroWindow_PreviewKeyUp"
|
|
Style="{StaticResource VSWindowStyleKey}"
|
|
Width="800"
|
|
Height="600">
|
|
|
|
<c:MetroWindow.Resources>
|
|
<Style TargetType="Separator"
|
|
BasedOn="{StaticResource {x:Type Separator}}">
|
|
<Setter Property="Background"
|
|
Value="#555" />
|
|
<Setter Property="Margin"
|
|
Value="0,10" />
|
|
</Style>
|
|
</c:MetroWindow.Resources>
|
|
|
|
<c:MetroWindow.RightWindowCommands>
|
|
<c:WindowCommands>
|
|
<Button Content="{Binding AppEx.ShowModifyTaskView, Converter={StaticResource ShowModifyTaskViewButtonContentConverter}}"
|
|
Command="{Binding ShowOrHideModifyTaskViewCommand}" />
|
|
<Button Content="重启监听"
|
|
Command="{Binding RestartListeningCommand}" />
|
|
<Button Content="{Binding SwitchVelocityModeButtonContent}"
|
|
Command="{Binding SwitchVelocityModeCommand}" />
|
|
<!--// 林俊清, 20150930, 不分这些模式了。
|
|
<Button Content="进入任务模式"
|
|
Command="{Binding SwitchAppModeCommand}"
|
|
CommandParameter="{x:Static m:AppMode.PreparedForRunningTasks}"
|
|
Visibility="{Binding Source={x:Static local:AppEx.Current}, Path=AppMode, Converter={StaticResource AppModeToVisibilityConverter}, ConverterParameter=SwitchToPreparedForRunningTasksModeButton}" />
|
|
<Button Content="进入控制模式"
|
|
Command="{Binding SwitchAppModeCommand}"
|
|
CommandParameter="{x:Static m:AppMode.ControllingCopters}"
|
|
Visibility="{Binding Source={x:Static local:AppEx.Current}, Path=AppMode, Converter={StaticResource AppModeToVisibilityConverter}, ConverterParameter=SwitchToControllingCoptersModeButton}" />-->
|
|
<Button Name="btnGoHome"
|
|
Content="回家"
|
|
Click="btnGoHome_Click" />
|
|
<Button Name="btnRefreshMap"
|
|
Content="刷新地图"
|
|
Click="btnRefreshMap_Click" />
|
|
<Button Name="btnConnect"
|
|
Content="连接"
|
|
Click="btnConnect_Click" />
|
|
</c:WindowCommands>
|
|
</c:MetroWindow.RightWindowCommands>
|
|
|
|
<Grid>
|
|
<Grid.Background>
|
|
<ImageBrush ImageSource=".\bg.jpg"/>
|
|
</Grid.Background>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid Margin="10,20,10,10">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="73*" />
|
|
<ColumnDefinition Width="27*" MinWidth="360" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid Margin="0,0,10,0"
|
|
Width="Auto" >
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<v:MapView x:Name="map"
|
|
/>
|
|
<v:TaskBarView
|
|
x:Name="TaskbarControl"
|
|
VerticalAlignment="Bottom"
|
|
Visibility="{Binding Source={x:Static local:AppEx.Current}, Path=AppMode, Converter={StaticResource AppModeToVisibilityConverter}, ConverterParameter=TaskBarView}" />
|
|
</Grid>
|
|
|
|
|
|
<Grid Margin="0,0,0,0"
|
|
|
|
Grid.Column="1">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<v:CopterListView />
|
|
|
|
<StackPanel Grid.Row="1">
|
|
|
|
|
|
<StackPanel Grid.Row="2"
|
|
Visibility="{Binding AppEx.ShowModifyTaskView, Converter={StaticResource InversiveBooleanToVisibilityConverter}}">
|
|
|
|
<Separator Grid.ColumnSpan="2" />
|
|
<v:ControlPanelView />
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<StackPanel Visibility="{Binding AppEx.ShowModifyTaskView, Converter={StaticResource BooleanToVisibilityConverter}}">
|
|
<Separator />
|
|
<v:ModifyTaskView />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Row="2"
|
|
Visibility="{Binding AppEx.ShowModifyTaskView, Converter={StaticResource InversiveBooleanToVisibilityConverter}}">
|
|
|
|
<Separator Grid.ColumnSpan="2" />
|
|
<v:CopterInfoView DataContext="{Binding Path=CopterListViewModel.SelectedCopter}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
<Border Grid.Row="1"
|
|
Background="{StaticResource HighlightBrush}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Margin="4"
|
|
Text="{Binding Message}" />
|
|
<TextBlock Margin="4"
|
|
Text="{Binding CopterListViewModel.SelectedCopter.StatusText}" />
|
|
</StackPanel>
|
|
</Border>
|
|
</Grid>
|
|
|
|
</c:MetroWindow>
|