gongqiuhong 1 year ago
parent
commit
406454b341

+ 1 - 0
XdCxRhDW.App/Controllers/PosController.cs

@@ -2391,6 +2391,7 @@ namespace XdCxRhDW.App.Controllers
                 ColorKey = res.ColorKey,
                 CreateTime = res.CreateTime,
                 CxResID = res.CxResID,
+                CheckResID=res.CheckResID,
                 Selected = res.Selected,
                 StationResID = res.StationResID,
                 TargetID = res.TargetID,

+ 3 - 3
XdCxRhDW.App/EditForms/EditorTar.Designer.cs

@@ -72,7 +72,7 @@
             this.btnOk.Size = new System.Drawing.Size(105, 22);
             this.btnOk.StyleController = this.layoutControl1;
             this.btnOk.TabIndex = 8;
-            this.btnOk.Text = "确定";
+            this.btnOk.Text = "确定q";
             this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
             // 
             // btnCancel
@@ -87,13 +87,13 @@
             // 
             // searchLookUpEdit1
             // 
-            this.searchLookUpEdit1.Location = new System.Drawing.Point(22, 40);
+            this.searchLookUpEdit1.Location = new System.Drawing.Point(22, 39);
             this.searchLookUpEdit1.Name = "searchLookUpEdit1";
             this.searchLookUpEdit1.Properties.AutoHeight = false;
             this.searchLookUpEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
             this.searchLookUpEdit1.Properties.PopupView = this.searchLookUpEdit1View;
-            this.searchLookUpEdit1.Size = new System.Drawing.Size(214, 22);
+            this.searchLookUpEdit1.Size = new System.Drawing.Size(214, 23);
             this.searchLookUpEdit1.StyleController = this.layoutControl1;
             this.searchLookUpEdit1.TabIndex = 4;
             // 

+ 48 - 13
XdCxRhDW.App/EditForms/TargetEditor.Designer.cs

@@ -38,6 +38,8 @@
             this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
             this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
+            this.txtTarColor = new DevExpress.XtraEditors.ColorPickEdit();
+            this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.txtTarName.Properties)).BeginInit();
@@ -47,10 +49,13 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtTarColor.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
             // 
+            this.layoutControl1.Controls.Add(this.txtTarColor);
             this.layoutControl1.Controls.Add(this.btnOk);
             this.layoutControl1.Controls.Add(this.btnCancel);
             this.layoutControl1.Controls.Add(this.txtTarName);
@@ -59,13 +64,13 @@
             this.layoutControl1.Name = "layoutControl1";
             this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(831, 101, 650, 400);
             this.layoutControl1.Root = this.Root;
-            this.layoutControl1.Size = new System.Drawing.Size(258, 158);
+            this.layoutControl1.Size = new System.Drawing.Size(258, 196);
             this.layoutControl1.TabIndex = 0;
             this.layoutControl1.Text = "layoutControl1";
             // 
             // btnOk
             // 
-            this.btnOk.Location = new System.Drawing.Point(131, 104);
+            this.btnOk.Location = new System.Drawing.Point(131, 142);
             this.btnOk.Name = "btnOk";
             this.btnOk.Size = new System.Drawing.Size(105, 22);
             this.btnOk.StyleController = this.layoutControl1;
@@ -75,7 +80,7 @@
             // 
             // btnCancel
             // 
-            this.btnCancel.Location = new System.Drawing.Point(22, 104);
+            this.btnCancel.Location = new System.Drawing.Point(22, 142);
             this.btnCancel.Name = "btnCancel";
             this.btnCancel.Size = new System.Drawing.Size(105, 22);
             this.btnCancel.StyleController = this.layoutControl1;
@@ -85,10 +90,10 @@
             // 
             // txtTarName
             // 
-            this.txtTarName.Location = new System.Drawing.Point(22, 50);
+            this.txtTarName.Location = new System.Drawing.Point(22, 49);
             this.txtTarName.Name = "txtTarName";
             this.txtTarName.Properties.AutoHeight = false;
-            this.txtTarName.Size = new System.Drawing.Size(214, 22);
+            this.txtTarName.Size = new System.Drawing.Size(214, 23);
             this.txtTarName.StyleController = this.layoutControl1;
             this.txtTarName.TabIndex = 5;
             // 
