sunyi 5 лет назад
Родитель
Сommit
be207776b3

+ 17 - 10
OTS/OTSIncAMeasureApp/OTSDataMgrFunction/OTSDataMgrFun.cs

@@ -817,7 +817,7 @@ namespace OTSIncAMeasureApp
                 //获取样品名称
                 SampleMeasureArea.sNewSampleName = (m_ProjDataMgr.GetSampleList())[i].GetName();
                 // 获取测量区域形状
-                SampleMeasureArea.iShape = Convert.ToInt32((m_ProjDataMgr.GetSampleList())[i].GetMsrArea().GetShape());
+                SampleMeasureArea.iShape = Convert.ToInt32((m_ProjDataMgr.GetSampleList())[i].GetMsrArea());
                 //获取样品孔名称
                 SampleMeasureArea.sHoleName = (m_ProjDataMgr.GetSampleList())[i].GetSampleHoleName();
                 //样品测量区域
@@ -1059,24 +1059,24 @@ namespace OTSIncAMeasureApp
             return false;
             }
 
-            CDomain pMsrArea = new CDomain();
+            Rectangle pMsrArea = new Rectangle();
             pMsrArea = WSample.GetMsrArea();
             if (null == pMsrArea)
             {
             return false;
             }
 
-            iShape = Convert.ToInt32(pMsrArea.GetShape());
+            iShape = Convert.ToInt32(pMsrArea);
 
-            ValueType ValType = new Rectangle();
-            ValType = pMsrArea.GetRectDomain();
+            Rectangle ValType = new Rectangle();
+            ValType = pMsrArea;
             Srect = (Rectangle)ValType;
             return true;
         }
 
         //获取幁图数
         //ref List<Point> pField:  幁图数
-        public bool GetField(ref List<System.Windows.Point> pField, ref Size iSzie)
+        public bool GetField(ref List<System.Windows.Point> pField, ref System.Windows.Size iSzie)
         {
             COTSSample WSample = m_ProjDataMgr.GetWorkingSample();
             if (null == WSample)
@@ -1084,7 +1084,7 @@ namespace OTSIncAMeasureApp
             return false;
             }
 
-            CDomain pMsrArea = new CDomain();
+            Rectangle pMsrArea = new Rectangle();
             pMsrArea = WSample.GetMsrArea();
 
            
@@ -1221,13 +1221,20 @@ namespace OTSIncAMeasureApp
             return false;
             }
 
-            COTSImgProcPrm ImgProcPrm = WSample.GetMsrParams().GetImageProcessParam();
+            COTSImageProcessParam ImgProcPrm = WSample.GetMsrParams().GetImageProcessParam();
 
-            if (!m_ProjDataMgr.RemoveBackGround(pBSEImageIn, ImgProcPrm, ref pBSEImageOut))
+            if (!m_ProjDataMgr.RemoveBackGround(pBSEImageIn, ImgProcPrm,  pBSEImageOut))
             {
             return false;
             }
-
+            if (pBSEImageOut.GetImageDataPtr() == true)
+            {
+                BSEImageNoBG = 0x01;
+            }
+            else
+            {
+                BSEImageNoBG = 0x00;
+            }
             BSEImageNoBG = pBSEImageOut.GetImageDataPtr();
 
             return true;

+ 6 - 4
OTS/OTSIncAMeasureApp/OTSDataMgrFunction/OTSDataMgrInterface.cs

@@ -1,4 +1,6 @@
 
+using OTSDataType;
+using OTSModelSharp;
 using System;
 using System.Collections.Generic;
 using System.Drawing;
@@ -61,7 +63,7 @@ namespace OTSIncAMeasureApp
 
         //获取工作样品
         // 返回工作样品对象
-        COTSSampleClr GetWorkSample();
+        COTSSample GetWorkSample();
 
 
         //设置工作样品
@@ -242,7 +244,7 @@ namespace OTSIncAMeasureApp
         bool GetMsrSampleStartTime(ref DateTime MsrFieldStartTime);
 
         //获取新的工作文件对象
-        CProjMgrClr GetNewProjMgrClr();
+        COTSProjMgrFile GetNewProjMgrClr();
 
         // 获取测量结果信息
         bool GetMsrRetData(ref SMSR_COMPLETE_DATA MsrCompleteData);
@@ -270,11 +272,11 @@ namespace OTSIncAMeasureApp
 
         //获取工作样品的属性值
         //OTSSampleMeaInfo SMeasureInfo : 样品属性值
-        bool GetWorkSamplePropertyVal(COTSSampleClr SampleClr,ref OTSSampleMeaInfo SMeasureInfo);
+        bool GetWorkSamplePropertyVal(COTSSample SampleClr,ref OTSSampleMeaInfo SMeasureInfo);
 
         //获取样品的属性值
         //ref List<CTreeSampleParam> CTSampleParam :  打开已保存样品文件中的样品信息,用于TREEVIEW显示
