@wang_qi0307 5 năm trước cách đây
mục cha
commit
2cf06e9305

+ 1 - 1
HOZProject/FormUnitControl.Designer.cs

@@ -187,7 +187,7 @@
             // button1
             // button1
             // 
             // 
             this.button1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.button1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.button1.Location = new System.Drawing.Point(485, 319);
+            this.button1.Location = new System.Drawing.Point(485, 300);
             this.button1.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
             this.button1.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
             this.button1.Name = "button1";
             this.button1.Name = "button1";
             this.button1.Size = new System.Drawing.Size(144, 41);
             this.button1.Size = new System.Drawing.Size(144, 41);

+ 16 - 1
HOZProject/FormUnitControl.cs

@@ -642,7 +642,22 @@ namespace HOZProject
 
 
             MeasureFile mf = new MeasureFile();
             MeasureFile mf = new MeasureFile();
 
 
-            mf.FileName = "abcdefg";
+            mf.FileName = "New FileName";
+            mf.FilePath = "D:\\opton\\New FilePath";
+
+            CutHole ch = new CutHole();
+            ch.SampleName = "SampleName1";
+            ch.PT = true;
+            ch.FIBTemp = "FIBTemp1";
+            ch.PTTemp = "PTTemp1";
+            ch.OPT = MeasureData.Operation.Image;
+            ch.START = System.DateTime.Now;
+            ch.END = System.DateTime.Now.AddHours(2);
+            ch.STATE = MeasureData.State.Success;
+            ch.SWITCH = true;
+
+            mf.ListCutHole.Add(ch);
+
             mf.Serialize(true, doc, root);
             mf.Serialize(true, doc, root);
 
 
             doc.Save("test.xml");
             doc.Save("test.xml");

+ 48 - 17
MeasureData/CutHole.cs