@@ -101,16 +106,17 @@
             this.layoutControlItem2,
             this.layoutControlItem4,
             this.layoutControlItem5,
-            this.emptySpaceItem2});
+            this.emptySpaceItem2,
+            this.layoutControlItem1});
             this.Root.Name = "Root";
             this.Root.Padding = new DevExpress.XtraLayout.Utils.Padding(20, 20, 20, 20);
-            this.Root.Size = new System.Drawing.Size(258, 158);
+            this.Root.Size = new System.Drawing.Size(258, 196);
             this.Root.TextVisible = false;
             // 
             // emptySpaceItem1
             // 
             this.emptySpaceItem1.AllowHotTrack = false;
-            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 108);
+            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 146);
             this.emptySpaceItem1.Name = "emptySpaceItem1";
             this.emptySpaceItem1.Size = new System.Drawing.Size(218, 10);
             this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
@@ -133,7 +139,7 @@
             // layoutControlItem4
             // 
             this.layoutControlItem4.Control = this.btnCancel;
-            this.layoutControlItem4.Location = new System.Drawing.Point(0, 82);
+            this.layoutControlItem4.Location = new System.Drawing.Point(0, 120);
             this.layoutControlItem4.Name = "layoutControlItem4";
             this.layoutControlItem4.Size = new System.Drawing.Size(109, 26);
             this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
@@ -142,7 +148,7 @@
             // layoutControlItem5
             // 
             this.layoutControlItem5.Control = this.btnOk;
-            this.layoutControlItem5.Location = new System.Drawing.Point(109, 82);
+            this.layoutControlItem5.Location = new System.Drawing.Point(109, 120);
             this.layoutControlItem5.Name = "layoutControlItem5";
             this.layoutControlItem5.Size = new System.Drawing.Size(109, 26);
             this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
@@ -151,16 +157,41 @@
             // emptySpaceItem2
             // 
             this.emptySpaceItem2.AllowHotTrack = false;
-            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 54);
+            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 95);
             this.emptySpaceItem2.Name = "emptySpaceItem2";
-            this.emptySpaceItem2.Size = new System.Drawing.Size(218, 28);
+            this.emptySpaceItem2.Size = new System.Drawing.Size(218, 25);
             this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
             // 
+            // txtTarColor
+            // 
+            this.txtTarColor.EditValue = System.Drawing.Color.Empty;
+            this.txtTarColor.Location = new System.Drawing.Point(22, 93);
+            this.txtTarColor.Name = "txtTarColor";
+            this.txtTarColor.Properties.AutomaticColor = System.Drawing.Color.Black;
+            this.txtTarColor.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.txtTarColor.Properties.NullColor = System.Drawing.Color.Empty;
+            this.txtTarColor.Properties.ShowSystemColors = false;
+            this.txtTarColor.Properties.ShowWebColors = false;
+            this.txtTarColor.Size = new System.Drawing.Size(214, 20);
+            this.txtTarColor.StyleController = this.layoutControl1;
+            this.txtTarColor.TabIndex = 9;
+            // 
+            // layoutControlItem1
+            // 
+            this.layoutControlItem1.Control = this.txtTarColor;
+            this.layoutControlItem1.Location = new System.Drawing.Point(0, 54);
+            this.layoutControlItem1.Name = "layoutControlItem1";
+            this.layoutControlItem1.Size = new System.Drawing.Size(218, 41);
+            this.layoutControlItem1.Text = "目标颜色";
+            this.layoutControlItem1.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItem1.TextSize = new System.Drawing.Size(48, 14);
+            // 
             // TargetEditor
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(258, 158);
+            this.ClientSize = new System.Drawing.Size(258, 196);
             this.Controls.Add(this.layoutControl1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
             this.Name = "TargetEditor";
@@ -175,6 +206,8 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtTarColor.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -191,5 +224,7 @@
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
         private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2;
+        private DevExpress.XtraEditors.ColorPickEdit txtTarColor;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
     }
 }

+ 4 - 0
XdCxRhDW.App/EditForms/TargetEditor.cs

