Forráskód Böngészése

Merge branch 'OTSRelease3_0' of http://36.129.163.148:30080/gogsadmin/OTS into OTSRelease3_0

cxs 1 éve
szülő
commit
7d2f550668

+ 13 - 13
OTSIncAMeasureApp/1-OTSMeasure/Measure/3-MeasureFlow/CMeasure.cs

@@ -248,20 +248,21 @@ namespace OTSModelSharp
                 pSmplMeasure.DoMeasureForOneSample();
 
                 // check if measurement is successful
-                if (pSample.GetMsrStatus().GetStatus() == OTS_MSR_SAMPLE_STATUS.PAUSED)
-                {// record end time
-                    m_ThreadStatus.SetStatus(OTS_MSR_THREAD_STATUS.PAUSED);
-                    m_ThreadStatus.ComputeTime(OTS_THREAD_TIME_TYPE.STOPPED);
+                //if (pSample.GetMsrStatus().GetStatus() == OTS_MSR_SAMPLE_STATUS.PAUSED)
+                //{// record end time
+                //    m_ThreadStatus.SetStatus(OTS_MSR_THREAD_STATUS.PAUSED);
+                //    m_ThreadStatus.ComputeTime(OTS_THREAD_TIME_TYPE.STOPPED);
 
-                    // update thread measure status class, let the main thread know that this sample measurement stopped
-                    ST_MSTMsg MsgSmpStop = new ST_MSTMsg(m_ThreadStatus);
-                    MsgSmpStop.InitThreadPausedMsg();
-                    SendMessageToMeasureGUI(MsgSmpStop);
+                //    // update thread measure status class, let the main thread know that this sample measurement stopped
+                //    ST_MSTMsg MsgSmpStop = new ST_MSTMsg(m_ThreadStatus);
+                //    MsgSmpStop.InitThreadPausedMsg();
+                //    SendMessageToMeasureGUI(MsgSmpStop);
 
 
-                    ThreadOver();
-                    return;
-                }else if (pSample.GetMsrStatus().GetStatus() == OTS_MSR_SAMPLE_STATUS.STOPPED)
+                //    ThreadOver();
+                //    return;
+                //}
+                if (pSample.GetMsrStatus().GetStatus() == OTS_MSR_SAMPLE_STATUS.STOPPED)
                 {// record end time
                     m_ThreadStatus.SetStatus(OTS_MSR_THREAD_STATUS.STOPPED);
                     m_ThreadStatus.ComputeTime(OTS_THREAD_TIME_TYPE.STOPPED);
@@ -272,11 +273,10 @@ namespace OTSModelSharp
                     
                     SendMessageToMeasureGUI(MsgSmpStop);
 
-
                     ThreadOver();
                     break;
                 }
-			    else if (pSample.GetMsrStatus().GetStatus() == OTS_MSR_SAMPLE_STATUS.FAILED)
+			     if (pSample.GetMsrStatus().GetStatus() == OTS_MSR_SAMPLE_STATUS.FAILED)
 			    {
                     // measurement failed
                     m_ThreadStatus.SetStatus(OTS_MSR_THREAD_STATUS.FAILED);

+ 3 - 2
OTSIncAMeasureApp/1-OTSMeasure/Measure/3-MeasureFlow/CMeasureThreadWrapper.cs

@@ -56,6 +56,7 @@ namespace OTSMeasureApp
             m_OTSMeasureResult = new OTSMeasureDisplayResult(m_MeasureApp,m_bgWorker);
 
             m_measure = new CMeasure();
+
             m_measure.ProgressEvent += M_MsrThread_ProgressEvent;
             m_measure.HolePreviewEvent += M_measure_HolePreviewEvent;
 
@@ -327,13 +328,13 @@ namespace OTSMeasureApp
                     }
                     else if (MSTMsg.STMSampleStu.iMsrSampleStatu == OTSDataType.OTS_MSR_SAMPLE_STATUS.FAILED)
                     {
-                        //StopMeasure(MSTMsg);
+                        
                         log.Error("(OTSGetMreRetThread) MSTMsg.STMSampleStu.iMeasureSampleStatus = RET_MEASURE_SAMPLE_STATUS.FAILED Failed");
 
                     }
                     else if (MSTMsg.STMSampleStu.iMsrSampleStatu == OTSDataType.OTS_MSR_SAMPLE_STATUS.SUCCESSED)
                     {
-                        //StopMeasure(MSTMsg);
+                        log.Info("Sample measure succeeded");
                     }
                     else if(MSTMsg.STMSampleStu.iMsrSampleStatu == OTSDataType.OTS_MSR_SAMPLE_STATUS.PAUSED)
                     {

+ 1 - 0
OTSIncAMeasureApp/1-OTSMeasure/Measure/3-MeasureFlow/CSmplMeasure.cs

@@ -788,6 +788,7 @@ namespace OTSModelSharp
                     Thread.Sleep(1000);
                     log.Warn("db saving!");
                 }