-        void GetExistSampleInfo(COTSSampleClr SampleClr, ref CTreeSampleParam CTSampleParam);
+        void GetExistSampleInfo(COTSSample SampleClr, ref CTreeSampleParam CTSampleParam);
 
         //删除样品
         //string sWorkSampleName : 需要删除的工作样品名称

+ 3 - 2
OTS/OTSIncAMeasureApp/OTSDisplaySGridData/OTSDisplaySampleGrid.cs

@@ -1,4 +1,5 @@
-using SourceGrid;
+using OTSModelSharp;
+using SourceGrid;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -66,7 +67,7 @@ namespace OTSIncAMeasureApp
         //工作样品对象
         OTSSampleMeaInfo m_WSampleInfo = new OTSSampleMeaInfo();
 
-        public OTSINTERFACE.COTSProgMgrParamFileClr m_cotsprogmgrparamfileclr;          //参数类
+        public COTSProgMgrParamFile m_cotsprogmgrparamfileclr;          //参数类
         //OTSINTERFACE.CGenParamClr m_cgenparamclr;    //一般参数类
 
         public OTSDisplaySampleGrid(OTSPropertyWindow Propwindow)

+ 4 - 0
OTS/OTSIncAMeasureApp/OTSIncAMeasureApp.csproj

@@ -86,6 +86,10 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\OpenDll\WordApiDll\OTS.WinFormsUI.Docking.dll</HintPath>
     </Reference>
+    <Reference Include="OTSControl, Version=0.0.0.0, Culture=neutral, processorArchitecture=x86">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\Bin\Win32\Debug\OTSControl.dll</HintPath>
+    </Reference>
     <Reference Include="SourceGrid, Version=4.40.7083.30975, Culture=neutral, PublicKeyToken=df6f5e538749e85d, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\OpenDll\WordApiDll\SourceGrid.dll</HintPath>

+ 2 - 1
OTS/OTSIncAMeasureApp/OTSMeasureStatuImageFun/OTSImageData.cs

@@ -1,4 +1,5 @@
-using System;
+using NSOTSController;
+using System;
 /*这个引用包含作图方法*/
 /*这个引用包含作图的Bitmap*/
 using System.Collections.Generic;

+ 2 - 1
OTS/OTSModelSharp/Measure/GetParam/MsrParamFileMgr.cs

@@ -209,9 +209,10 @@ namespace OTSModelSharp
         {
             return m_poMsrParams;
         }
-        public void SetMsrParamFile(CMsrParams a_poMsrParams)
+        public bool SetMsrParamFile(CMsrParams a_poMsrParams)
         {
             m_poMsrParams = a_poMsrParams;
+            return true;
         }
         //--------------protected----------------
         // initialization

+ 2 - 0
OTS/OTSModelSharp/OTSDataType/CBSEImg.cs

@@ -64,6 +64,8 @@ namespace OTSDataType
             Init();
         }
 
+        public bool GetImageDataPtr() { return false; }
+
         public CBSEImg(Rectangle a_rectImage)                //CBSEImg::CBSEImg(CRect a_rectImage): m_pnImageData(NULL)
         {
             // set chat data to 0

+ 4 - 2
OTS/OTSModelSharp/OTSDataType/CDomain.cs

@@ -58,9 +58,11 @@ namespace OTSDataType
 
         }
 
-      //  public bool SetRectDomain(SampleMeasurePara SMeasurePara) { return false; }
+        public bool SetRectDomain(SampleMeasurePara SMeasurePara) { return false; }
 
-        public bool GetRectDomain() { return false; }
+        public Rectangle GetRectDomain() {
+            Rectangle rect = new Rectangle();
+            return rect; }
 
         public bool IsEmpty() { return m_rectDomain.IsEmpty; }
 

+ 3 - 1
OTS/OTSModelSharp/OTSDataType/COTSSample.cs

@@ -328,7 +328,9 @@ public enum   OTS_SAMPLE_PROP_GRID_ITEM_GROUPS
         }
 
         // measurement area
-        public CDomain GetMsrArea() { return m_poMsrArea; }
+        public Rectangle GetMsrArea() {
+            Rectangle rect = new Rectangle();
+            return rect; }
         public void SetMsrArea(CDomain a_poMsrArea)
         {
             m_poMsrArea = a_poMsrArea;

+ 1 - 0
OTS/OTSModelSharp/OTSModelSharp.csproj

@@ -82,6 +82,7 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="CGenParam.cs" />
+    <Compile Include="COTSImgProcPrm.cs" />
     <Compile Include="COTSLicMgr.cs" />
     <Compile Include="CProjMgr.cs" />
     <Compile Include="CSmallParticleInfo.cs" />