@@ -14,6 +14,7 @@ using System.Windows.Documents;
 using System.Windows.Forms;
 using XdCxRhDW.Entity;
 using XdCxRhDW.Repostory;
+using static DevExpress.Utils.Drawing.Helpers.NativeMethods;
 
 namespace XdCxRhDW.App.EditForms
 {
@@ -41,6 +42,8 @@ namespace XdCxRhDW.App.EditForms
             if (this.Text == "编辑目标" && info != null)
             {
                 this.txtTarName.Text = info.TargetName;
+               var clolrRes = ColorTranslator.FromHtml(info.TargeColor);
+                this.txtTarColor.EditValue = clolrRes;
             }
             infos = new List<TargetInfo>();
             using (RHDWContext db = new RHDWContext())
@@ -71,6 +74,7 @@ namespace XdCxRhDW.App.EditForms
                     return;
                 }
                 info.TargetName = tarName;
+                info.TargeColor=ColorTranslator.ToHtml(txtTarColor.Color);
                 this.DialogResult = DialogResult.OK;
             }
             catch (Exception ex)

+ 74 - 0
XdCxRhDW.App/PopupControl/ShowCheckCtrl.Designer.cs

@@ -0,0 +1,74 @@
+namespace XdCxRhDW.App.PopupControl
+{
+    partial class ShowCheckCtrl
+    {
+        /// <summary> 
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Component Designer generated code
+
+        /// <summary> 
+        /// Required method for Designer support - do not modify 
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.gridShowCheck = new DevExpress.XtraGrid.GridControl();
+            this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
+            ((System.ComponentModel.ISupportInitialize)(this.gridShowCheck)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // gridShowCheck
+            // 
+            this.gridShowCheck.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.gridShowCheck.Location = new System.Drawing.Point(0, 0);
+            this.gridShowCheck.MainView = this.gridView1;
+            this.gridShowCheck.Name = "gridShowCheck";
+            this.gridShowCheck.Size = new System.Drawing.Size(834, 310);
+            this.gridShowCheck.TabIndex = 1;
+            this.gridShowCheck.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
+            this.gridView1});
+            // 
+            // gridView1
+            // 
+            this.gridView1.GridControl = this.gridShowCheck;
+            this.gridView1.Name = "gridView1";
+            this.gridView1.CustomDrawEmptyForeground += new DevExpress.XtraGrid.Views.Base.CustomDrawEventHandler(this.gridView1_CustomDrawEmptyForeground);
+            this.gridView1.CustomColumnDisplayText += new DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventHandler(this.gridView1_CustomColumnDisplayText);
+            // 
+            // ShowCheckCtrl
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.gridShowCheck);
+            this.Name = "ShowCheckCtrl";
+            this.Size = new System.Drawing.Size(834, 310);
+            this.Load += new System.EventHandler(this.ShowCxCtrl_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.gridShowCheck)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private DevExpress.XtraGrid.GridControl gridShowCheck;
+        private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
+    }
+}

+ 74 - 0
XdCxRhDW.App/PopupControl/ShowCheckCtrl.cs