+
                 TheLastWorkOfSampleMeasure();
             }
     }

+ 4 - 3
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/OTSMeasureStatusWindow.cs

@@ -277,7 +277,7 @@ namespace OTSMeasureApp
                 }
                 //设置右键菜单中的项 是否可编辑
                 SetContextMenuEnabled(true);
-                GetAcquireBSEImage();
+                AcquireBSEImage();
 
            
            
@@ -289,7 +289,7 @@ namespace OTSMeasureApp
         /// <summary>
         /// 获取BSE图方法
         /// </summary>
-        private void GetAcquireBSEImage()
+        private void AcquireBSEImage()
         {
           
                 //获取电镜中图像大小
@@ -400,6 +400,7 @@ namespace OTSMeasureApp
 
             //电镜设置对象
             IScanController cfun = ScanController.GetScanController();
+            ISemController sem = SemController.GetSEMController();
                 //int GetImgCount = 0;
                 try
                 {
@@ -419,7 +420,7 @@ namespace OTSMeasureApp
                     var bse = cfun.AcquireBSEImage( );
                     bImageData = bse.GetImageDataPtr();
 
-
+                sem.SetScanExternal(false);
                 }
                 catch (Exception ex)
                 {

+ 8 - 43
OTSIncAMeasureApp/Program.cs

@@ -24,13 +24,13 @@ namespace OTSMeasureApp
             if (!System.Diagnostics.Debugger.IsAttached)
             {
                 //判断是否有授权
-                //var reg = new CRegistration();
-                //if (!reg.RegistrationVerification())
-                //{
-                //    MessageBox.Show("Error: missing authorization");
-                //    System.Environment.Exit(0);
-                //    return;
-                //}
+                var reg = new CRegistration();
+                if (!reg.RegistrationVerification())
+                {
+                    MessageBox.Show("Error: missing authorization");
+                    System.Environment.Exit(0);
+                    return;
+                }
             }
 
             //--------------------------只运行一个测量程序--------------------------------
@@ -52,42 +52,7 @@ namespace OTSMeasureApp
             Application.Run(new OTSIncAMeasureAppForm());
            
         }
-        //static System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
-        //{
-        //    string dllname = args.Name.Split(',')[0];
-        //    string path;
-        //    if (dllname.Contains("OINA"))
-        //    {
-        //        if (dllname.Contains("resource"))
-        //        {
-        //            return null;
-
-        //        }
-        //        if (dllname.Contains("XmlSerialize"))
-        //        {
-        //            return null;
-
-        //        }
-        //        path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"OxfordExtender");
-
-
-        //}
-        //    else if (dllname.Contains("resource"))
-        //    {
-        //        return null;
-
-        //    }
-        //    else
-        //    {
-        //        path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"OTSCPPDll");
-
-        //    }
-        //    path = System.IO.Path.Combine(path, dllname);
-        //    path = String.Format(@"{0}.dll", path);
-
-        //    //if (path.Contains("CefSharp")) return null;
-        //    return System.Reflection.Assembly.LoadFrom(path);
-        //}
+        
 
     }
 }

