Przeglądaj źródła

增加窗口参数

HaoShuang 4 lat temu
rodzic
commit
ff37383d22

+ 7 - 0
HOZProject/App.config

@@ -185,6 +185,13 @@
       <!--add by zjx 2020-12-18 为了测试只做能谱部分-->
       <add key="IsonlyEDSForDebug" value="false"/>
       <!--add by zjx 2020-12-18 为了测试只做能谱部分-->
+
+      <!--add by hs 2020-12-21 为了测试只做能谱部分-->
+      <add key="ReduceX" value="192"/>
+      <add key="ReduceY" value="192"/>
+      <add key="ReduceW" value="256"/>
+      <add key="ReduceH" value="256"/>
+      <!--add by hs 2020-12-21 为了测试只做能谱部分-->
       
     </appSettings>
 </configuration>

+ 5 - 0
HOZProject/UserControls/UControl_Init.cs

@@ -1373,6 +1373,11 @@ namespace HOZProject
             FormHOZMainObject.m_MeasureFile.MParam.EDSV = Convert.ToSingle(ConfigurationManager.AppSettings["EDS_V"].ToString());
             FormHOZMainObject.m_MeasureFile.MParam.EDSA = Convert.ToSingle(ConfigurationManager.AppSettings["EDS_A"].ToString()) / 1000000000;
 
+            FormHOZMainObject.m_MeasureFile.MParam.RedcueX = Convert.ToInt32(ConfigurationManager.AppSettings["RedcueX"].ToString());
+            FormHOZMainObject.m_MeasureFile.MParam.RedcueY = Convert.ToInt32(ConfigurationManager.AppSettings["RedcueY"].ToString());
+            FormHOZMainObject.m_MeasureFile.MParam.RedcueW = Convert.ToInt32(ConfigurationManager.AppSettings["RedcueW"].ToString());
+            FormHOZMainObject.m_MeasureFile.MParam.RedcueH = Convert.ToInt32(ConfigurationManager.AppSettings["RedcueH"].ToString());
+
             if (Directory.Exists(FormHOZMainObject.m_MeasureFile.FilePath))//如果已经存在硬盘上要重新保存文件
             {
                 FormHOZMainObject.m_MeasureFile.Save();

+ 55 - 0
MeasureData/MeasureParam.cs

@@ -424,6 +424,34 @@ namespace MeasureData
         }
         //add by zjx 2020-12-18 为了测试只做能谱部分 end
 
+        //20201221 reduce窗口参数
+        private int m_ReducePos_X;
+        public int RedcueX
+        {
+            get { return this.m_ReducePos_X; }
+            set { this.m_ReducePos_X = value; }
+        }
+
+        private int m_ReducePos_Y;
+        public int RedcueY
+        {
+            get { return this.m_ReducePos_Y; }
+            set { this.m_ReducePos_Y = value; }
+        }
+
+        private int m_ReducePos_W;
+        public int RedcueW
+        {
+            get { return this.m_ReducePos_W; }
+            set { this.m_ReducePos_W = value; }
+        }
+
+        private int m_ReducePos_H;
+        public int RedcueH
+        {
+            get { return this.m_ReducePos_H; }
+            set { this.m_ReducePos_H = value; }
+        }
         #endregion
 
 
@@ -482,6 +510,12 @@ namespace MeasureData
             this.ScanSpeedHigh = "CMD_SCANRATE7";
             //add by sun 2020-12-15 增加不同样品扫描速度参数 end
 
+            //20201221
+            this.RedcueX = 192;
+            this.RedcueY = 192;
+            this.RedcueW = 256;
+            this.RedcueH = 256;
+
         }
 
         //XML文件保存测量参数
@@ -639,6 +673,23 @@ namespace MeasureData
             pscor.AssignValue(this.pixelSizeCor);
             sFile.Register("PixelSizeYCorrect", pscor);
 
+            //Reduce窗口相关
+            xInt R_X = new xInt();
+            R_X.AssignValue(this.RedcueX);
+            sFile.Register("RedcueX", R_X);
+
+            xInt R_Y = new xInt();
+            R_Y.AssignValue(this.RedcueY);
+            sFile.Register("RedcueY", R_Y);
+
+            xInt R_W = new xInt();
+            R_W.AssignValue(this.RedcueW);
+            sFile.Register("RedcueX", R_W);
+
+            xInt R_H = new xInt();
+            R_H.AssignValue(this.RedcueH);
+            sFile.Register("RedcueX", R_H);
+
             if (isStoring)
             {
                 sFile.Serialize(true, xml, rootNode);
@@ -693,6 +744,10 @@ namespace MeasureData
                 this.ScanRotCor = Convert.ToSingle(scanRotate.value());
                 this.PixelSizeCor = Convert.ToSingle(pscor.value());
 
+                this.RedcueX = Convert.ToInt32(R_X.value());
+                this.RedcueY = Convert.ToInt32(R_Y.value());
+                this.RedcueW = Convert.ToInt32(R_W.value());
+                this.RedcueH = Convert.ToInt32(R_H.value());
             }
         }
 

+ 11 - 0
SmartSEMControl/SmartSEMControl.csproj

@@ -62,6 +62,17 @@
     <None Include="App.config" />
     <None Include="packages.config" />
   </ItemGroup>
+  <ItemGroup>
+    <COMReference Include="APILib">
+      <Guid>{71BD42C1-EBD3-11D0-AB3A-444553540000}</Guid>
+      <VersionMajor>1</VersionMajor>
+      <VersionMinor>0</VersionMinor>
+      <Lcid>0</Lcid>
+      <WrapperTool>tlbimp</WrapperTool>
+      <Isolated>False</Isolated>
+      <EmbedInteropTypes>True</EmbedInteropTypes>
+    </COMReference>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>