@@ -0,0 +1,74 @@
+using DevExpress.XtraEditors;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Data.Entity;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Documents;
+using System.Windows.Forms;
+using XdCxRhDW.App.Model;
+using XdCxRhDW.Entity;
+using XdCxRhDW.Repostory;
+
+namespace XdCxRhDW.App.PopupControl
+{
+    public partial class ShowCheckCtrl : DevExpress.XtraEditors.XtraUserControl
+    {
+        PosRes posItem;
+        List<CheckRes> list = new List<CheckRes>();
+        public ShowCheckCtrl()
+        {
+            InitializeComponent();
+            gridShowCheck.Init<CheckRes>().DataSource = list;
+        }
+        public ShowCheckCtrl(PosRes posItem)
+            :this()
+        {
+            this.posItem = posItem;
+        }
+        private async void ShowCxCtrl_Load(object sender, EventArgs e)
+        {
+            if (posItem.CheckResID == null)//没有检测结果
+                return;
+            using (RHDWPartContext db = RHDWPartContext.GetContext(posItem.SigTime))
+            {
+                var items =await db.CheckRes.Where(p => p.ID == posItem.CheckResID).ToListAsync();
+
+                this.list.AddRange(items);
+            }
+            gridView1.RefreshData();
+        }
+
+        private void gridView1_CustomDrawEmptyForeground(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e)
+        {
+            if (gridView1.RowCount == 0)
+            {
+                string txt = "没有检测结果信息";
+                var s = e.Appearance.CalcTextSize(e.Cache, txt, e.Bounds.Width).ToSize();
+                var x = (e.Bounds.Width - s.Width) / 2;
+                var y = (e.Bounds.Height - s.Height) / 2;
+                e.Appearance.ForeColor = Color.Gray;
+                e.Appearance.DrawString(e.Cache, txt, new Rectangle(x, y, s.Width, s.Height));
+            }
+        }
+
+        private void gridView1_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
+        {
+            if (e.Column.FieldName == nameof(CheckRes.DetectionWay))
+            {
+                List<EnumDetectionWay> enumRes = new List<EnumDetectionWay>();
+                if (((EnumDetectionWay)e.Value).HasFlag(EnumDetectionWay.DAMA))
+                    enumRes.Add(EnumDetectionWay.DAMA);
+                if (((EnumDetectionWay)e.Value).HasFlag(EnumDetectionWay.IBS))
+                    enumRes.Add(EnumDetectionWay.IBS);
+                if (((EnumDetectionWay)e.Value).HasFlag(EnumDetectionWay.Ky5758))
+                    enumRes.Add(EnumDetectionWay.Ky5758);
+                e.DisplayText = string.Join(",", enumRes);
+            }
+        }
+    }
+}

+ 120 - 0
XdCxRhDW.App/PopupControl/ShowCheckCtrl.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 14 - 2
XdCxRhDW.App/UserControl/CtrlHome.Designer.cs

@@ -94,6 +94,7 @@ namespace XdCxRhDW.App.UserControl
             this.htmlTemplateCollection1 = new DevExpress.Utils.Html.HtmlTemplateCollection();
             this.htmlTemplate1 = new DevExpress.Utils.Html.HtmlTemplate();
             this.popupMenu2 = new DevExpress.XtraBars.PopupMenu(this.components);
+            this.btnCheckRes = new DevExpress.XtraBars.BarButtonItem();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.txtTimeCho.Properties)).BeginInit();
@@ -187,8 +188,9 @@ namespace XdCxRhDW.App.UserControl
             this.btnGDOP,
             this.btnShowCgRes,
             this.btnShowCxRes,
-            this.btnPos});
-            this.barManager1.MaxItemId = 15;
+            this.btnPos,
+            this.btnCheckRes});
+            this.barManager1.MaxItemId = 16;
             // 
             // barDockControlTop
             // 
@@ -659,10 +661,19 @@ namespace XdCxRhDW.App.UserControl
             new DevExpress.XtraBars.LinkPersistInfo(this.btnGDOP),
             new DevExpress.XtraBars.LinkPersistInfo(this.btnShowCgRes),
             new DevExpress.XtraBars.LinkPersistInfo(this.btnShowCxRes),
+            new DevExpress.XtraBars.LinkPersistInfo(this.btnCheckRes),
             new DevExpress.XtraBars.LinkPersistInfo(this.btnPos)});
             this.popupMenu2.Manager = this.barManager1;
             this.popupMenu2.Name = "popupMenu2";
             // 
+            // btnCheckRes
+            // 
+            this.btnCheckRes.Caption = "查看检测结果";
+            this.btnCheckRes.Id = 15;
+            this.btnCheckRes.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnCheckRes.ImageOptions.SvgImage")));
+            this.btnCheckRes.Name = "btnCheckRes";
+            this.btnCheckRes.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnCheckRes_ItemClick);
+            // 
             // CtrlHome
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
@@ -766,5 +777,6 @@ namespace XdCxRhDW.App.UserControl
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
         private ImageComboBoxEdit txtFrequpMHz;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
+        private DevExpress.XtraBars.BarButtonItem btnCheckRes;
     }
 }

+ 9 - 1
XdCxRhDW.App/UserControl/CtrlHome.cs