+ 5 - 3
OTSIncAMeasureApp/ServiceCenter/OxfordExtender/ExtenderWrapperIpc.cs

@@ -33,7 +33,8 @@ namespace OTSMeasureApp.ServiceCenter.OxfordExtender
                     ChannelServices.RegisterChannel(channel, false);
                     extenderRemoteObj = (ExtenderIpcUI)Activator.GetObject(typeof(ExtenderIpcUI), "ipc://ExtenderServerChannel/ExtenderIpcUI");
 
-                    extenderRemoteObj.ConnectToEDSHardware();
+                    //extenderRemoteObj.ConnectToEDSHardware();
+                    return extenderRemoteObj;
                 }
                 else 
                 {
@@ -42,13 +43,14 @@ namespace OTSMeasureApp.ServiceCenter.OxfordExtender
                     ChannelServices.RegisterChannel(channel, false);
                     extenderRemoteObj = (ExtenderIpcUI)Activator.GetObject(typeof(ExtenderIpcUI), "ipc://ExtenderServerChannel/ExtenderIpcUI");
 
-                    extenderRemoteObj.ConnectToEDSHardware();
+                    //extenderRemoteObj.ConnectToEDSHardware();
+                    return extenderRemoteObj;
 
                 }
                
                 
             }
-            extenderRemoteObj.ConnectToEDSHardware();
+            extenderRemoteObj.ConnectToEDSHardware();//reconnect ,prevent the connection be closed by other reason accidentally.
             return extenderRemoteObj;
 
         }

+ 19 - 18
OTSIncAReportApp/1-UI/OTSTemplateDesigner/Export_ReportTemplate.cs

