gongqiuhong 1 year ago
parent
commit
6256e82245

+ 1 - 0
DataSimulation.Forms/DataSimulation.Forms.csproj

@@ -259,6 +259,7 @@
     <EmbeddedResource Include="MainForm.resx">
       <DependentUpon>MainForm.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Properties\licenses.licx" />
     <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>

+ 13 - 4
DataSimulation.Forms/EditForms/TaskEditor.cs

@@ -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
 {
@@ -80,7 +81,7 @@ namespace DataSimulation.Forms.EditForms
             // 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>();
 
@@ -224,11 +225,19 @@ 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);
             }
         }
     }

+ 16 - 1
DataSimulation.Forms/ExtensionsDev/SearchLookUpEditExtension.cs

@@ -119,10 +119,25 @@ namespace ExtensionsDev
             //var keys = new List<string>();
             var texts = new List<string>();
             ctrl.Properties.Tag = values;
-           // ctrl.Tag = keys;
+            // ctrl.Tag = keys;
+            ctrl.Popup += (s, e) =>
+            {
+                view.ClearSelection();
+                view.BeginSelection();
+                for (int i = 0; i < view.RowCount; i++)
+                {
+                    var value = view.GetRow(i);
+                    if (values.Any(a=>a.ToJsonStr()==value.ToJsonStr()))
+                    {
+                        view.SelectRow(i);
+                    }
+                }
+                view.EndSelection();    
+            };
             ctrl.CloseUp += (s, e) =>
             {
                 values.Clear();
+                texts.Clear();
                 var indexs = view.GetSelectedRows();
                 foreach ( var row in indexs )
                 {

+ 6 - 0
DataSimulation.Forms/Properties/licenses.licx

@@ -0,0 +1,6 @@
+DevExpress.XtraEditors.ImageComboBoxEdit, DevExpress.XtraEditors.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.SearchLookUpEdit, DevExpress.XtraGrid.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraMap.MapControl, DevExpress.XtraMap.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a