@@ -989,6 +989,13 @@ namespace XdCxRhDW.App.UserControl
             var item = gridView2.GetFocusedRow() as PosRes;
             DxHelper.PopupHelper.ShowPopup(new ShowCxCtrl(item), gridHomePosRes, gridHomePosRes.Height + 80, EnumPopupDirection.Bottom, showCloseButton: true);
         }
+
+        private void btnCheckRes_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+        {
+            var item = gridView2.GetFocusedRow() as PosRes;
+            DxHelper.PopupHelper.ShowPopup(new ShowCheckCtrl(item), gridHomePosRes, gridHomePosRes.Height + 80, EnumPopupDirection.Bottom, showCloseButton: true);
+        }
+
         private void DrawGDOP(PosRes item)
         {
             try
@@ -1413,6 +1420,7 @@ namespace XdCxRhDW.App.UserControl
                 ColorKey = res.ColorKey,
                 CreateTime = res.CreateTime,
                 CxResID = res.CxResID,
+                CheckResID=res.CheckResID,
                 Selected = res.Selected,
                 StationResID = res.StationResID,
                 TargetID = res.TargetID,
@@ -1432,7 +1440,7 @@ namespace XdCxRhDW.App.UserControl
             };
         }
 
-
+     
     }
 }
 

+ 21 - 0
XdCxRhDW.App/UserControl/CtrlHome.resx

@@ -249,6 +249,27 @@
         LDYuNiAxNiwxMy4yIDkuNCw2LjYgMTQsMiAyLDIgMiwxNCA2LjYsOS40IDEzLjIsMTYgNi42LDIyLjYg
         MiwxOCAgICAyLDMwIDE0LDMwIDkuNCwyNS40IDE2LDE4LjggMjIuNiwyNS40IDE4LDMwIDMwLDMwIDMw
         LDE4IDI1LjQsMjIuNiAxOC44LDE2ICAiIGNsYXNzPSJCbHVlIiAvPg0KICA8L2c+DQo8L3N2Zz4L
+</value>
+  </data>
+  <data name="btnCheckRes.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi4z
+        LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
+        dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAACADAAAC77u/
+        PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
+        IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
+        MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
+        Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
+        MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlJlZHtmaWxsOiNEMTFDMUM7fQoJLlll
+        bGxvd3tmaWxsOiNGRkIxMTU7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD
+        MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh
+        Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQoJLnN0MntvcGFjaXR5OjAuMzU7fQoJLnN0M3tv
+        cGFjaXR5OjAuNjU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iUmFuZ2VCYXIiPg0KICAgIDxyZWN0IHg9IjAi
+        IHk9IjE0LjEiIHdpZHRoPSI2IiBoZWlnaHQ9IjEyIiBjbGFzcz0iQmx1ZSIgLz4NCiAgICA8cmVjdCB4
+        PSI4IiB5PSIyLjEiIHdpZHRoPSI2IiBoZWlnaHQ9IjE4IiBjbGFzcz0iWWVsbG93IiAvPg0KICAgIDxy
+        ZWN0IHg9IjE2IiB5PSI4LjEiIHdpZHRoPSI2IiBoZWlnaHQ9IjIyIiBjbGFzcz0iUmVkIiAvPg0KICAg
+        IDxyZWN0IHg9IjI0IiB5PSIxMi4xIiB3aWR0aD0iNiIgaGVpZ2h0PSIxMCIgY2xhc3M9IkdyZWVuIiAv
+        Pg0KICA8L2c+DQo8L3N2Zz4L
 </value>
   </data>
   <metadata name="toolTipController1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">

+ 2 - 0
XdCxRhDW.App/UserControl/CtrlTarget.Designer.cs

@@ -62,8 +62,10 @@
             // 
             this.gridView1.GridControl = this.gridTar;
             this.gridView1.Name = "gridView1";
+            this.gridView1.RowCellStyle += new DevExpress.XtraGrid.Views.Grid.RowCellStyleEventHandler(this.gridView1_RowCellStyle);
             this.gridView1.PopupMenuShowing += new DevExpress.XtraGrid.Views.Grid.PopupMenuShowingEventHandler(this.gridView1_PopupMenuShowing);
             this.gridView1.CustomDrawEmptyForeground += new DevExpress.XtraGrid.Views.Base.CustomDrawEventHandler(this.gridView1_CustomDrawEmptyForeground);