@@ -2180,17 +2180,17 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
         //绘制图例
         public Bitmap DrawATernaryDiagramLegend(List<Color> Color_list)
         {
-            Bitmap map = new Bitmap(450, 115);
+            Bitmap map = new Bitmap(260, 115);
             Graphics g = Graphics.FromImage(map);
             SolidBrush sbrush_White = new SolidBrush(Color.White);
             SolidBrush sbrush = new SolidBrush(Color.Black);
-            g.FillRectangle(sbrush_White, 0, 0, 450, 115);
-            Font myFont = new Font("Arial Unicode MS", 10, FontStyle.Bold);
+            g.FillRectangle(sbrush_White, 0, 0, 260, 115);
+            Font myFont = new Font("Arial Unicode MS", 10, FontStyle.Regular);
             Font myFont2 = new Font("Arial Unicode MS", 10, FontStyle.Regular);
-            g.DrawString("legend(length,μm)", myFont, sbrush, 140, 3);
+            g.DrawString("图例(length,μm)", myFont, sbrush, 70, 3);
             //legend(length,microns)
             Pen mypen = new Pen(Color.Black, 1);
-            g.DrawLine(mypen, 100, 19, 350, 19);
+            g.DrawLine(mypen, 70, 19, 170, 19);
 
 
             //设置标签名称
@@ -2212,29 +2212,30 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             double d = Convert.ToDouble(sizestr.Split(',')[sizestr.Split(',').Length - 1]);
             listName.Add(d.ToString() + "~MAX");
             int PositionJeight = 27;
-            string str_unit = " μm";
+            //string str_unit = " μm";
+            string str_unit = "";
             for (int i=0;i< listName.Count;i=i+3)
             {
-                if (i< listName.Count)
+                if (i < listName.Count)
                 {
                     SolidBrush sbrush_Color = new SolidBrush(Color_list[i]);
-                    g.DrawRectangle(mypen, 26, PositionJeight, 8, 8);
-                    g.FillRectangle(sbrush_Color, 27, PositionJeight + 1, 7, 7);
-                    g.DrawString(listName[i].ToString()+ str_unit, myFont2, sbrush, 38, PositionJeight-2);
+                    g.DrawRectangle(mypen, 0, PositionJeight, 8, 8);
+                    g.FillRectangle(sbrush_Color, 1, PositionJeight + 1, 7, 7);
+                    g.DrawString(listName[i].ToString() + str_unit, myFont2, sbrush, 12, PositionJeight - 2);
                 }
-                if (i+1 < listName.Count)
+                if (i + 1 < listName.Count)
                 {
-                    SolidBrush sbrush_Color = new SolidBrush(Color_list[i+1]);
-                    g.DrawRectangle(mypen, 170, PositionJeight, 8, 8);
-                    g.FillRectangle(sbrush_Color, 171, PositionJeight + 1, 7, 7);
-                    g.DrawString(listName[i+1].ToString()+ str_unit, myFont2, sbrush, 182, PositionJeight - 2);
+                    SolidBrush sbrush_Color = new SolidBrush(Color_list[i + 1]);
+                    g.DrawRectangle(mypen, 94, PositionJeight, 8, 8);
+                    g.FillRectangle(sbrush_Color, 95, PositionJeight + 1, 7, 7);
+                    g.DrawString(listName[i + 1].ToString() + str_unit, myFont2, sbrush, 106, PositionJeight - 2);
                 }
                 if (i + 2 < listName.Count)
                 {
                     SolidBrush sbrush_Color = new SolidBrush(Color_list[i + 2]);
-                    g.DrawRectangle(mypen, 314, PositionJeight, 8, 8);
-                    g.FillRectangle(sbrush_Color, 315, PositionJeight + 1, 7, 7);
-                    g.DrawString(listName[i + 2].ToString()+ str_unit, myFont2, sbrush, 326, PositionJeight - 2);
+                    g.DrawRectangle(mypen, 188, PositionJeight, 8, 8);
+                    g.FillRectangle(sbrush_Color, 189, PositionJeight + 1, 7, 7);
+                    g.DrawString(listName[i + 2].ToString() + str_unit, myFont2, sbrush, 199, PositionJeight - 2);
                 }
 
                 PositionJeight = PositionJeight + 15;

+ 11 - 6
OTSIncAReportApp/1-UI/OTSTemplateDesigner/OTSReport_TemplateDesignerRM.cs

@@ -1086,12 +1086,17 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 {
                     // 获取选中的文件路径  
                     string filePath = openFileDialog.FileName;
-                    Bitmap bitmap = (Bitmap)Image.FromFile(filePath).Clone();
-                    //string str3 = System.IO.Directory.GetCurrentDirectory();
-                    //bitmap.Save(str3 + "\\Config\\ReportTemplate\\ReportIdentification.bmp");
-                    pictureBox7.Image.Dispose();
-                    pictureBox7.Image = (Image)bitmap.Clone();
-                    //bitmap.Dispose();
+                    try
+                    {
+                        Bitmap bitmap = (Bitmap)Image.FromFile(filePath).Clone();
+                        pictureBox7.Image.Dispose();
+                        pictureBox7.Image = (Image)bitmap.Clone();
+                    }
+                    catch
+                    {
+                        MessageBox.Show("图片已被打开,请关闭改图片!");
+                    }
+                    
                     
                 }
             }

+ 1 - 9
OTSIncAReportApp/Program.cs

@@ -72,15 +72,7 @@ namespace OTSIncAReportApp
             //if (path.Contains("CefSharp")) return null;
             return System.Reflection.Assembly.LoadFrom(path);
         }
-        //static System.Reflection.Assembly CurrentDomain_ResourcesAssemblyResolve(object sender, ResolveEventArgs args)
-        //{
-        //    string dllName = args.Name.Contains(",") ? args.Name.Substring(0, args.Name.IndexOf(',')) : args.Name.Replace(".dll", "");
-        //    dllName = dllName.Replace(".", "_");
-        //    if (dllName.EndsWith("_resources")) return null;
-        //    System.Resources.ResourceManager rm = new System.Resources.ResourceManager(GetType().Namespace + ".Properties.Resources", System.Reflection.Assembly.GetExecutingAssembly());
-        //    byte[] bytes = (byte[])rm.GetObject(dllName);
-        //    return System.Reflection.Assembly.Load(bytes);
-        //}
+      
 
     }
 }

