schangxiang@126.com
2024-06-15 2b03b9a1007c5fe0e90d663fba86b088d6894e3b
增加测试
已添加17个文件
已修改5个文件
1069 ■■■■■ 文件已修改
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_05.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/SystemHelper.cs 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/iWare_SCADA_BusinessLogical.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_DataCapture.sln 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/App.config 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.Designer.cs 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.cs 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Program.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/AssemblyInfo.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Resources.Designer.cs 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Resources.resx 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Settings.Designer.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Settings.settings 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/iWare_SCADA_FormTest2.csproj 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/MiddleModel/WorkPieceLogMiddle.cs 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/TableModel/QualityDataInfo.cs 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/App.config 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/Properties/AssemblyInfo.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/UnitTest1.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/iWare_SCADA_Test.csproj 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/packages.config 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/DataCaptureHandlerV2/DataCaptureHandler_05.cs
@@ -277,6 +277,43 @@
                                                    //重量组别
                                                    wplog.QualityOP80To9 = oP80Info.OP80ItemInfolist.Where(o => o.名称.Equals("Weight Class")).FirstOrDefault()?.状态;
                                                    //wplog.Remarks = (wplog.Remarks ?? "") + $"OP80下线完成读取文件{file.FullName},数据【{wplog.OP80NewCode??"空"}】【{wplog.QualityOP80To1 ?? "空"}】【{wplog.QualityOP80To2 ?? "空"}】【{wplog.QualityOP80To3 ?? "空"}】【{wplog.QualityOP80To4 ?? "空"}】【{wplog.QualityOP80To5 ?? "空"}】";
                                                    //新增OP80的一些质量数据 ã€Editby shaocx,2024-06-13】
                                                    wplog.QualityOP80_Houdu = oP80Info.OP80ItemInfolist.Where(o => o.名称.Equals("Big_End_Thickness")).FirstOrDefault()?.绝对值;
                                                    wplog.QualityOP80_ZXJ = oP80Info.OP80ItemInfolist.Where(o => o.名称.Equals("Distance of Two Head")).FirstOrDefault()?.绝对值;
                                                    wplog.QualityOP80_DTKYZD = oP80Info.OP80ItemInfolist.Where(o => o.名称.Equals("Big_End_Cylindricity")).FirstOrDefault()?.绝对值;
                                                    wplog.QualityOP80_XTSMYD = oP80Info.OP80ItemInfolist.Where(o => o.名称.Equals("Small_End_Top_Roundn")).FirstOrDefault()?.绝对值;
                                                    wplog.QualityOP80_XTXMYD = oP80Info.OP80ItemInfolist.Where(o => o.名称.Equals("Small_End_Bot_Roundn")).FirstOrDefault()?.绝对值;
                                                    wplog.QualityOP80_D_S_X = oP80Info.OP80ItemInfolist.Where(o => o.名称.Equals("Big_End_Top_X_Dia.")).FirstOrDefault()?.绝对值;
                                                    wplog.QualityOP80_D_S_Y = oP80Info.OP80ItemInfolist.Where(o => o.名称.Equals("Big_End_Top_Y_Dia.")).FirstOrDefault()?.绝对值;
                                                    wplog.QualityOP80_D_X_X = oP80Info.OP80ItemInfolist.Where(o => o.名称.Equals("Big_End_Bot_X_Dia.")).FirstOrDefault()?.绝对值;
                                                    wplog.QualityOP80_D_X_Y = oP80Info.OP80ItemInfolist.Where(o => o.名称.Equals("Big_End_Bot_Y_Dia.")).FirstOrDefault()?.绝对值;
                                                    //计算大头孔直径,大头孔直径=(大头上面X方向直径+大头上面Y方向直径+大头下面X方向直径+大头下面Y方向直径)/4
                                                    List<decimal> valueList = new List<decimal>() {
                                                        SystemHelper.GetDecimal(wplog.QualityOP80_D_S_X),
                                                        SystemHelper.GetDecimal(wplog.QualityOP80_D_S_Y),
                                                        SystemHelper.GetDecimal(wplog.QualityOP80_D_X_X),
                                                        SystemHelper.GetDecimal(wplog.QualityOP80_D_X_Y),
                                                    };
                                                    wplog.QualityOP80_D_TKZJ = SystemHelper.CalcDecimalAvg(valueList, 3);
                                                    wplog.QualityOP80_X_S_X = oP80Info.OP80ItemInfolist.Where(o => o.名称.Equals("Small_End_Top_X_Dia.")).FirstOrDefault()?.绝对值;
                                                    wplog.QualityOP80_X_S_Y = oP80Info.OP80ItemInfolist.Where(o => o.名称.Equals("Small_End_Top_Y_Dia.")).FirstOrDefault()?.绝对值;
                                                    wplog.QualityOP80_X_X_X = oP80Info.OP80ItemInfolist.Where(o => o.名称.Equals("Small_End_Bot_X_Dia.")).FirstOrDefault()?.绝对值;
                                                    wplog.QualityOP80_X_X_Y = oP80Info.OP80ItemInfolist.Where(o => o.名称.Equals("Small_End_Bot_Y_Dia.")).FirstOrDefault()?.绝对值;
                                                    //计算小头孔直径,小头孔直径=(小头上面X方向直径+小头上面Y方向直径+小头下面X方向直径+小头下面Y方向直径)/4
                                                    valueList = new List<decimal>();
                                                    valueList = new List<decimal>() {
                                                        SystemHelper.GetDecimal(wplog.QualityOP80_X_S_X),
                                                        SystemHelper.GetDecimal(wplog.QualityOP80_X_S_Y),
                                                        SystemHelper.GetDecimal(wplog.QualityOP80_X_X_X),
                                                        SystemHelper.GetDecimal(wplog.QualityOP80_X_X_Y),
                                                    };
                                                    wplog.QualityOP80_X_TKZJ = SystemHelper.CalcDecimalAvg(valueList, 3);
                                                }
                                                else
                                                {
@@ -291,7 +328,6 @@
                                            }
                                        }
                                    }
                                }
                                catch (Exception ex)
                                {
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/SystemHelper.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,51 @@

using iWare_SCADA_Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace iWare_SCADA_BusinessLogical.Utils
{
    /// <summary>
    /// ç³»ç»Ÿå¸®åŠ©ç±»
    /// </summary>
    public class SystemHelper
    {
        /// <summary>
        /// å­—符串转换decimal类型
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static decimal GetDecimal(string value)
        {
            if (string.IsNullOrEmpty(value))
            {
                return 0;
            }
            decimal decimalValue = 0;
            var isRight = decimal.TryParse(value, out decimalValue);
            if (isRight)
            {
                return decimalValue;
            }
            return 0;
        }
        /// <summary>
        /// decimal集合计算平均值
        /// </summary>
        /// <param name="valueList">集合</param>
        /// <param name="digits">精度</param>
        /// <returns></returns>
        public static string CalcDecimalAvg(List<decimal> valueList, int digits)
        {
            var sum = valueList.Sum();
            var count = valueList.Count;
            var bb = Convert.ToDecimal((sum / (decimal)count).ToString("f" + digits.ToString()));
            return bb.ToString();
        }
    }
}
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/iWare_SCADA_BusinessLogical.csproj
@@ -153,6 +153,7 @@
      <DesignTime>True</DesignTime>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
    <Compile Include="Utils\SystemHelper.cs" />
    <Compile Include="Utils\ComboBoxHelper.cs" />
    <Compile Include="Utils\ConfigHelper.cs" />
    <Compile Include="Utils\CSVHelper.cs" />
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_DataCapture.sln
@@ -9,6 +9,10 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iWare_SCADA_BusinessLogical", "iWare_SCADA_BusinessLogical\iWare_SCADA_BusinessLogical.csproj", "{32708F19-FE1A-48F5-B373-8E1C776F216C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iWare_SCADA_Test", "iWare_SCADA_Test\iWare_SCADA_Test.csproj", "{A3F6EBB4-D019-4246-9789-337B860BA31E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iWare_SCADA_FormTest2", "iWare_SCADA_FormTest\iWare_SCADA_FormTest2.csproj", "{3B160435-00C6-4321-9D3A-A30FD23F2D4B}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
@@ -27,6 +31,14 @@
        {32708F19-FE1A-48F5-B373-8E1C776F216C}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {32708F19-FE1A-48F5-B373-8E1C776F216C}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {32708F19-FE1A-48F5-B373-8E1C776F216C}.Release|Any CPU.Build.0 = Release|Any CPU
        {A3F6EBB4-D019-4246-9789-337B860BA31E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {A3F6EBB4-D019-4246-9789-337B860BA31E}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {A3F6EBB4-D019-4246-9789-337B860BA31E}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {A3F6EBB4-D019-4246-9789-337B860BA31E}.Release|Any CPU.Build.0 = Release|Any CPU
        {3B160435-00C6-4321-9D3A-A30FD23F2D4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {3B160435-00C6-4321-9D3A-A30FD23F2D4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {3B160435-00C6-4321-9D3A-A30FD23F2D4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {3B160435-00C6-4321-9D3A-A30FD23F2D4B}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/App.config
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
    </startup>
  <appSettings>
    <add key="OP80QualityData_Test" value="X:\CA4GC20TD_Test\"/>
  </appSettings>
</configuration>
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
namespace iWare_SCADA_FormTest
{
    partial class Form1
    {
        /// <summary>
        /// å¿…需的设计器变量。
        /// </summary>
        private System.ComponentModel.IContainer components = null;
        /// <summary>
        /// æ¸…理所有正在使用的资源。
        /// </summary>
        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
        #region Windows çª—体设计器生成的代码
        /// <summary>
        /// è®¾è®¡å™¨æ”¯æŒæ‰€éœ€çš„æ–¹æ³• - ä¸è¦ä¿®æ”¹
        /// ä½¿ç”¨ä»£ç ç¼–辑器修改此方法的内容。
        /// </summary>
        private void InitializeComponent()
        {
            this.button1 = new System.Windows.Forms.Button();
            this.SuspendLayout();
            //
            // button1
            //
            this.button1.Location = new System.Drawing.Point(76, 55);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(135, 54);
            this.button1.TabIndex = 0;
            this.button1.Text = "测试移动文件";
            this.button1.UseVisualStyleBackColor = true;
            this.button1.Click += new System.EventHandler(this.button1_Click);
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(800, 450);
            this.Controls.Add(this.button1);
            this.Name = "Form1";
            this.Text = "Form1";
            this.ResumeLayout(false);
        }
        #endregion
        private System.Windows.Forms.Button button1;
    }
}
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,47 @@
using iWare_SCADA_BusinessLogical.Utils;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace iWare_SCADA_FormTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                string path = ConfigHelper.GetConfigString("OP80QualityData_Test");//OP80的地址
                var newFiles = FileHelper.DetectNewFilesCSV(path, 300, DateTime.Now.AddDays(-100), DateTime.Now.AddDays(1));
                foreach (System.IO.FileInfo file in newFiles)
                {
                    MessageBox.Show("找到文件:" + file.FullName);
                    var toPath = file.FullName.Replace("CA4GC20TD_Test", "CA4GC20TD_COPY");
                    MessageBox.Show("要移动到:" + file.FullName);
                    File.Move(file.FullName, toPath);//移动
                }
                MessageBox.Show("成功");
            }
            catch (Exception ex)
            {
                MessageBox.Show("异常:" + ex.Message);
            }
        }
    }
}
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.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>
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Program.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace iWare_SCADA_FormTest
{
    internal static class Program
    {
        /// <summary>
        /// åº”用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
    }
}
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/AssemblyInfo.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// æœ‰å…³ç¨‹åºé›†çš„一般信息由以下
// æŽ§åˆ¶ã€‚更改这些特性值可修改
// ä¸Žç¨‹åºé›†å…³è”的信息。
[assembly: AssemblyTitle("iWare_SCADA_FormTest")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("微软中国")]
[assembly: AssemblyProduct("iWare_SCADA_FormTest")]
[assembly: AssemblyCopyright("Copyright Â© å¾®è½¯ä¸­å›½ 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// å°† ComVisible è®¾ç½®ä¸º false ä¼šä½¿æ­¤ç¨‹åºé›†ä¸­çš„类型
//对 COM ç»„件不可见。如果需要从 COM è®¿é—®æ­¤ç¨‹åºé›†ä¸­çš„类型
//请将此类型的 ComVisible ç‰¹æ€§è®¾ç½®ä¸º true。
[assembly: ComVisible(false)]
// å¦‚果此项目向 COM å…¬å¼€ï¼Œåˆ™ä¸‹åˆ— GUID ç”¨äºŽç±»åž‹åº“çš„ ID
[assembly: Guid("3b160435-00c6-4321-9d3a-a30fd23f2d4b")]
// ç¨‹åºé›†çš„版本信息由下列四个值组成:
//
//      ä¸»ç‰ˆæœ¬
//      æ¬¡ç‰ˆæœ¬
//      ç”Ÿæˆå·
//      ä¿®è®¢å·
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Resources.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
//     æ­¤ä»£ç ç”±å·¥å…·ç”Ÿæˆã€‚
//     è¿è¡Œæ—¶ç‰ˆæœ¬:4.0.30319.42000
//
//     å¯¹æ­¤æ–‡ä»¶çš„æ›´æ”¹å¯èƒ½ä¼šå¯¼è‡´ä¸æ­£ç¡®çš„行为,并且如果
//     é‡æ–°ç”Ÿæˆä»£ç ï¼Œè¿™äº›æ›´æ”¹å°†ä¼šä¸¢å¤±ã€‚
// </auto-generated>
//------------------------------------------------------------------------------
namespace iWare_SCADA_FormTest.Properties {
    using System;
    /// <summary>
    ///   ä¸€ä¸ªå¼ºç±»åž‹çš„资源类,用于查找本地化的字符串等。
    /// </summary>
    // æ­¤ç±»æ˜¯ç”± StronglyTypedResourceBuilder
    // ç±»é€šè¿‡ç±»ä¼¼äºŽ ResGen æˆ– Visual Studio çš„工具自动生成的。
    // è‹¥è¦æ·»åŠ æˆ–ç§»é™¤æˆå‘˜ï¼Œè¯·ç¼–è¾‘ .ResX æ–‡ä»¶ï¼Œç„¶åŽé‡æ–°è¿è¡Œ ResGen
    // (以 /str ä½œä¸ºå‘½ä»¤é€‰é¡¹),或重新生成 VS é¡¹ç›®ã€‚
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    internal class Resources {
        private static global::System.Resources.ResourceManager resourceMan;
        private static global::System.Globalization.CultureInfo resourceCulture;
        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Resources() {
        }
        /// <summary>
        ///   è¿”回此类使用的缓存的 ResourceManager å®žä¾‹ã€‚
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Resources.ResourceManager ResourceManager {
            get {
                if (object.ReferenceEquals(resourceMan, null)) {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("iWare_SCADA_FormTest.Properties.Resources", typeof(Resources).Assembly);
                    resourceMan = temp;
                }
                return resourceMan;
            }
        }
        /// <summary>
        ///   é‡å†™å½“前线程的 CurrentUICulture å±žæ€§ï¼Œå¯¹
        ///   ä½¿ç”¨æ­¤å¼ºç±»åž‹èµ„源类的所有资源查找执行重写。
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Globalization.CultureInfo Culture {
            get {
                return resourceCulture;
            }
            set {
                resourceCulture = value;
            }
        }
    }
}
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Resources.resx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,117 @@
<?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.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: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" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
            </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" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
            </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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
</root>
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Settings.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
//     æ­¤ä»£ç ç”±å·¥å…·ç”Ÿæˆã€‚
//     è¿è¡Œæ—¶ç‰ˆæœ¬:4.0.30319.42000
//
//     å¯¹æ­¤æ–‡ä»¶çš„æ›´æ”¹å¯èƒ½ä¼šå¯¼è‡´ä¸æ­£ç¡®çš„行为,并且如果
//     é‡æ–°ç”Ÿæˆä»£ç ï¼Œè¿™äº›æ›´æ”¹å°†ä¼šä¸¢å¤±ã€‚
// </auto-generated>
//------------------------------------------------------------------------------
namespace iWare_SCADA_FormTest.Properties {
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")]
    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
        public static Settings Default {
            get {
                return defaultInstance;
            }
        }
    }
}
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Properties/Settings.settings
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
  <Profiles>
    <Profile Name="(Default)" />
  </Profiles>
  <Settings />
</SettingsFile>
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/iWare_SCADA_FormTest2.csproj
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{3B160435-00C6-4321-9D3A-A30FD23F2D4B}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <RootNamespace>iWare_SCADA_FormTest</RootNamespace>
    <AssemblyName>iWare_SCADA_FormTest</AssemblyName>
    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
    <Deterministic>true</Deterministic>
    <TargetFrameworkProfile />
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Net.Http" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Form1.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="Form1.Designer.cs">
      <DependentUpon>Form1.cs</DependentUpon>
    </Compile>
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <EmbeddedResource Include="Form1.resx">
      <DependentUpon>Form1.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="Properties\Resources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
      <SubType>Designer</SubType>
    </EmbeddedResource>
    <Compile Include="Properties\Resources.Designer.cs">
      <AutoGen>True</AutoGen>
      <DependentUpon>Resources.resx</DependentUpon>
      <DesignTime>True</DesignTime>
    </Compile>
    <None Include="Properties\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
    </None>
    <Compile Include="Properties\Settings.Designer.cs">
      <AutoGen>True</AutoGen>
      <DependentUpon>Settings.settings</DependentUpon>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <None Include="App.config" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\iWare_SCADA_BusinessLogical\iWare_SCADA_BusinessLogical.csproj">
      <Project>{32708f19-fe1a-48f5-b373-8e1c776f216c}</Project>
      <Name>iWare_SCADA_BusinessLogical</Name>
    </ProjectReference>
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/MiddleModel/WorkPieceLogMiddle.cs
@@ -280,6 +280,94 @@
        public string QualityOP80To10 { get; set; }
        #region æ–°å¢žOP80的一些质量数据 ã€Editby shaocx,2024-06-13】
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-厚度
        /// </summary>
        public string QualityOP80_Houdu { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-中心距
        /// </summary>
        public string QualityOP80_ZXJ { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-大头孔圆柱度
        /// </summary>
        public string QualityOP80_DTKYZD { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-小头上面圆度
        /// </summary>
        public string QualityOP80_XTSMYD { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-小头下面圆度
        /// </summary>
        public string QualityOP80_XTXMYD { get; set; }
        #region å¤§å¤´å­”直径
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-大头孔直径,大头孔直径=(大头上面X方向直径+大头上面Y方向直径+大头下面X方向直径+大头下面Y方向直径)/4
        /// </summary>
        public string QualityOP80_D_TKZJ { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-大头上面X方向直径
        /// </summary>
        public string QualityOP80_D_S_X { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-大头上面Y方向直径
        /// </summary>
        public string QualityOP80_D_S_Y { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-大头下面X方向直径
        /// </summary>
        public string QualityOP80_D_X_X { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-大头下面Y方向直径
        /// </summary>
        public string QualityOP80_D_X_Y { get; set; }
        #endregion
        #region å°å¤´å­”直径
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-小头孔直径,小头孔直径=(小头上面X方向直径+小头上面Y方向直径+小头下面X方向直径+小头下面Y方向直径)/4
        /// </summary>
        public string QualityOP80_X_TKZJ { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-小头上面X方向直径
        /// </summary>
        public string QualityOP80_X_S_X { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-小头上面Y方向直径
        /// </summary>
        public string QualityOP80_X_S_Y { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-小头下面X方向直径
        /// </summary>
        public string QualityOP80_X_X_X { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-小头下面Y方向直径
        /// </summary>
        public string QualityOP80_X_X_Y { get; set; }
        #endregion
        #endregion
        public string EquipmentCurrentState { get; set; }
    }
    //[NotMapped]
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Model/TableModel/QualityDataInfo.cs
@@ -212,6 +212,96 @@
        public string UpdatedUserName { get; set; }
        public bool IsDeleted { get; set; }
        #region æ–°å¢žOP80的一些质量数据 ã€Editby shaocx,2024-06-13】
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-厚度
        /// </summary>
        public string QualityOP80_Houdu { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-中心距
        /// </summary>
        public string QualityOP80_ZXJ { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-大头孔圆柱度
        /// </summary>
        public string QualityOP80_DTKYZD { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-小头上面圆度
        /// </summary>
        public string QualityOP80_XTSMYD { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-小头下面圆度
        /// </summary>
        public string QualityOP80_XTXMYD { get; set; }
        #region å¤§å¤´å­”直径
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-大头孔直径,大头孔直径=(大头上面X方向直径+大头上面Y方向直径+大头下面X方向直径+大头下面Y方向直径)/4
        /// </summary>
        public string QualityOP80_D_TKZJ { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-大头上面X方向直径
        /// </summary>
        public string QualityOP80_D_S_X { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-大头上面Y方向直径
        /// </summary>
        public string QualityOP80_D_S_Y { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-大头下面X方向直径
        /// </summary>
        public string QualityOP80_D_X_X { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-大头下面Y方向直径
        /// </summary>
        public string QualityOP80_D_X_Y { get; set; }
        #endregion
        #region å°å¤´å­”直径
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-小头孔直径,小头孔直径=(小头上面X方向直径+小头上面Y方向直径+小头下面X方向直径+小头下面Y方向直径)/4
        /// </summary>
        public string QualityOP80_X_TKZJ { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-小头上面X方向直径
        /// </summary>
        public string QualityOP80_X_S_X { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-小头上面Y方向直径
        /// </summary>
        public string QualityOP80_X_S_Y { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-小头下面X方向直径
        /// </summary>
        public string QualityOP80_X_X_X { get; set; }
        /// <summary>
        /// OP80 è´¨é‡æ•°æ®-小头下面Y方向直径
        /// </summary>
        public string QualityOP80_X_X_Y { get; set; }
        #endregion
        #endregion
    }
    /// <summary>
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/App.config
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <appSettings>
    <!--net use x: \\192.168.216.133\Destination /savecred /persistent:yes
    net use z: \\192.168.216.130\kistler /savecred /persistent:yes
    net use y: \\192.168.216.6\data /savecred /persistent:yes
    net use u: \\192.168.216.130\NutrunnerData /savecred /persistent:yes-->
    <!-- åˆ¤æ–­å·¥åºæ˜¯å¦è·³åºçš„基准配置 -->
    <add key="WorkingProcedureAllStr" value="OP05OP10OP20OP30OP35OP40OP50OP60OP70OP80" />
    <add key="WorkPeiceIDPath" value="Y:\qualified" />
    <!-- op30工序的工位质量信息 -->
    <add key="OP30QualityDataFor36Station" value="Z:\" />
    <add key="OP30QualityDataFor45Station" value="U:\" />
    <add key="OP60QualityData" value="V:\" />
    <add key="OP20QualityData" value="W:\" />
    <add key="OP80QualityData_Test" value="X:\CA4GC20TD_Test\" />
    <!--<add key="WorkPeiceIDPath" value="C:\Users\13650\Desktop\yiqi" />-->
    <add key="HeartBeatAlertInterval" value="2000" />
  </appSettings>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
  </startup>
  <entityFramework>
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
  </entityFramework>
  <connectionStrings>
    <!--<add name="SCADA_DF22001_CORE" connectionString="Server=.;Database=iWare.SCADA;User=sa;Password=123abc.com;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />-->
    <!--<add name="SCADA_DF22001_CORE" connectionString="Server=10.10.40.166;Database=iWare.SCADA;User=sa;Password=123abc.com;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />-->
    <add name="SCADA_DF22001_CORE" connectionString="Server=.;Database=iWare.SCADA;User=sa;Password=123abc.com;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
    <add name="SCModel" connectionString="data source=.;initial catalog=SCTest_new;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
  </connectionStrings>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/Properties/AssemblyInfo.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("iWare_SCADA_Test")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("微软中国")]
[assembly: AssemblyProduct("iWare_SCADA_Test")]
[assembly: AssemblyCopyright("Copyright Â© å¾®è½¯ä¸­å›½ 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("a3f6ebb4-d019-4246-9789-337b860ba31e")]
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/UnitTest1.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,41 @@
using iWare_SCADA_BusinessLogical.Utils;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.IO;
namespace iWare_SCADA_Test
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestMethod1()
        {
            //计算大头孔直径,大头孔直径=(大头上面X方向直径+大头上面Y方向直径+大头下面X方向直径+大头下面Y方向直径)/4
            List<decimal> valueList = new List<decimal>() {
                                                        SystemHelper.GetDecimal(""),
                                                        SystemHelper.GetDecimal("sss"),
                                                        SystemHelper.GetDecimal("12.365"),
                                                        SystemHelper.GetDecimal("201.24557"),
                                                        SystemHelper.GetDecimal("100"),
                                                    };
            var bb = SystemHelper.CalcDecimalAvg(valueList, 3);
            Assert.Fail();
        }
        [TestMethod]
        public void xx()
        {
            string path = ConfigHelper.GetConfigString("OP80QualityData_Test");//OP80的地址
            var newFiles = FileHelper.DetectNewFilesCSV(path, 300, DateTime.Now.AddDays(-10), DateTime.Now.AddDays(1));
            foreach (System.IO.FileInfo file in newFiles)
            {
                File.Move(file.FullName, "../CA4GC20TD_COPY/" + file.Name);//移动
            }
        }
    }
}
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/iWare_SCADA_Test.csproj
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="..\packages\MSTest.TestAdapter.2.2.7\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.2.2.7\build\net45\MSTest.TestAdapter.props')" />
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{A3F6EBB4-D019-4246-9789-337B860BA31E}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>iWare_SCADA_Test</RootNamespace>
    <AssemblyName>iWare_SCADA_Test</AssemblyName>
    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
    <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
    <IsCodedUITest>False</IsCodedUITest>
    <TestProjectType>UnitTest</TestProjectType>
    <NuGetPackageImportStamp>
    </NuGetPackageImportStamp>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
      <HintPath>..\packages\MSTest.TestFramework.2.2.7\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
      <HintPath>..\packages\MSTest.TestFramework.2.2.7\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Core" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="UnitTest1.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <None Include="App.config" />
    <None Include="packages.config" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\iWare_SCADA_BusinessLogical\iWare_SCADA_BusinessLogical.csproj">
      <Project>{32708f19-fe1a-48f5-b373-8e1c776f216c}</Project>
      <Name>iWare_SCADA_BusinessLogical</Name>
    </ProjectReference>
  </ItemGroup>
  <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
    <PropertyGroup>
      <ErrorText>这台计算机上缺少此项目引用的 NuGet ç¨‹åºåŒ…。使用“NuGet ç¨‹åºåŒ…还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
    </PropertyGroup>
    <Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.2.7\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.2.7\build\net45\MSTest.TestAdapter.props'))" />
    <Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.2.7\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.2.7\build\net45\MSTest.TestAdapter.targets'))" />
  </Target>
  <Import Project="..\packages\MSTest.TestAdapter.2.2.7\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.2.2.7\build\net45\MSTest.TestAdapter.targets')" />
</Project>
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_Test/packages.config
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="MSTest.TestAdapter" version="2.2.7" targetFramework="net48" />
  <package id="MSTest.TestFramework" version="2.2.7" targetFramework="net48" />
</packages>