Bläddra i källkod

Merge branch 'Release2.4' of http://36.129.163.148:10080/gaoshipeng/OTS2_0 into Release2.4

cxs 2 år sedan
förälder
incheckning
830d17ae66

+ 20 - 7
OTSIncAMeasureApp/0-OTSModel/OTSDataType/CSEMDataMsr.cs

@@ -16,6 +16,7 @@ namespace OTSDataType
         private double m_dWorkingDistance;
         private int m_nTotalFields;
         private int m_nScanFieldHeight100;
+        private double m_magnification;
 
         public CSEMDataMsr()
 	{
@@ -28,6 +29,7 @@ namespace OTSDataType
             m_nScanFieldSize100 = 1142;
             m_dWorkingDistance = 0;
             m_nTotalFields = 0;
+            m_magnification = 0;
         }
 
      public    CSEMDataMsr ( CSEMDataMsr a_oSource)
@@ -45,6 +47,7 @@ namespace OTSDataType
         m_nScanFieldWidth = a_oSource.m_nScanFieldWidth;
 		m_nScanFieldSize100 = a_oSource.m_nScanFieldSize100;
 		m_dWorkingDistance = a_oSource.m_dWorkingDistance;
+        m_magnification = a_oSource.m_magnification;
 		m_nTotalFields = a_oSource.m_nTotalFields;
 	}
 
@@ -76,17 +79,22 @@ namespace OTSDataType
 
         public double GetMagnification()
         {
-            // magnification
-            double dMag = 0.0;
-
-            // convert scan field size to magnification
-            if (m_nScanFieldWidth > 0)
+            if (m_magnification == 0)
             {
-                dMag = (double)m_nScanFieldSize100 * 100.0 / (double)m_nScanFieldWidth;
+                // magnification
+                double dMag = 0.0;
+
+                // convert scan field size to magnification
+                if (m_nScanFieldWidth > 0)
+                {
+                    dMag = (double)m_nScanFieldSize100 * 100.0 / (double)m_nScanFieldWidth;
+                }
+                m_magnification = dMag;
             }
+           
 
             // return magnification
-            return dMag;
+            return m_magnification;
         }
        public void SetMagnification(double a_dMag)
         {
@@ -94,6 +102,7 @@ namespace OTSDataType
             {
                 return;
             }
+            m_magnification = a_dMag;
             m_nScanFieldWidth = (int)(100.0 * (double)m_nScanFieldSize100 / a_dMag + 0.5);
             m_nScanFieldHeight= (int)(100.0 * (double)m_nScanFieldHeight100 / a_dMag + 0.5);
         }
@@ -104,12 +113,14 @@ namespace OTSDataType
            xInt xnScanFieldHeight = new xInt();
            xInt xnScanFieldSize100=new xInt();
            xDouble xdWorkingDistance=new xDouble();
+            xDouble xMag = new xDouble();
            xInt xnTotalFields=new xInt();
            Slo slo=new Slo();
             slo.Register("ScanFieldSize", xnScanFieldSize);
             slo.Register("ScanFieldHeight", xnScanFieldHeight);
             slo.Register("ScanFieldSize100", xnScanFieldSize100);
             slo.Register("WorkingDistance", xdWorkingDistance);
+            slo.Register("Magnification", xMag);
             slo.Register("TotalFields", xnTotalFields);
 
             if (isStoring)
@@ -118,6 +129,7 @@ namespace OTSDataType
                 xnScanFieldHeight.AssignValue(m_nScanFieldHeight);
                 xnScanFieldSize100.AssignValue(m_nScanFieldSize100);
                 xdWorkingDistance.AssignValue(m_dWorkingDistance);
+                xMag.AssignValue(m_magnification);
                 xnTotalFields.AssignValue(m_nTotalFields);
 
                 slo.Serialize(true, classDoc, rootNode);
@@ -130,6 +142,7 @@ namespace OTSDataType
                 m_nScanFieldWidth = xnScanFieldSize.value();
                 m_nScanFieldSize100 = xnScanFieldSize100.value();
                 m_dWorkingDistance = xdWorkingDistance.value();
+                m_magnification = xMag.value();
                 m_nTotalFields = xnTotalFields.value();
             }
         }

+ 2 - 2
OTSIncAReportTemplate/OTSIncAReportTemplate.csproj

@@ -49,7 +49,7 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
     <DebugSymbols>true</DebugSymbols>
-    <OutputPath>..\Bin\x64\Debug\</OutputPath>
+    <OutputPath>..\Bin\x64\Debug\ReportTemplateExe\</OutputPath>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <DebugType>full</DebugType>
     <PlatformTarget>x86</PlatformTarget>
@@ -79,7 +79,7 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_oxford50|x86'">
     <PlatformTarget>x86</PlatformTarget>
-    <OutputPath>..\Bin\x64\Release_oxford50\</OutputPath>
+    <OutputPath>..\Bin\x64\Release_oxford50\ReportTemplateExe\</OutputPath>
     <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'CleannessRelease|AnyCPU'">