+ 95 - 38
OTSIncAReportApp/ReportTemplate/OTS_DEVReport.cs

@@ -25,6 +25,9 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
 
         //float LowPlace = 3120f;
         float NeueStartposition = 3300f;
+        private string FieldOfViewArea = "";
+
+
 
         ElementSubscript subscript = new ElementSubscript();
 
@@ -146,11 +149,11 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             setTableCellData(dev_sczs_text, str_SCZS);//视场总数
             setTableCellData(dev_flfa_text, str_FLFA);//分类方案
             setTableCellData(dev_yjctz_text, str_YJCTZ);//已检测特征
-            setTableCellData(dev_scmj_text, str_SCMJ);//视场面积
+            setTableCellData(dev_scmj_text, str_SCMJ+ "μm²");//视场面积
             setTableCellData(dev_fdbs_text, Magnification);//放大倍数
             setTableCellData(dev_bgsj_text, DateTime.Now.ToShortDateString().ToString());//报告时间:
             setTableCellData(dev_ckbz_text, TemplateClass.M_SY.str_tb_CKBZ.ToString());//参考标准
-
+            FieldOfViewArea = str_SCMJ;
             #endregion
             #region 加载模板设置文档数据
             //setXRLabelData(dev_ym, TemplateClass.M_YMYJ.str_tb_ymwb.ToString());//页眉
@@ -205,7 +208,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             dev_size_6.Text = ls_partsize_dt.Rows[0]["c6"].ToString();
             dev_size_7.Text = ls_partsize_dt.Rows[0]["c7"].ToString();
             dev_DimensionTable_2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
