添加了google中国和高德地图的切换
备份给中科浩电版本 限定时间为2019-06-20之前
This commit is contained in:
parent
039f2a57af
commit
de05946d2c
@ -19,6 +19,19 @@ namespace Plane.FormationCreator.Formation
|
|||||||
/// <param name="baseSemObjects"></param>
|
/// <param name="baseSemObjects"></param>
|
||||||
public int AddCopter(ICopter entityObject)
|
public int AddCopter(ICopter entityObject)
|
||||||
{
|
{
|
||||||
|
DateTime dateTime2019 = DateTime.Parse("2019-06-20");
|
||||||
|
|
||||||
|
if (DateTime.UtcNow > dateTime2019)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (this.Count >= 50)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int _index = 0;
|
int _index = 0;
|
||||||
if (this.Count == 0)
|
if (this.Count == 0)
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
WindowTransitionsEnabled="False"
|
WindowTransitionsEnabled="False"
|
||||||
FontFamily="Microsoft YaHei"
|
FontFamily="Microsoft YaHei"
|
||||||
WindowState="Maximized"
|
WindowState="Maximized"
|
||||||
Title="无人机编队控制中心-飞行魔方科技"
|
Title="无人机编队控制中心"
|
||||||
PreviewKeyDown="MetroWindow_PreviewKeyDown"
|
PreviewKeyDown="MetroWindow_PreviewKeyDown"
|
||||||
PreviewKeyUp="MetroWindow_PreviewKeyUp"
|
PreviewKeyUp="MetroWindow_PreviewKeyUp"
|
||||||
Style="{StaticResource VSWindowStyleKey}"
|
Style="{StaticResource VSWindowStyleKey}"
|
||||||
@ -42,12 +42,14 @@
|
|||||||
|
|
||||||
<c:MetroWindow.RightWindowCommands>
|
<c:MetroWindow.RightWindowCommands>
|
||||||
<c:WindowCommands>
|
<c:WindowCommands>
|
||||||
<Button Content="切换地图" Command="{Binding ChangeMapModeCommand}"></Button>
|
<Button Content="切换地图" Visibility="Collapsed" Command="{Binding ChangeMapModeCommand}"></Button>
|
||||||
<Button Content="{Binding AppEx.ShowModifyTaskView, Converter={StaticResource ShowModifyTaskViewButtonContentConverter}}"
|
<Button Content="{Binding AppEx.ShowModifyTaskView, Converter={StaticResource ShowModifyTaskViewButtonContentConverter}}"
|
||||||
Command="{Binding ShowOrHideModifyTaskViewCommand}" />
|
Command="{Binding ShowOrHideModifyTaskViewCommand}" />
|
||||||
<Button Content="重启监听"
|
<Button Content="重启监听"
|
||||||
|
Visibility="Collapsed"
|
||||||
Command="{Binding RestartListeningCommand}" />
|
Command="{Binding RestartListeningCommand}" />
|
||||||
<Button Content="{Binding SwitchVelocityModeButtonContent}"
|
<Button Content="{Binding SwitchVelocityModeButtonContent}"
|
||||||
|
Visibility="Collapsed"
|
||||||
Command="{Binding SwitchVelocityModeCommand}" />
|
Command="{Binding SwitchVelocityModeCommand}" />
|
||||||
<!--// 林俊清, 20150930, 不分这些模式了。
|
<!--// 林俊清, 20150930, 不分这些模式了。
|
||||||
<Button Content="进入任务模式"
|
<Button Content="进入任务模式"
|
||||||
@ -60,16 +62,20 @@
|
|||||||
Visibility="{Binding Source={x:Static local:AppEx.Current}, Path=AppMode, Converter={StaticResource AppModeToVisibilityConverter}, ConverterParameter=SwitchToControllingCoptersModeButton}" />-->
|
Visibility="{Binding Source={x:Static local:AppEx.Current}, Path=AppMode, Converter={StaticResource AppModeToVisibilityConverter}, ConverterParameter=SwitchToControllingCoptersModeButton}" />-->
|
||||||
<Button Name="btnShowLog"
|
<Button Name="btnShowLog"
|
||||||
Content="日志"
|
Content="日志"
|
||||||
|
Visibility="Collapsed"
|
||||||
Click="btnShowLog_Click"
|
Click="btnShowLog_Click"
|
||||||
/>
|
/>
|
||||||
<Button Content="地图透明"
|
<Button Content="地图透明"
|
||||||
|
Visibility="Collapsed"
|
||||||
Click="Map_Opacity_Click"
|
Click="Map_Opacity_Click"
|
||||||
/>
|
/>
|
||||||
<Button Name="btnGoHome"
|
<Button Name="btnGoHome"
|
||||||
Content="回家"
|
Content="回家"
|
||||||
|
Visibility="Collapsed"
|
||||||
Click="btnGoHome_Click" />
|
Click="btnGoHome_Click" />
|
||||||
<Button Name="btnRefreshMap"
|
<Button Name="btnRefreshMap"
|
||||||
Content="刷新地图"
|
Content="刷新地图"
|
||||||
|
Visibility="Collapsed"
|
||||||
Click="btnRefreshMap_Click" />
|
Click="btnRefreshMap_Click" />
|
||||||
<Button Name="btnConnect"
|
<Button Name="btnConnect"
|
||||||
Content="连接"
|
Content="连接"
|
||||||
@ -133,7 +139,7 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!--
|
||||||
<TabControl SelectedIndex="{Binding MapMode,UpdateSourceTrigger=PropertyChanged}">
|
<TabControl SelectedIndex="{Binding MapMode,UpdateSourceTrigger=PropertyChanged}">
|
||||||
<TabItem Visibility="Collapsed">
|
<TabItem Visibility="Collapsed">
|
||||||
<v:MapView x:Name="map"/>
|
<v:MapView x:Name="map"/>
|
||||||
@ -142,12 +148,12 @@
|
|||||||
<v:View3D/>
|
<v:View3D/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
|
-->
|
||||||
<!--
|
|
||||||
|
|
||||||
<v:MapView x:Name="map"/>
|
<v:MapView x:Name="map"/>
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
<v:TaskBarView
|
<v:TaskBarView
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:Plane.FormationCreator"
|
xmlns:local="clr-namespace:Plane.FormationCreator"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="修改参数" Height="457.765" Width="669.987" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
|
Title="修改参数" Height="242.765" Width="618.987" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
|
||||||
<Grid Margin="0,0,5,3.5">
|
<Grid Margin="0,0,5,3.5">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
@ -13,7 +13,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<WrapPanel>
|
<WrapPanel>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="2" >
|
<StackPanel Orientation="Horizontal" Margin="2" Visibility="Collapsed">
|
||||||
<Button Content="检测通信" Tag="FS_GCS_ENABLE" Click="Modify_Select" Width="130"/>
|
<Button Content="检测通信" Tag="FS_GCS_ENABLE" Click="Modify_Select" Width="130"/>
|
||||||
<Label Content="_FS_GCS_ENABLE 0:关闭 1开启"/>
|
<Label Content="_FS_GCS_ENABLE 0:关闭 1开启"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -28,42 +28,42 @@
|
|||||||
<Label Content="_NTF_LED_BRIGHT 1-3"/>
|
<Label Content="_NTF_LED_BRIGHT 1-3"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="2">
|
<StackPanel Orientation="Horizontal" Margin="2" Visibility="Collapsed">
|
||||||
<Button Content="GPS类型灯光" Tag="NTF_G_RTKTEST" Click="Modify_Select" Width="130"/>
|
<Button Content="GPS类型灯光" Tag="NTF_G_RTKTEST" Click="Modify_Select" Width="130"/>
|
||||||
<Label Content="_NTF_G_RTKTEST 0:关闭 1:开启"/>
|
<Label Content="_NTF_G_RTKTEST 0:关闭 1:开启"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="2">
|
<StackPanel Orientation="Horizontal" Margin="2" Visibility="Collapsed">
|
||||||
<Button Content="气压计GPS类型" Tag="EK2_ALT_GPS" Click="Modify_Select" Width="130"/>
|
<Button Content="气压计GPS类型" Tag="EK2_ALT_GPS" Click="Modify_Select" Width="130"/>
|
||||||
<Label Content="_EK2_ALT_GPS 1-6"/>
|
<Label Content="_EK2_ALT_GPS 1-6"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="2">
|
<StackPanel Orientation="Horizontal" Margin="2" Visibility="Collapsed">
|
||||||
<Button Content="最低解锁电压" Tag="ARMING_VOLT_MIN" Click="Modify_Select" Width="130"/>
|
<Button Content="最低解锁电压" Tag="ARMING_VOLT_MIN" Click="Modify_Select" Width="130"/>
|
||||||
<Label Content="_ARMING_VOLT_MIN"/>
|
<Label Content="_ARMING_VOLT_MIN"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="2">
|
<StackPanel Orientation="Horizontal" Margin="2" >
|
||||||
<Button Content="返航灯光" Tag="NTF_G_RTLOFF" Click="Modify_Select" Width="130"/>
|
<Button Content="返航灯光" Tag="NTF_G_RTLOFF" Click="Modify_Select" Width="130"/>
|
||||||
<Label Content="_NTF_G_RTLOFF"/>
|
<Label Content="_NTF_G_RTLOFF"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="2">
|
<StackPanel Orientation="Horizontal" Margin="2" Visibility="Collapsed">
|
||||||
<Button Content="航点灯光" Tag="WAYPOINT_GLED" Click="Modify_Select" Width="130"/>
|
<Button Content="航点灯光" Tag="WAYPOINT_GLED" Click="Modify_Select" Width="130"/>
|
||||||
<Label Content="_WAYPOINT_GLED"/>
|
<Label Content="_WAYPOINT_GLED"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="2">
|
<StackPanel Orientation="Horizontal" Margin="2" Visibility="Collapsed">
|
||||||
<Button Content="解锁检查" Tag="ARMING_CHECK" Click="Modify_Select" Width="130"/>
|
<Button Content="解锁检查" Tag="ARMING_CHECK" Click="Modify_Select" Width="130"/>
|
||||||
<Label Content="_ARMING_CHECK 414"/>
|
<Label Content="_ARMING_CHECK 414"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="2">
|
<StackPanel Orientation="Horizontal" Margin="2" Visibility="Collapsed">
|
||||||
<Button Content="解锁GPS类型" Tag="ARMING_GPS_LEVEL" Click="Modify_Select" Width="130"/>
|
<Button Content="解锁GPS类型" Tag="ARMING_GPS_LEVEL" Click="Modify_Select" Width="130"/>
|
||||||
<Label Content="_ARMING_GPS_LEVEL 1-6"/>
|
<Label Content="_ARMING_GPS_LEVEL 1-6"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="2">
|
<StackPanel Orientation="Horizontal" Margin="2" Visibility="Collapsed">
|
||||||
<Button Content="返航GPS类型" Tag="FS_GPS_RTL" Click="Modify_Select" Width="130"/>
|
<Button Content="返航GPS类型" Tag="FS_GPS_RTL" Click="Modify_Select" Width="130"/>
|
||||||
<Label Content="_FS_GPS_RTL 1-6"/>
|
<Label Content="_FS_GPS_RTL 1-6"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -77,7 +77,7 @@
|
|||||||
<StackPanel Grid.Column="1" HorizontalAlignment="Center" Orientation ="Horizontal">
|
<StackPanel Grid.Column="1" HorizontalAlignment="Center" Orientation ="Horizontal">
|
||||||
<WrapPanel VerticalAlignment="Center" Orientation="Vertical" >
|
<WrapPanel VerticalAlignment="Center" Orientation="Vertical" >
|
||||||
<Label x:Name="label" Content="参数名称" Margin="5,0,5,5"/>
|
<Label x:Name="label" Content="参数名称" Margin="5,0,5,5"/>
|
||||||
<TextBox x:Name="textParamName" Width="160" Margin="5"/>
|
<TextBox x:Name="textParamName" Width="160" Margin="5" IsReadOnly="True"/>
|
||||||
<Label x:Name="label_Copy" Content="参数值" Margin="5"/>
|
<Label x:Name="label_Copy" Content="参数值" Margin="5"/>
|
||||||
<TextBox x:Name="textParamValue" Margin="5"/>
|
<TextBox x:Name="textParamValue" Margin="5"/>
|
||||||
<Button x:Name="btnModify" Content="修改" Width="100" Margin="10" Click="btnModify_Click"/>
|
<Button x:Name="btnModify" Content="修改" Width="100" Margin="10" Click="btnModify_Click"/>
|
||||||
|
@ -128,6 +128,11 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
{
|
{
|
||||||
return _AddVirtualCopterCommand ?? (_AddVirtualCopterCommand = new RelayCommand<int>(async addcount =>
|
return _AddVirtualCopterCommand ?? (_AddVirtualCopterCommand = new RelayCommand<int>(async addcount =>
|
||||||
{
|
{
|
||||||
|
if (_copterManager.Copters.Count() >= 50)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var center = _mapManager.Center;
|
var center = _mapManager.Center;
|
||||||
string id;
|
string id;
|
||||||
|
|
||||||
|
@ -380,7 +380,7 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
double minlat = 0;
|
double minlat = 0;
|
||||||
|
|
||||||
double avgl = 0;
|
double avgl = 0;
|
||||||
|
/*
|
||||||
if (_copterManager.SelectedCopters.Count() > 2)
|
if (_copterManager.SelectedCopters.Count() > 2)
|
||||||
{
|
{
|
||||||
List<FlightTaskSingleCopterInfo> selectTaskInfos = new List<FlightTaskSingleCopterInfo>();
|
List<FlightTaskSingleCopterInfo> selectTaskInfos = new List<FlightTaskSingleCopterInfo>();
|
||||||
@ -400,8 +400,8 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
selectTaskInfos[i].TargetLat = minlat + i * tlat;
|
selectTaskInfos[i].TargetLat = minlat + i * tlat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
if (Alert.Show("本操作将导致飞机位置重新排列,编号最小的飞机在最上边,您确定要继续吗?", "提示", MessageBoxButton.OKCancel, MessageBoxImage.Warning)
|
if (Alert.Show("本操作将导致飞机位置重新排列,编号最小的飞机在最上边,您确定要继续吗?", "提示", MessageBoxButton.OKCancel, MessageBoxImage.Warning)
|
||||||
== MessageBoxResult.OK)
|
== MessageBoxResult.OK)
|
||||||
{
|
{
|
||||||
@ -462,7 +462,7 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
|
|
||||||
// await Task.Delay(100); // 如果不等待一段时间,很可能会再触发 DataStreamReceived 事件导致飞行器重新出现在地图上。
|
// await Task.Delay(100); // 如果不等待一段时间,很可能会再触发 DataStreamReceived 事件导致飞行器重新出现在地图上。
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,16 +75,17 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Label Target="{Binding ElementName=txtIPs}"
|
<Label Target="{Binding ElementName=txtIPs}" Visibility="Collapsed"
|
||||||
Content="IP" />
|
Content="IP" />
|
||||||
<TextBox Name="txtIPs"
|
<TextBox Name="txtIPs"
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
AcceptsReturn="True"
|
AcceptsReturn="True"
|
||||||
MinHeight="200"
|
MinHeight="200"
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||||
|
Visibility="Collapsed"
|
||||||
Text="{Binding IPs, UpdateSourceTrigger=PropertyChanged}" />
|
Text="{Binding IPs, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal"
|
<StackPanel Orientation="Horizontal" Visibility="Collapsed"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.ColumnSpan="3">
|
Grid.ColumnSpan="3">
|
||||||
@ -124,7 +125,7 @@
|
|||||||
CommandParameter="UDP" />-->
|
CommandParameter="UDP" />-->
|
||||||
<Button Content="关闭TCP" Margin="5" Command="{Binding CloseCommand}"/>
|
<Button Content="关闭TCP" Margin="5" Command="{Binding CloseCommand}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal"
|
<StackPanel Orientation="Horizontal" Visibility="Collapsed"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Grid.ColumnSpan="3">
|
Grid.ColumnSpan="3">
|
||||||
@ -139,12 +140,12 @@
|
|||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
Grid.ColumnSpan="3">
|
Grid.ColumnSpan="3">
|
||||||
<TextBox Margin="2,5,5,5" Width="30" Text="{Binding CopterNum}"></TextBox>
|
<TextBox Margin="2,5,5,5" Width="30" Text="{Binding CopterNum}"></TextBox>
|
||||||
<Button Content="广播编号" Margin="5,5,0,5" Command="{Binding Path=WriteIdCommand}" />
|
<Button Content="对频" Margin="5,5,0,5" Command="{Binding Path=WriteIdCommand}" />
|
||||||
<Button Content="闪灯" Margin="5" Command="{Binding CommDataAsync}"/>
|
<Button Content="闪灯" Visibility="Collapsed" Margin="5" Command="{Binding CommDataAsync}"/>
|
||||||
<Button Content="搜索飞机" Margin="5" Command="{Binding QueryAllCopterCommand}"/>
|
<Button Content="搜索飞机" Visibility="Collapsed" Margin="5" Command="{Binding QueryAllCopterCommand}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal"
|
<StackPanel Orientation="Horizontal" Visibility="Collapsed"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Grid.Row="4"
|
Grid.Row="4"
|
||||||
Grid.ColumnSpan="3">
|
Grid.ColumnSpan="3">
|
||||||
|
@ -40,13 +40,13 @@
|
|||||||
Command="{Binding GuidAsyncCommand}" />
|
Command="{Binding GuidAsyncCommand}" />
|
||||||
<Button Content="悬停"
|
<Button Content="悬停"
|
||||||
Command="{Binding HoverCommand}" />
|
Command="{Binding HoverCommand}" />
|
||||||
<Button Content="手动"
|
<Button Content="手动" Visibility="Collapsed"
|
||||||
Command="{Binding FloatCommand}" />
|
Command="{Binding FloatCommand}" />
|
||||||
<Button Content="参数"
|
<Button Content="参数"
|
||||||
Command="{Binding ParamModify}" />
|
Command="{Binding ParamModify}" />
|
||||||
<Button Content="参数文件"
|
<Button Content="参数文件" Visibility="Collapsed"
|
||||||
Command="{Binding LoadParamfile}" />
|
Command="{Binding LoadParamfile}" />
|
||||||
<Button Content="版本"
|
<Button Content="版本" Visibility="Collapsed"
|
||||||
Command="{Binding GetVersionsCommand}" />
|
Command="{Binding GetVersionsCommand}" />
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
<WrapPanel>
|
<WrapPanel>
|
||||||
@ -62,13 +62,14 @@
|
|||||||
Command="{Binding LEDFlickerCommand}" />
|
Command="{Binding LEDFlickerCommand}" />
|
||||||
<Button Content="测试" Visibility="Collapsed"
|
<Button Content="测试" Visibility="Collapsed"
|
||||||
Command="{Binding TestCommand}" />
|
Command="{Binding TestCommand}" />
|
||||||
<Button Content="开灯"
|
<Button Content="开灯" Visibility="Collapsed"
|
||||||
Command="{Binding LEDOnOffCommand}"
|
Command="{Binding LEDOnOffCommand}"
|
||||||
CommandParameter="0"/>
|
CommandParameter="0"/>
|
||||||
<Button Content="关灯"
|
<Button Content="关灯" Visibility="Collapsed"
|
||||||
Command="{Binding LEDOnOffCommand}"
|
Command="{Binding LEDOnOffCommand}"
|
||||||
CommandParameter="1"/>
|
CommandParameter="1"/>
|
||||||
<Button Content="电机"
|
<Button Content="电机"
|
||||||
|
Visibility="Collapsed"
|
||||||
Command="{Binding MotorTestCommand}" />
|
Command="{Binding MotorTestCommand}" />
|
||||||
|
|
||||||
<TextBox Width="50"
|
<TextBox Width="50"
|
||||||
@ -78,7 +79,7 @@
|
|||||||
<WrapPanel>
|
<WrapPanel>
|
||||||
<Button Content="选写航点"
|
<Button Content="选写航点"
|
||||||
Command="{Binding WriteMissionSingleCommand}" />
|
Command="{Binding WriteMissionSingleCommand}" />
|
||||||
<Button Content="统计模块"
|
<Button Content="统计模块" Visibility="Collapsed"
|
||||||
Command="{Binding DetectionCommModuleVersion}" />
|
Command="{Binding DetectionCommModuleVersion}" />
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
<Separator/>
|
<Separator/>
|
||||||
@ -89,7 +90,7 @@
|
|||||||
Command="{Binding LockAllCommand}" />
|
Command="{Binding LockAllCommand}" />
|
||||||
<Button Content="检测电压"
|
<Button Content="检测电压"
|
||||||
Command="{Binding DetectionVoltage}" />
|
Command="{Binding DetectionVoltage}" />
|
||||||
<Button Content="统计返回"
|
<Button Content="统计返回"
|
||||||
Command="{Binding DetectionReturnData}" />
|
Command="{Binding DetectionReturnData}" />
|
||||||
<Button Content="统计航点"
|
<Button Content="统计航点"
|
||||||
Command="{Binding DetectionMissionData}" />
|
Command="{Binding DetectionMissionData}" />
|
||||||
|
@ -59,13 +59,13 @@
|
|||||||
Margin="5,0,0,0"
|
Margin="5,0,0,0"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
SelectionChanged="MapSelectionComboBox_SelectionChanged">
|
SelectionChanged="MapSelectionComboBox_SelectionChanged">
|
||||||
<ComboBoxItem Content="卫星地图"
|
<ComboBoxItem Content="Bing地图"
|
||||||
Tag="卫星地图"
|
Tag="Bing地图"
|
||||||
IsSelected="True" />
|
IsSelected="True" />
|
||||||
<ComboBoxItem Content="道路"
|
<ComboBoxItem Content="谷歌地图"
|
||||||
Tag="道路" />
|
Tag="谷歌地图" />
|
||||||
<ComboBoxItem Content="OpenStreet"
|
<ComboBoxItem Content="高德地图"
|
||||||
Tag="OpenStreet" />
|
Tag="高德地图" />
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ using Plane.Windows.Messages;
|
|||||||
using GMap.NET;
|
using GMap.NET;
|
||||||
using GMap.NET.WindowsPresentation;
|
using GMap.NET.WindowsPresentation;
|
||||||
using GMap.NET.MapProviders;
|
using GMap.NET.MapProviders;
|
||||||
|
using System.Globalization;
|
||||||
|
|
||||||
namespace Plane.FormationCreator.Views
|
namespace Plane.FormationCreator.Views
|
||||||
{
|
{
|
||||||
@ -292,7 +293,7 @@ namespace Plane.FormationCreator.Views
|
|||||||
gmap.Zoom = 19;
|
gmap.Zoom = 19;
|
||||||
//map.Center = new Location(40.0559055, 116.322233);
|
//map.Center = new Location(40.0559055, 116.322233);
|
||||||
//gmap.Position = new LatLng(40.6801557090282, 114.670060030638).ToGCJ02();
|
//gmap.Position = new LatLng(40.6801557090282, 114.670060030638).ToGCJ02();
|
||||||
gmap.Position = new PointLatLng(40.1484605429763, 116.293929666281);
|
gmap.Position = new PointLatLng(38.973616, 117.200116);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -476,6 +477,25 @@ namespace Plane.FormationCreator.Views
|
|||||||
|
|
||||||
private void MapSelectionComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void MapSelectionComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
|
switch ((e.AddedItems[0] as FrameworkElement).Tag.ToString())
|
||||||
|
{
|
||||||
|
case "Bing地图":
|
||||||
|
gmap.MapProvider = GMapProviders.BingHybridMap;
|
||||||
|
break;
|
||||||
|
case "谷歌地图":
|
||||||
|
gmap.MapProvider = GMapProviders.GoogleChinaHybridMap;
|
||||||
|
break;
|
||||||
|
case "高德地图":
|
||||||
|
gmap.MapProvider = GMapProviders.AMapStatelite;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
gmap.MinZoom = 2; //最小缩放
|
||||||
|
gmap.MaxZoom = 30; //最大缩放
|
||||||
|
gmap.Zoom = 19; //当前缩放
|
||||||
|
gmap.ShowCenter = false; //不显示中心十字点
|
||||||
|
gmap.DragButton = MouseButton.Left; //左键拖拽地图
|
||||||
|
|
||||||
/*
|
/*
|
||||||
switch ((e.AddedItems[0] as FrameworkElement).Tag.ToString())
|
switch ((e.AddedItems[0] as FrameworkElement).Tag.ToString())
|
||||||
{
|
{
|
||||||
@ -501,6 +521,8 @@ namespace Plane.FormationCreator.Views
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void showallpoint_Checked(object sender, RoutedEventArgs e)
|
private void showallpoint_Checked(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
@ -604,4 +626,6 @@ namespace Plane.FormationCreator.Views
|
|||||||
return GeographyUtils.CalcDistance(loc1.Latitude, loc1.Longitude, loc1.Altitude, loc2.Latitude, loc2.Longitude, loc2.Altitude);
|
return GeographyUtils.CalcDistance(loc1.Latitude, loc1.Longitude, loc1.Altitude, loc2.Latitude, loc2.Longitude, loc2.Altitude);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
xmlns:m="clr-namespace:Plane.FormationCreator.Formation"
|
xmlns:m="clr-namespace:Plane.FormationCreator.Formation"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignWidth="300" Height="420">
|
d:DesignWidth="300" Height="420">
|
||||||
<TabControl>
|
<TabControl Margin="0,0,-120,-11">
|
||||||
|
|
||||||
<TabItem Header="航点设计">
|
<TabItem Header="航点设计">
|
||||||
<TabControl SelectedIndex="{Binding FlightTaskManager.SelectedTask.TaskTypeIndex,UpdateSourceTrigger=PropertyChanged}">
|
<TabControl SelectedIndex="{Binding FlightTaskManager.SelectedTask.TaskTypeIndex,UpdateSourceTrigger=PropertyChanged}">
|
||||||
@ -287,6 +287,19 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="灯光设计">
|
<TabItem Header="灯光设计">
|
||||||
<StackPanel DataContext="{Binding FlightTaskManager.SelectedTask.ModifyingSingleCopterInfo}">
|
<StackPanel DataContext="{Binding FlightTaskManager.SelectedTask.ModifyingSingleCopterInfo}">
|
||||||
|
<StackPanel Visibility="Collapsed">
|
||||||
|
<TextBlock Margin="5,5,0,0" Text="跑马灯"/>
|
||||||
|
<Separator/>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Margin="5,5,0,0" Text="起始时间"/>
|
||||||
|
<TextBox Margin="5,3,0,3" Width="50"/>
|
||||||
|
<TextBlock Margin="10,5,0,0" Text="结束时间"/>
|
||||||
|
<TextBox Margin="5,3,0,3" Width="50" />
|
||||||
|
<TextBlock Margin="10,5,0,0" Text="等分数量"/>
|
||||||
|
<TextBox Margin="5,3,0,3" Width="50" />
|
||||||
|
<Button Margin="10,3,0,3" Width="80" Content="设置"/>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
<Grid >
|
<Grid >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
@ -294,7 +307,7 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="灯光控制: " Margin="5, 10, 5, 0" VerticalAlignment="Center"/>
|
<TextBlock Text="灯光控制" Margin="5, 10, 5, 0" VerticalAlignment="Center"/>
|
||||||
<Grid Grid.Column="1" Grid.ColumnSpan="3" VerticalAlignment="Center">
|
<Grid Grid.Column="1" Grid.ColumnSpan="3" VerticalAlignment="Center">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<ModelVisual3D Content="{Binding Model, UpdateSourceTrigger=PropertyChanged}">
|
<ModelVisual3D Content="{Binding Model, UpdateSourceTrigger=PropertyChanged}">
|
||||||
|
|
||||||
</ModelVisual3D>
|
</ModelVisual3D>
|
||||||
<HelixToolkit:PanoramaCube3D Source="E:\test\3DView\3DView\Models\Opera\"/>
|
<HelixToolkit:PanoramaCube3D Source="Models\Opera\"/>
|
||||||
</HelixToolkit:HelixViewport3D>
|
</HelixToolkit:HelixViewport3D>
|
||||||
|
|
||||||
<StackPanel HorizontalAlignment="Left" Margin="2"
|
<StackPanel HorizontalAlignment="Left" Margin="2"
|
||||||
|
Loading…
Reference in New Issue
Block a user