修改删除飞机没有吧原点清空的bug
地图切换后操作不同的bug
This commit is contained in:
parent
7ea00c6855
commit
beb927a08c
@ -602,7 +602,7 @@ namespace Plane.FormationCreator.Formation
|
||||
Tasks.Add(newTask);
|
||||
TaskAdded?.Invoke(this, new FlightTaskAddedEventArgs { LastTask = lastTask, AddedTask = newTask });
|
||||
}
|
||||
Alert.Show("导入完成!");
|
||||
// Alert.Show("导入完成!");
|
||||
/*
|
||||
Dictionary<int, string[]> PointDic = new Dictionary<int, string[]>();
|
||||
foreach (string line in lines)
|
||||
@ -1982,7 +1982,7 @@ namespace Plane.FormationCreator.Formation
|
||||
int destNum = kv.Key;
|
||||
Message.Show(moveCopterNum);
|
||||
}
|
||||
AvoidCrashLog.Clear();
|
||||
AvoidCrashLog.Clear(); //可能有丢失
|
||||
}
|
||||
catch // 林俊清, 20151102, 通常是“集合已修改”异常。
|
||||
{
|
||||
@ -2011,9 +2011,8 @@ namespace Plane.FormationCreator.Formation
|
||||
{
|
||||
if (copter != anotherCopter && copter.IsTooCloseTo(anotherCopter, out distance))
|
||||
{
|
||||
//防止卡顿
|
||||
//防止卡顿,单加任务来显示
|
||||
AvoidCrashLog.Add(1, $"{copter.Name} 与 {anotherCopter.Name} 距离过近,间距{distance}米。");
|
||||
// Message.Show($"{copter.Name} 与 {anotherCopter.Name} 距离过近,间距{distance}米。");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -283,9 +283,9 @@ namespace Plane.FormationCreator.ViewModels
|
||||
await copter.GetCopterDataAsync();
|
||||
_copterManager.Copters.AddCopter(copter);
|
||||
_copterManager.CopterStatus.Add(false);
|
||||
if (_flightTaskManager.OriginLat == 0 && _flightTaskManager.OriginLng == 0)
|
||||
_flightTaskManager.SetOriginal();
|
||||
}
|
||||
if (_flightTaskManager.OriginLat == 0 && _flightTaskManager.OriginLng == 0)
|
||||
_flightTaskManager.SetOriginal();
|
||||
}));
|
||||
}
|
||||
}
|
||||
@ -371,6 +371,8 @@ namespace Plane.FormationCreator.ViewModels
|
||||
//UdpServerConnectionManager.Instance.ClearConnections();
|
||||
_virtualCopterId = 1;
|
||||
_lastVirtualCopterLocation = null;
|
||||
_flightTaskManager.OriginLat = 0;
|
||||
_flightTaskManager.OriginLng = 0;
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
@ -357,7 +357,7 @@ namespace Plane.FormationCreator.ViewModels
|
||||
|
||||
|
||||
}
|
||||
Alert.Show("导入完成!", "提示");
|
||||
// Alert.Show("导入完成!", "提示");
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
@ -41,17 +41,23 @@ namespace Plane.FormationCreator.Views
|
||||
/// </summary>
|
||||
public partial class MapView : UserControl
|
||||
{
|
||||
public void initmap()
|
||||
{
|
||||
|
||||
gmap.MinZoom = 2; //最小缩放
|
||||
gmap.MaxZoom = 30; //最大缩放
|
||||
gmap.Zoom = 19; //当前缩放
|
||||
gmap.ShowCenter = true; //不显示中心十字点
|
||||
gmap.DragButton = MouseButton.Middle; //中键拖拽地图
|
||||
}
|
||||
|
||||
public MapView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.DataContext = ServiceLocator.Current.GetInstance<MapViewModel>();
|
||||
gmap.MapProvider = GMapProviders.BingHybridMap; //google china 地图
|
||||
gmap.MinZoom = 2; //最小缩放
|
||||
gmap.MaxZoom = 30; //最大缩放
|
||||
gmap.Zoom = 19; //当前缩放
|
||||
gmap.ShowCenter = true; //不显示中心十字点
|
||||
gmap.DragButton = MouseButton.Middle; //左键拖拽地图
|
||||
initmap();
|
||||
gmap.Position = new LatLng(40.07734857737275, 116.34323845862502).ToGCJ02();
|
||||
|
||||
_mapManager.MapView = this;
|
||||
@ -509,11 +515,7 @@ namespace Plane.FormationCreator.Views
|
||||
break;
|
||||
}
|
||||
|
||||
gmap.MinZoom = 2; //最小缩放
|
||||
gmap.MaxZoom = 30; //最大缩放
|
||||
gmap.Zoom = 19; //当前缩放
|
||||
gmap.ShowCenter = false; //不显示中心十字点
|
||||
gmap.DragButton = MouseButton.Left; //左键拖拽地图
|
||||
initmap();
|
||||
|
||||
/*
|
||||
switch ((e.AddedItems[0] as FrameworkElement).Tag.ToString())
|
||||
|
Loading…
Reference in New Issue
Block a user