diff --git a/Plane.FormationCreator/Formation/CopterManager.cs b/Plane.FormationCreator/Formation/CopterManager.cs
index 0be5b9e..74eab3d 100644
--- a/Plane.FormationCreator/Formation/CopterManager.cs
+++ b/Plane.FormationCreator/Formation/CopterManager.cs
@@ -19,6 +19,19 @@ namespace Plane.FormationCreator.Formation
///
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;
if (this.Count == 0)
{
diff --git a/Plane.FormationCreator/MainWindow.xaml b/Plane.FormationCreator/MainWindow.xaml
index 2cc359b..88e30e2 100644
--- a/Plane.FormationCreator/MainWindow.xaml
+++ b/Plane.FormationCreator/MainWindow.xaml
@@ -13,7 +13,7 @@
WindowTransitionsEnabled="False"
FontFamily="Microsoft YaHei"
WindowState="Maximized"
- Title="无人机编队控制中心-飞行魔方科技"
+ Title="无人机编队控制中心"
PreviewKeyDown="MetroWindow_PreviewKeyDown"
PreviewKeyUp="MetroWindow_PreviewKeyUp"
Style="{StaticResource VSWindowStyleKey}"
@@ -42,12 +42,14 @@
-
+
-
+
+
- -->
+
+ Title="修改参数" Height="242.765" Width="618.987" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
@@ -13,7 +13,7 @@
-
+
@@ -28,42 +28,42 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -77,7 +77,7 @@
-
+
diff --git a/Plane.FormationCreator/ViewModels/CopterListViewModel.cs b/Plane.FormationCreator/ViewModels/CopterListViewModel.cs
index 8262439..951d04c 100644
--- a/Plane.FormationCreator/ViewModels/CopterListViewModel.cs
+++ b/Plane.FormationCreator/ViewModels/CopterListViewModel.cs
@@ -128,6 +128,11 @@ namespace Plane.FormationCreator.ViewModels
{
return _AddVirtualCopterCommand ?? (_AddVirtualCopterCommand = new RelayCommand(async addcount =>
{
+ if (_copterManager.Copters.Count() >= 50)
+ {
+ return;
+ }
+
var center = _mapManager.Center;
string id;
diff --git a/Plane.FormationCreator/ViewModels/ModifyTaskViewModel.cs b/Plane.FormationCreator/ViewModels/ModifyTaskViewModel.cs
index 1ef85a5..8cb2233 100644
--- a/Plane.FormationCreator/ViewModels/ModifyTaskViewModel.cs
+++ b/Plane.FormationCreator/ViewModels/ModifyTaskViewModel.cs
@@ -380,7 +380,7 @@ namespace Plane.FormationCreator.ViewModels
double minlat = 0;
double avgl = 0;
-
+ /*
if (_copterManager.SelectedCopters.Count() > 2)
{
List selectTaskInfos = new List();
@@ -400,8 +400,8 @@ namespace Plane.FormationCreator.ViewModels
selectTaskInfos[i].TargetLat = minlat + i * tlat;
}
}
+ */
- /*
if (Alert.Show("本操作将导致飞机位置重新排列,编号最小的飞机在最上边,您确定要继续吗?", "提示", MessageBoxButton.OKCancel, MessageBoxImage.Warning)
== MessageBoxResult.OK)
{
@@ -462,7 +462,7 @@ namespace Plane.FormationCreator.ViewModels
// await Task.Delay(100); // 如果不等待一段时间,很可能会再触发 DataStreamReceived 事件导致飞行器重新出现在地图上。
}
- }*/
+ }
}));
}
}
diff --git a/Plane.FormationCreator/Views/ConnectWindow.xaml b/Plane.FormationCreator/Views/ConnectWindow.xaml
index 151b849..3b02743 100644
--- a/Plane.FormationCreator/Views/ConnectWindow.xaml
+++ b/Plane.FormationCreator/Views/ConnectWindow.xaml
@@ -75,16 +75,17 @@
-
-
@@ -124,7 +125,7 @@
CommandParameter="UDP" />-->
-
@@ -139,12 +140,12 @@
Grid.Row="3"
Grid.ColumnSpan="3">
-
-
-
+
+
+
-
diff --git a/Plane.FormationCreator/Views/ControlPanelView.xaml b/Plane.FormationCreator/Views/ControlPanelView.xaml
index ce8bfb6..e47b355 100644
--- a/Plane.FormationCreator/Views/ControlPanelView.xaml
+++ b/Plane.FormationCreator/Views/ControlPanelView.xaml
@@ -40,13 +40,13 @@
Command="{Binding GuidAsyncCommand}" />
-
-
-
@@ -62,13 +62,14 @@
Command="{Binding LEDFlickerCommand}" />
-
-
-
@@ -89,7 +90,7 @@
Command="{Binding LockAllCommand}" />
-
diff --git a/Plane.FormationCreator/Views/MapView.xaml b/Plane.FormationCreator/Views/MapView.xaml
index 9da0e73..4824f1f 100644
--- a/Plane.FormationCreator/Views/MapView.xaml
+++ b/Plane.FormationCreator/Views/MapView.xaml
@@ -59,13 +59,13 @@
Margin="5,0,0,0"
VerticalAlignment="Top"
SelectionChanged="MapSelectionComboBox_SelectionChanged">
-
-
-
+
+
diff --git a/Plane.FormationCreator/Views/MapView.xaml.cs b/Plane.FormationCreator/Views/MapView.xaml.cs
index 5696589..0c3a5b6 100644
--- a/Plane.FormationCreator/Views/MapView.xaml.cs
+++ b/Plane.FormationCreator/Views/MapView.xaml.cs
@@ -32,6 +32,7 @@ using Plane.Windows.Messages;
using GMap.NET;
using GMap.NET.WindowsPresentation;
using GMap.NET.MapProviders;
+using System.Globalization;
namespace Plane.FormationCreator.Views
{
@@ -292,7 +293,7 @@ namespace Plane.FormationCreator.Views
gmap.Zoom = 19;
//map.Center = new Location(40.0559055, 116.322233);
//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)
{
+ 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())
{
@@ -501,6 +521,8 @@ namespace Plane.FormationCreator.Views
}
*/
}
+
+
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);
}
}
+
+
}
diff --git a/Plane.FormationCreator/Views/ModifyTaskView.xaml b/Plane.FormationCreator/Views/ModifyTaskView.xaml
index 5e5f510..47b2299 100644
--- a/Plane.FormationCreator/Views/ModifyTaskView.xaml
+++ b/Plane.FormationCreator/Views/ModifyTaskView.xaml
@@ -8,7 +8,7 @@
xmlns:m="clr-namespace:Plane.FormationCreator.Formation"
mc:Ignorable="d"
d:DesignWidth="300" Height="420">
-
+
@@ -287,6 +287,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -294,7 +307,7 @@
-
+
diff --git a/Plane.FormationCreator/Views/View3D.xaml b/Plane.FormationCreator/Views/View3D.xaml
index fbeae90..be0274f 100644
--- a/Plane.FormationCreator/Views/View3D.xaml
+++ b/Plane.FormationCreator/Views/View3D.xaml
@@ -18,7 +18,7 @@
-
+