-            dev_DimensionTable_2.Text = dev_DimensionTable_2.Text.ToString() + TemplateClass.M_KLFXJG.str_cb_klcc_jsfs.ToString() + ", μm";
+            dev_DimensionTable_2.Text = dev_DimensionTable_2.Text.ToString() + TemplateClass.M_KLFXJG.str_cb_klcc_jsfs.ToString() + "(μm)";
             dev_DimensionTable_2.Font = new Font(Schriftart_chinese, dev_DimensionTable_2.Font.Size);
             for (int i = 0; i < surface_dt.Rows.Count; i++)
             {
@@ -574,7 +577,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
         public void setINCAtable()
         {
            
-            export_ReportTemplate.GenerateINCAtable(dev_scmj_text.Text, out DataTable dt);
+            export_ReportTemplate.GenerateINCAtable(FieldOfViewArea, out DataTable dt);
             xr_tbAreaOfInclusion.Visible = true;
             List<List<AreaOfInclusionDEVData>> list_AreaOfInclusion = new List<List<AreaOfInclusionDEVData>>();
             for (int i = 0; i < dt.Rows.Count; i++)
@@ -717,43 +720,77 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             this.xrChart_incaSubdivision.Legend.VerticalIndent = 5;
             this.xrChart_incaSubdivision.Legend.Border.Color = Color.Red;//红色边框
         }
+
+        public static Color FromHex(string hex)
+        {
+            hex = hex.Replace("#", ""); // 移除 # 前缀  
+            byte a = 255; // 默认Alpha值为255(不透明)  
+            byte r = Convert.ToByte(hex.Substring(0, 2), 16);
+            byte g = Convert.ToByte(hex.Substring(2, 2), 16);
+            byte b = Convert.ToByte(hex.Substring(4, 2), 16);
+            return Color.FromArgb(a, r, g, b);          
+        }
         /// <summary>
         /// 三元图
         /// </summary>
         /// <param name="TemplateClass"></param>
         public void InsertReportTemplateChart_Trianglediagram()
         {
+            this.Detail.Controls.Add(add_label("三元图"));
             List<Color> Color_list = new List<Color>();
-            Color_list.Add(Color.FromArgb(238, 175, 14));
-            Color_list.Add(Color.FromArgb(0, 0, 238));
-            Color_list.Add(Color.FromArgb(0, 205, 0));
-            Color_list.Add(Color.FromArgb(238, 0, 0));
-            Color_list.Add(Color.FromArgb(153, 50, 204));
-            Color_list.Add(Color.FromArgb(255, 102, 153));
-            Color_list.Add(Color.FromArgb(160, 82, 45));
-            Color_list.Add(Color.FromArgb(181, 181, 181));
-            Color_list.Add(Color.FromArgb(250, 235, 215));
-            Color_list.Add(Color.FromArgb(238, 130, 238));
-            Color_list.Add(Color.FromArgb(174, 238, 238));
-            Color_list.Add(Color.FromArgb(247, 172, 189));
-            Color_list.Add(Color.FromArgb(202, 134, 135));
-            Color_list.Add(Color.FromArgb(34, 90, 31));
-
-            Color_list.Add(Color.FromArgb(238, 175, 14));
-            Color_list.Add(Color.FromArgb(0, 0, 238));
-            Color_list.Add(Color.FromArgb(0, 205, 0));
-            Color_list.Add(Color.FromArgb(238, 0, 0));
-            Color_list.Add(Color.FromArgb(153, 50, 204));
-            Color_list.Add(Color.FromArgb(255, 102, 153));
-            Color_list.Add(Color.FromArgb(160, 82, 45));
-            Color_list.Add(Color.FromArgb(181, 181, 181));
-            Color_list.Add(Color.FromArgb(250, 235, 215));
-            Color_list.Add(Color.FromArgb(238, 130, 238));
-            Color_list.Add(Color.FromArgb(174, 238, 238));
-            Color_list.Add(Color.FromArgb(247, 172, 189));
-            Color_list.Add(Color.FromArgb(202, 134, 135));
-            Color_list.Add(Color.FromArgb(34, 90, 31));
- 
+            Color_list.Add(FromHex("#0f4471"));
+            Color_list.Add(FromHex("#FFD700"));
+            Color_list.Add(FromHex("#ff5722"));
+            Color_list.Add(FromHex("#5628b4"));
+            Color_list.Add(FromHex("#20BF55"));
+            Color_list.Add(FromHex("#f23557"));
+            Color_list.Add(FromHex("#118df0"));
+            Color_list.Add(FromHex("#FF00FF"));
+            Color_list.Add(FromHex("#d3327b"));
+            Color_list.Add(FromHex("#ae318a"));
+            Color_list.Add(FromHex("#993090"));
+            Color_list.Add(FromHex("#6f3071"));
+            Color_list.Add(FromHex("#7711AF"));
+            Color_list.Add(FromHex("#CF77FF"));
+            Color_list.Add(FromHex("#AE004F"));
+            Color_list.Add(FromHex("#F35872"));
+            Color_list.Add(FromHex("#FA7729"));
+            Color_list.Add(FromHex("#FFC526"));
+            Color_list.Add(FromHex("#F8E71C"));
+            Color_list.Add(FromHex("#34ADAE"));
+            Color_list.Add(FromHex("#3DDFD2"));
+            Color_list.Add(FromHex("#A0FFFF"));
+     
+            //Color_list.Add(Color.FromArgb(238, 175, 14));
+            //Color_list.Add(Color.FromArgb(0, 0, 238));
+            //Color_list.Add(Color.FromArgb(0, 205, 0));
+            //Color_list.Add(Color.FromArgb(238, 0, 0));
+            //Color_list.Add(Color.FromArgb(153, 50, 204));
+            //Color_list.Add(Color.FromArgb(255, 102, 153));
+            //Color_list.Add(Color.FromArgb(160, 82, 45));
+            //Color_list.Add(Color.FromArgb(181, 181, 181));
+            //Color_list.Add(Color.FromArgb(250, 235, 215));
+            //Color_list.Add(Color.FromArgb(238, 130, 238));
+            //Color_list.Add(Color.FromArgb(174, 238, 238));
+            //Color_list.Add(Color.FromArgb(247, 172, 189));
+            //Color_list.Add(Color.FromArgb(202, 134, 135));
+            //Color_list.Add(Color.FromArgb(34, 90, 31));
+
+            //Color_list.Add(Color.FromArgb(238, 175, 14));
+            //Color_list.Add(Color.FromArgb(0, 0, 238));
+            //Color_list.Add(Color.FromArgb(0, 205, 0));
+            //Color_list.Add(Color.FromArgb(238, 0, 0));
+            //Color_list.Add(Color.FromArgb(153, 50, 204));
+            //Color_list.Add(Color.FromArgb(255, 102, 153));
+            //Color_list.Add(Color.FromArgb(160, 82, 45));
+            //Color_list.Add(Color.FromArgb(181, 181, 181));
+            //Color_list.Add(Color.FromArgb(250, 235, 215));
+            //Color_list.Add(Color.FromArgb(238, 130, 238));
+            //Color_list.Add(Color.FromArgb(174, 238, 238));
+            //Color_list.Add(Color.FromArgb(247, 172, 189));
+            //Color_list.Add(Color.FromArgb(202, 134, 135));
+            //Color_list.Add(Color.FromArgb(34, 90, 31));
+
 
             for (int i = 0; i < TemplateClass.M_SYXT.list_lbv_syxt_mblb_index.Count; i=i+4)
             {
@@ -811,7 +848,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             xrTable_kllb_surface.LocationF = new PointF(0, NeueStartposition + 5);
             xrTable_kllb_surface.Visible = true;
             NeueStartposition = xrTable_kllb_surface.LocationF.Y + xrTable_kllb_surface.SizeF.Height;
-            xrTableCell2.Text = "Selected particles based on:" + TemplateClass.M_KLLBXX.str_cb_kllb_sort_p1.ToString();
+            xrTableCell2.Text = "Selected particles based on:" + TemplateClass.M_KLLBXX.str_cb_kllb_sort_p1.ToString()+ "(μm)";
             DataTable dataTable = export_ReportTemplate.Get_dev_kllb_data(TemplateClass);
 
             for (int i = 0; i < dataTable.Rows.Count; i++)
@@ -867,7 +904,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
                 Template.LocationF = new PointF(0, NeueStartposition);
                 Template.Borders = DevExpress.XtraPrinting.BorderSide.All;
                 Template.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
-                Template.Rows[0].Font = new Font(Schriftart_chinese, 14f, FontStyle.Bold);
+                Template.Rows[0].Font = new Font(Schriftart_chinese, 14f, FontStyle.Regular);
                 Template.Rows[0].BackColor = Color.DarkGray;
                 this.Detail.Controls.Add(Template);
                 //图片
@@ -1104,8 +1141,8 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
         {
             XRPictureBox xRPicture_legend = new XRPictureBox();
          
-            xRPicture_legend.LocationF = new PointF(95f, NeueStartposition);
-            xRPicture_legend.SizeF = new SizeF(504f, 120.85f);
+            xRPicture_legend.LocationF = new PointF(400f, NeueStartposition);
+            xRPicture_legend.SizeF = new SizeF(260f, 120f);
             xRPicture_legend.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
             ImageSource imageSource_legend = new ImageSource(export_ReportTemplate.DrawATernaryDiagramLegend(Color_list));
             xRPicture_legend.ImageSource = imageSource_legend;
@@ -1113,6 +1150,26 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             this.Detail.Controls.Add(xRPicture_legend);
         }
         #endregion
+
+        private XRTable add_label(string str)
+        {
+            XRTable Template = new XRTable();
+            XRTableRow Template_Rows_1 = new XRTableRow();
+            XRTableCell Template_Rows1_Cell_2 = new XRTableCell();
+            Template_Rows1_Cell_2.WidthF = 630f;
+            Template_Rows1_Cell_2.Text = str;
+            Template_Rows_1.Controls.Add(Template_Rows1_Cell_2);
+            Template.Rows.Add(Template_Rows_1);
+            Template.WidthF = 630f;
+            //Template.SizeF = new SizeF(688f, 125);
+            Template.Borders = DevExpress.XtraPrinting.BorderSide.All;
+            Template.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
+            Template.LocationF = new PointF(30.42f, NeueStartposition);
+            Template.BackColor = Color.DarkGray;
+            NeueStartposition = NeueStartposition + Template.SizeF.Height;
+            return Template;
+        }
+
         #region 颗粒列表
         private XRTable add_XRTable()
         {

+ 3 - 5
OxfordExtenderWrapper/ExtenderWrapper.cs

@@ -12,9 +12,7 @@ using OINA.Extender.Processing.Ed;
 using OINA.Extender.Processing.Quant;
 using System;
 using System.Collections.Generic;
-using System.Drawing;
-using System.Drawing.Imaging;
-using System.IO;
+
 using System.Linq;
 using System.Text;
 using System.Threading;
@@ -777,9 +775,9 @@ namespace OxfordExtenderWrapper
             this.microscopeController.ChangeCompleted += this.OnMicroscopeChangeCompleted;
            
 
-            ReadMicroscopeColumn();
+            //ReadMicroscopeColumn();
 
-            ReadStage();
+            //ReadStage();
 
         }
 

+ 27 - 5
OxfordExtenderWrapper/OxfordExtenderWrapper.csproj

@@ -39,17 +39,37 @@
     <Prefer32Bit>true</Prefer32Bit>
   </PropertyGroup>
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <ItemGroup>
-    <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
+  <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_oxford61|x64' ">
+    <Reference Include="OINA.Extender, Version=6.1.0.0, Culture=neutral, PublicKeyToken=5efad68c95e0364e, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\OpenDll\Nlog\NLog.dll</HintPath>
+      <HintPath>..\OpenDll\OxfordApi61Dll\OINA.Extender.dll</HintPath>
       <Private>False</Private>
     </Reference>
-    <Reference Include="OINA.Extender, Version=6.1.0.0, Culture=neutral, PublicKeyToken=5efad68c95e0364e, processorArchitecture=MSIL">
+  </ItemGroup>
+  <ItemGroup  Condition=" '$(Configuration)|$(Platform)' == 'Release_oxford60|x64' ">
+
+    <Reference  Include="OINA.Extender, Version=6.0.0.0, Culture=neutral, PublicKeyToken=5efad68c95e0364e, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\OpenDll\OxfordApi60Dll\OINA.Extender.dll</HintPath>
       <Private>False</Private>
     </Reference>
+  </ItemGroup>
+  <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_oxford50|x64' ">
+
+    <Reference Include="OINA.Extender, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5efad68c95e0364e, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\OpenDll\OxfordApi50Dll\OINA.Extender.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+  </ItemGroup>
+
+  <ItemGroup>
+    <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\OpenDll\Nlog\NLog.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+   
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Drawing" />
@@ -88,7 +108,9 @@
     </Compile>
   </ItemGroup>
   <ItemGroup>
-    <None Include="app.config" />
+    <None Include="app.config">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
   </ItemGroup>
   <ItemGroup>
     <EmbeddedResource Include="Form1.resx">

+ 2 - 1
OxfordExtenderWrapper/app.config

@@ -5,7 +5,8 @@
   
   <runtime>
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
-
+      
+    
 
       <dependentAssembly>
         <assemblyIdentity name="SQLitePCLRaw.core" publicKeyToken="1488e028ca7ab535" culture="neutral" />