+            this.gridView1.CustomColumnDisplayText += new DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventHandler(this.gridView1_CustomColumnDisplayText);
             // 
             // barManager1
             // 

+ 19 - 2
XdCxRhDW.App/UserControl/CtrlTarget.cs

@@ -1,4 +1,5 @@
-using DevExpress.Utils.Html;
+using DevExpress.Utils.About;
+using DevExpress.Utils.Html;
 using DevExpress.XtraEditors;
 using System;
 using System.Collections.Generic;
@@ -92,6 +93,7 @@ namespace XdCxRhDW.App.UserControl
                 {
                     var find = await db.TargetInfos.Where(p => p.ID == editItem.ID).FirstOrDefaultAsync();
                     find.TargetName = editItem.TargetName;
+                    find.TargeColor = editItem.TargeColor;
                     await db.SaveChangesAsync();
                 }
                 gridView1.RefreshData();
@@ -111,7 +113,7 @@ namespace XdCxRhDW.App.UserControl
                     return;
                 }
                 var ids = gridView1.GetSelectedRows();
-               
+
                 using (RHDWContext db = new RHDWContext())
                 {
                     foreach (var id in ids)
@@ -145,6 +147,21 @@ namespace XdCxRhDW.App.UserControl
             }
         }
 
+        private void gridView1_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
+        {
+            if (e.Column.FieldName == nameof(TargetInfo.TargeColor))
+            {
+                //e.Column.col = $"{(long)e.Value / 1e6}MHz";
+            }
+        }
 
+        private void gridView1_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e)
+        {
+            if (e.Column.FieldName == nameof(TargetInfo.TargeColor))
+            {
+                var clolrRes = ColorTranslator.FromHtml(e.CellValue.ToString());
+                e.Appearance.BackColor = clolrRes;
+            }
+        }
     }
 }

+ 9 - 0
XdCxRhDW.App/XdCxRhDW.App.csproj

@@ -287,6 +287,12 @@
     <Compile Include="PopupControl\ShowCgCtrl.Designer.cs">
       <DependentUpon>ShowCgCtrl.cs</DependentUpon>
     </Compile>
+    <Compile Include="PopupControl\ShowCheckCtrl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="PopupControl\ShowCheckCtrl.Designer.cs">
+      <DependentUpon>ShowCheckCtrl.cs</DependentUpon>
+    </Compile>
     <Compile Include="PopupControl\ShowCxCtrl.cs">
       <SubType>UserControl</SubType>
     </Compile>
@@ -444,6 +450,9 @@
     <EmbeddedResource Include="PopupControl\ShowCgCtrl.resx">
       <DependentUpon>ShowCgCtrl.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="PopupControl\ShowCheckCtrl.resx">
+      <DependentUpon>ShowCheckCtrl.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="PopupControl\ShowCxCtrl.resx">
       <DependentUpon>ShowCxCtrl.cs</DependentUpon>
     </EmbeddedResource>

+ 1 - 0
XdCxRhDW.Entity/03.XdCxRhDW.Entity.csproj

@@ -34,6 +34,7 @@
     <Reference Include="System" />
     <Reference Include="System.ComponentModel.DataAnnotations" />
     <Reference Include="System.Core" />
+    <Reference Include="System.Drawing" />
     <Reference Include="System.Xml.Linq" />
     <Reference Include="System.Data.DataSetExtensions" />
     <Reference Include="Microsoft.CSharp" />

+ 7 - 5
XdCxRhDW.Entity/PosRes.cs

@@ -41,6 +41,12 @@ namespace XdCxRhDW.Entity
         [Display(AutoGenerateField = false)]
         public virtual CgRes CgRes { get; set; }
 
+        [Display(Name = "检测结果")]
+        public long? CheckResID { get; set; }
+
+        [Display(AutoGenerateField = false)]
+        public virtual CheckRes CheckRes { get; set; }
+
         [Display(AutoGenerateField = false)]
         public int? TargetID { get; set; }
 