@@ -12,14 +12,6 @@ using System.Xml;
 
 
 namespace MeasureData
 namespace MeasureData
 {
 {
-    
-     //PT工序类型
-    public enum PTType
-    {
-        Have,
-        No
-    }
-
     //操作步骤,在操作失败时,反馈的状态
     //操作步骤,在操作失败时,反馈的状态
     public enum Operation
     public enum Operation
     {
     {
@@ -43,7 +35,7 @@ namespace MeasureData
     }
     }
 
 
     //切割孔
     //切割孔
-    public class CutHole: Convertinterface
+    public class CutHole: ISlo
     {
     {
         #region 样品名
         #region 样品名
         /// <summary>
         /// <summary>
@@ -71,9 +63,9 @@ namespace MeasureData
         #region 工作条件
         #region 工作条件
 
 
         //是否有pt工序
         //是否有pt工序
-        private PTType m_pt;
+        private Boolean m_pt;
 
 
-        public PTType PT
+        public Boolean PT
         {
         {
             get { return this.m_pt; }
             get { return this.m_pt; }
             set { this.m_pt = value; }
             set { this.m_pt = value; }
@@ -146,7 +138,7 @@ namespace MeasureData
         #endregion
         #endregion
 
 
         //构造函数
         //构造函数
-        CutHole()
+        public CutHole()
         {
         {
             Init();
             Init();
         }
         }
@@ -161,15 +153,48 @@ namespace MeasureData
         }
         }
 
 
         //样品孔存储xml文档
         //样品孔存储xml文档
-        public void Serialize(bool isStoring, XmlDocument xml, XmlNode rootNode)
+        public override void Serialize(bool isStoring, XmlDocument xml, XmlNode rootNode)
         {
         {
 
 
             Slo<CutHole> slo = new Slo<CutHole> ();
             Slo<CutHole> slo = new Slo<CutHole> ();
-
+            //样品名称
             xString SampleName = new xString();
             xString SampleName = new xString();
             SampleName.AssignValue(this.SampleName);
             SampleName.AssignValue(this.SampleName);
             slo.Register("SampleName", SampleName);
             slo.Register("SampleName", SampleName);
-            
+
+            //是否有PT沉积
+            xBool PT = new xBool();
+            PT.AssignValue(this.PT);
+            slo.Register("PT", PT);
+            //FIB工作模板
+            xString FIBTemp = new xString();
+            FIBTemp.AssignValue(this.FIBTemp);
+            slo.Register("FIBTemp", FIBTemp);
+            //PT工作模板
+            xString PTTemp = new xString();
+            PTTemp.AssignValue(this.PTTemp);
+            slo.Register("PTTemp", PTTemp);
+
+            //操作步骤
+            xInt OPT = new xInt();
+            OPT.AssignValue(this.OPT.GetHashCode());
+            slo.Register("OPT", OPT);
+            //开始时间
+            xTime_t START = new xTime_t();
+            START.AssignValue(this.START);
+            slo.Register("START", START);
+            //结束时间
+            xTime_t END = new xTime_t();
+            END.AssignValue(this.END);
+            slo.Register("END", END);
+            //测量结果
+            xInt STATE = new xInt();
+            STATE.AssignValue(this.STATE.GetHashCode());
+            slo.Register("STATE", STATE);
+            //测量开关
+            xBool SWITCH = new xBool();
+            SWITCH.AssignValue(this.SWITCH);
+            slo.Register("SWITCH", SWITCH);
 
 
             if (isStoring)
             if (isStoring)
             {
             {
@@ -180,8 +205,14 @@ namespace MeasureData
                 slo.Serialize(false, xml, rootNode);
                 slo.Serialize(false, xml, rootNode);
 
 
                 this.SampleName = SampleName.value();
                 this.SampleName = SampleName.value();
-               
-
+                this.PT = PT.value();
+                this.FIBTemp = FIBTemp.value();
+                this.PTTemp = PTTemp.value();
+                this.OPT = (Operation)OPT.value();
+                this.START = START.value();
+                this.END = END.value();
+                this.STATE = (State)STATE.value();
+                this.SWITCH = SWITCH.value();
             }
             }
         }
         }
     
     

+ 9 - 5
MeasureData/MeasureFile.cs

@@ -12,7 +12,7 @@ using System.Xml;
 
 
 namespace MeasureData
 namespace MeasureData
 {
 {
-    public class MeasureFile:Convertinterface
+    public class MeasureFile:ISlo
     {
     {
         #region 内容
         #region 内容
         //文件名
         //文件名
@@ -44,16 +44,20 @@ namespace MeasureData
 
 
         //XML文件保存
         //XML文件保存
         //样品孔存储xml文档
         //样品孔存储xml文档
-        public void Serialize(bool isStoring, XmlDocument xml, XmlNode rootNode)
+        public override void Serialize(bool isStoring, XmlDocument xml, XmlNode rootNode)
         {
         {
 
 
             Slo<MeasureFile> slo = new Slo<MeasureFile>();
             Slo<MeasureFile> slo = new Slo<MeasureFile>();
 
 
             xString FileName = new xString();
             xString FileName = new xString();
-            this.FileName = "aaaaa";
+            xString FilePath = new xString();
             FileName.AssignValue(this.FileName);
             FileName.AssignValue(this.FileName);
+            FilePath.AssignValue(this.FilePath);
             slo.Register("FileName", FileName);
             slo.Register("FileName", FileName);
+            slo.Register("FilePath", FilePath);
 
 
+            Collection<CutHole> ctch = new Collection<CutHole>();
+            ctch.addItem(this.ListCutHole[0]);
 
 
             if (isStoring)
             if (isStoring)
             {
             {
@@ -64,8 +68,7 @@ namespace MeasureData
                 slo.Serialize(false, xml, rootNode);
                 slo.Serialize(false, xml, rootNode);
 
 
                 this.FileName = FileName.value();
                 this.FileName = FileName.value();
-
-
+                this.FilePath = FilePath.value();
             }
             }
         }
         }
         #endregion
         #endregion
@@ -78,6 +81,7 @@ namespace MeasureData
 
 
         public void Init()
         public void Init()
         {
         {
+            this.ListCutHole = new List<CutHole>();
         }
         }
         #region 操作
         #region 操作