|
@@ -16,6 +16,7 @@ using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
using System.Windows.Forms;
|
|
|
+using static DevExpress.Utils.Drawing.Helpers.NativeMethods;
|
|
|
|
|
|
namespace DataSimulation.Forms.EditForms
|
|
|
{
|
|
@@ -56,19 +57,19 @@ namespace DataSimulation.Forms.EditForms
|
|
|
.UseExportImg()
|
|
|
.UseExportXlsx()
|
|
|
.UseExportCsv()
|
|
|
- .UseFlightLine(res =>
|
|
|
- {
|
|
|
- (bool isShowPopup, XtraUserControl frm) = res;
|
|
|
- if (isShowPopup)
|
|
|
- {
|
|
|
- DxHelper.PopupHelper.ShowPopup(frm, mapControl, 400);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
-
|
|
|
- DxHelper.PopupHelper.HidePopup(frm);
|
|
|
- }
|
|
|
- })
|
|
|
+ //.UseFlightLine(res =>
|
|
|
+ //{
|
|
|
+ // (bool isShowPopup, XtraUserControl frm) = res;
|
|
|
+ // if (isShowPopup)
|
|
|
+ // {
|
|
|
+ // DxHelper.PopupHelper.ShowPopup(frm, mapControl, 400);
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+
|
|
|
+ // DxHelper.PopupHelper.HidePopup(frm);
|
|
|
+ // }
|
|
|
+ //})
|
|
|
.SetMapLayerType(null)
|
|
|
.UseDrawRect(rect =>
|
|
|
{
|
|
@@ -76,15 +77,12 @@ namespace DataSimulation.Forms.EditForms
|
|
|
});
|
|
|
|
|
|
var hjList = await SimulationCache.GetAllAsync();
|
|
|
- // this.txtHj.UseDefault();
|
|
|
- // this.txtHj.SetData(hjList, nameof(SimulationInfo.SimulationName));
|
|
|
this.txtHj.Properties.DataSource = hjList;
|
|
|
this.txtHj.Properties.ValueMember = nameof(SimulationInfo);
|
|
|
- // this.txtHj.Properties.KeyMember = nameof(SimulationInfo.CreateTime);
|
|
|
+ // this.txtHj.Properties.KeyMember = nameof(SimulationInfo.CreateTime);
|
|
|
this.txtHj.Properties.DisplayMember = nameof(SimulationInfo.SimulationName);
|
|
|
this.txtHj.SetSearchGridLookUpEditMultiSelected<SimulationInfo>();
|
|
|
|
|
|
-
|
|
|
using (SimulationContext db = new SimulationContext())
|
|
|
{
|
|
|
var sats = await db.SatInfos.ToListAsync();
|
|
@@ -224,11 +222,18 @@ namespace DataSimulation.Forms.EditForms
|
|
|
private void txtHj_EditValueChanged(object sender, EventArgs e)
|
|
|
{
|
|
|
var selectedValue = txtHj.Properties.Tag.MapTo<List<SimulationInfo>>();
|
|
|
- if (selectedValue != null) {
|
|
|
- for (int i = 0; i < selectedValue.Count(); i++)
|
|
|
+ if (selectedValue != null)
|
|
|
+ {
|
|
|
+ List<FlightInfo> flightInfos = new List<FlightInfo>();
|
|
|
+ foreach (var item in selectedValue)
|
|
|
{
|
|
|
-
|
|
|
+ var simulationPonitInfo = SimulationCache.GetAllByIDAsync(item.ID, item.CreateTime).Result;
|
|
|
+ var flinfo = new FlightInfo(item.SimulationName, item.SimulationSpeed);
|
|
|
+ var fpoinits = simulationPonitInfo.Select(s => new FlightData(s.SimulationLon, s.SimulationLat));
|
|
|
+ flinfo.flights.AddRange(fpoinits);
|
|
|
+ flightInfos.Add(flinfo);
|
|
|
}
|
|
|
+ mapControl.SetFlightLine(flightInfos);
|
|
|
}
|
|
|
}
|
|
|
}
|