@@ -86,10 +92,6 @@ namespace XdCxRhDW.Entity
         [Display(Name = "目标状态")]
         public EnumTargetState TargetState { get; set; }
 
-        [Display(Name = "检测结果")]
-        public long? CheckResID { get; set; }
-
-        [Display(AutoGenerateField = false)]
-        public virtual CheckRes CheckRes { get; set; }
+       
     }
 }

+ 2 - 2
XdCxRhDW.Entity/TargetInfo.cs

@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
 using System.ComponentModel.DataAnnotations.Schema;
 using System.Linq;
 using System.Text;
-using System.Threading.Tasks;
+using System.Drawing;
 
 namespace XdCxRhDW.Entity
 {
@@ -23,7 +23,7 @@ namespace XdCxRhDW.Entity
         /// <summary>
         /// 目标颜色
         /// </summary>
-        [Display(Name = "目标名称")]
+        [Display(Name = "目标颜色")]
         public string TargeColor { get; set; }
     }
 }

+ 3 - 0
XdCxRhDW.Repostory/ModelPosRes.cs

@@ -29,6 +29,9 @@ namespace XdCxRhDW.Repostory
         [Display(Name = "参估编号")]
         public long CgResID { get; set; }
 
+        [Display(Name = "检测结果")]
+        public long? CheckResID { get; set; }
+
         [Display(AutoGenerateField = false)]
         public int? TargetID { get; set; }
 

+ 16 - 16
XdCxRhDW.Sender/Form1.cs

@@ -45,10 +45,10 @@ namespace XdCxRhDW.Sender
                     string tskType = txtTskType.EditValue.ToString();
                     await Task.Run(async () =>
                     {
-                    //while (true)
-                    //{
-                    //    if (cts1.IsCancellationRequested)
-                    //        break;
+                    while (true)
+                    {
+                        if (cts1.IsCancellationRequested)
+                            break;
                         using (var client = new HttpClient())
                             {
                                 try
@@ -64,14 +64,14 @@ namespace XdCxRhDW.Sender
                                             if (cts1.IsCancellationRequested) break;
                                             if (string.IsNullOrWhiteSpace(line)) continue;
                                             var items = line.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
-                                        CheckResDto checkResDto = new CheckResDto()
-                                        {
-                                            SigTime = DateTime.Now,
-                                            FileName = "test",
-                                            StartSamp = 1,
-                                            SampCount = 2,
-                                            DetectionWay = DmcTypeDto.DAMA| DmcTypeDto.Ky5758,
-                                        };
+                                        //CheckResDto checkResDto = new CheckResDto()
+                                        //{
+                                        //    SigTime = DateTime.Now,
+                                        //    FileName = "test",
+                                        //    StartSamp = 1,
+                                        //    SampCount = 2,
+                                        //    DetectionWay = DmcTypeDto.DAMA| DmcTypeDto.Ky5758,
+                                        //};
                                         X1D1PosDto dto = new X1D1PosDto()
                                             {
                                                 SigTime = DateTime.Now,
@@ -94,7 +94,7 @@ namespace XdCxRhDW.Sender
                                                 CxLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "侧向站", "Lat"),
                                                 RefLon = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lon"),
                                                 RefLat = IniFiles.ReadValue<double>("Station_Data2023.ini", "参考站", "Lat"),
-                                                CheckRes= checkResDto
+                                               // CheckRes= checkResDto
                                             };
                                             var result = await HttpHelper.PostRequestAsync<PosResDto>(url, dto);
                                             if (result.code != 200)
@@ -102,7 +102,7 @@ namespace XdCxRhDW.Sender
                                                 Log($"{result.msg}");
                                                 return;
                                             }
-                                           // Thread.Sleep(1000);
+                                            Thread.Sleep(1000);
                                             Log($"已向[{txtAddr1.Text}]发送第{idx++}条仿真结果");
                                         }
                                     }
@@ -469,8 +469,8 @@ namespace XdCxRhDW.Sender
                                     Log($"向[{txtAddr1.Text}]发送结果失败.{ex.Message}");
                                 }
                             }
-                        //    await Task.Delay(1000);
-                        //}
+                            await Task.Delay(1000);
+                        }
                     });
                 }
                 catch (Exception ex)