ソースを参照

binding the Nlog window to a window which is in our application.

gsp 3 年 前
コミット
6bd835c00c

+ 22 - 66
OTSIncAMeasureApp/OTSIncAMeasureApp.csproj

@@ -193,9 +193,7 @@
     <Compile Include="0-OTSModel\Measure\ParamData\COTSMsrPrjResultData.cs" />
     <Compile Include="0-OTSModel\Measure\ParamData\CSampleParamMgr.cs" />
     <Compile Include="0-OTSModel\Measure\ParamData\CSpecialGrayRangeParam.cs" />
-    <Compile Include="0-OTSModel\Measure\ParamData\DIALOG_CHECK_PARAM_RESULT.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="0-OTSModel\Measure\ParamData\DIALOG_CHECK_PARAM_RESULT.cs" />
     <Compile Include="0-OTSModel\Measure\ParamData\DIALOG_CHECK_PARAM_RESULT.designer.cs">
       <DependentUpon>DIALOG_CHECK_PARAM_RESULT.cs</DependentUpon>
     </Compile>
@@ -250,21 +248,15 @@
     <Compile Include="5-OTSMeasureStatuImageFun\frmSpecialGrayParticle.Designer.cs">
       <DependentUpon>frmSpecialGrayParticle.cs</DependentUpon>
     </Compile>
-    <Compile Include="7-OTSProgMgrInfo\Stage\DlgStageEdit.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="7-OTSProgMgrInfo\Stage\DlgStageEdit.cs" />
     <Compile Include="7-OTSProgMgrInfo\Stage\DlgStageEdit.Designer.cs">
       <DependentUpon>DlgStageEdit.cs</DependentUpon>
     </Compile>
-    <Compile Include="7-OTSProgMgrInfo\Stage\DlgStageMgr.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="7-OTSProgMgrInfo\Stage\DlgStageMgr.cs" />
     <Compile Include="7-OTSProgMgrInfo\Stage\DlgStageMgr.Designer.cs">
       <DependentUpon>DlgStageMgr.cs</DependentUpon>
     </Compile>
-    <Compile Include="7-OTSProgMgrInfo\Stage\DlgStageRename.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="7-OTSProgMgrInfo\Stage\DlgStageRename.cs" />
     <Compile Include="7-OTSProgMgrInfo\Stage\DlgStageRename.Designer.cs">
       <DependentUpon>DlgStageRename.cs</DependentUpon>
     </Compile>
@@ -302,74 +294,52 @@
       <DesignTime>True</DesignTime>
       <DependentUpon>OTSPropertyWindow.resx</DependentUpon>
     </Compile>
-    <Compile Include="5-OTSMeasureStatuImageFun\Control_Ruler.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="5-OTSMeasureStatuImageFun\Control_Ruler.cs" />
     <Compile Include="5-OTSMeasureStatuImageFun\Control_Ruler.designer.cs">
       <DependentUpon>Control_Ruler.cs</DependentUpon>
     </Compile>
-    <Compile Include="5-OTSMeasureStatuImageFun\Control_XRayTable.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="5-OTSMeasureStatuImageFun\Control_XRayTable.cs" />
     <Compile Include="5-OTSMeasureStatuImageFun\Control_XRayTable.designer.cs">
       <DependentUpon>Control_XRayTable.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-OTSMeasure\MeasureCheckResultInfoWindow.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-OTSMeasure\MeasureCheckResultInfoWindow.cs" />
     <Compile Include="1-OTSMeasure\MeasureCheckResultInfoWindow.Designer.cs">
       <DependentUpon>MeasureCheckResultInfoWindow.cs</DependentUpon>
     </Compile>
     <Compile Include="2-OTSMeasureParamManage\COTSMeasureParam.cs" />
-    <Compile Include="About.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="About.cs" />
     <Compile Include="About.Designer.cs">
       <DependentUpon>About.cs</DependentUpon>
     </Compile>
     <Compile Include="OTSPeriodicTable\ComboBoxItem.cs" />
-    <Compile Include="OTSPeriodicTable\OTSPeriodicTableForm.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="OTSPeriodicTable\OTSPeriodicTableForm.cs" />
     <Compile Include="OTSPeriodicTable\OTSPeriodicTableForm.Designer.cs">
       <DependentUpon>OTSPeriodicTableForm.cs</DependentUpon>
     </Compile>
-    <Compile Include="OTSPeriodicTable\OTSPeriodicTableForm_Small.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="OTSPeriodicTable\OTSPeriodicTableForm_Small.cs" />
     <Compile Include="OTSPeriodicTable\OTSPeriodicTableForm_Small.Designer.cs">
       <DependentUpon>OTSPeriodicTableForm_Small.cs</DependentUpon>
     </Compile>
     <Compile Include="OTSPeriodicTable\Periodic.cs" />
-    <Compile Include="OTSPeriodicTable\ThePeriodicTable.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="OTSPeriodicTable\ThePeriodicTable.cs" />
     <Compile Include="OTSPeriodicTable\ThePeriodicTable.designer.cs">
       <DependentUpon>ThePeriodicTable.cs</DependentUpon>
     </Compile>
-    <Compile Include="OTSPeriodicTable\ThePeriodicTable_Small.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="OTSPeriodicTable\ThePeriodicTable_Small.cs" />
     <Compile Include="OTSPeriodicTable\ThePeriodicTable_Small.designer.cs">
       <DependentUpon>ThePeriodicTable_Small.cs</DependentUpon>
     </Compile>
-    <Compile Include="OTSPeriodicTable\User_Element.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="OTSPeriodicTable\User_Element.cs" />
     <Compile Include="OTSPeriodicTable\User_Element.designer.cs">
       <DependentUpon>User_Element.cs</DependentUpon>
     </Compile>
-    <Compile Include="OTSPeriodicTable\User_Element_Small.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="OTSPeriodicTable\User_Element_Small.cs" />
     <Compile Include="OTSPeriodicTable\User_Element_Small.designer.cs">
       <DependentUpon>User_Element_Small.cs</DependentUpon>
     </Compile>
     <Compile Include="8-OTSSampleMeasureInfo\OTSSampleData.cs" />
     <Compile Include="3-OTSDisplaySourceGridData\OTSDisplaySampleGrid.cs" />
-    <Compile Include="OTSMeasureOutputNlog.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="OTSMeasureOutputNlog.cs" />
     <Compile Include="OTSMeasureOutputNlog.Designer.cs">
       <DependentUpon>OTSMeasureOutputNlog.cs</DependentUpon>
     </Compile>
@@ -377,9 +347,7 @@
     <Compile Include="5-OTSMeasureStatuImageFun\OTSImageData.cs" />
     <Compile Include="1-OTSMeasure\OTSMeasureDisplayResult.cs" />
     <Compile Include="1-OTSMeasure\CMeasureThreadWrapper.cs" />
-    <Compile Include="7-OTSProgMgrInfo\ProgMgrInfoForm.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="7-OTSProgMgrInfo\ProgMgrInfoForm.cs" />
     <Compile Include="7-OTSProgMgrInfo\ProgMgrInfoForm.designer.cs">
       <DependentUpon>ProgMgrInfoForm.cs</DependentUpon>
     </Compile>
@@ -393,21 +361,15 @@
     <Compile Include="OTSIncAMeasureAppForm.Designer.cs">
       <DependentUpon>OTSIncAMeasureAppForm.cs</DependentUpon>
     </Compile>
-    <Compile Include="1-OTSMeasure\OTSMeasureResultWindow.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="1-OTSMeasure\OTSMeasureResultWindow.cs" />
     <Compile Include="1-OTSMeasure\OTSMeasureResultWindow.Designer.cs">
       <DependentUpon>OTSMeasureResultWindow.cs</DependentUpon>
     </Compile>
-    <Compile Include="5-OTSMeasureStatuImageFun\OTSMeasureStatusWindow.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="5-OTSMeasureStatuImageFun\OTSMeasureStatusWindow.cs" />
     <Compile Include="5-OTSMeasureStatuImageFun\OTSMeasureStatusWindow.Designer.cs">
       <DependentUpon>OTSMeasureStatusWindow.cs</DependentUpon>
     </Compile>
-    <Compile Include="3-OTSDisplaySourceGridData\OTSPropertyWindow.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="3-OTSDisplaySourceGridData\OTSPropertyWindow.cs" />
     <Compile Include="3-OTSDisplaySourceGridData\OTSPropertyWindow.Designer.cs">
       <DependentUpon>OTSPropertyWindow.cs</DependentUpon>
     </Compile>
@@ -415,15 +377,11 @@
     <Compile Include="5-OTSMeasureStatuImageFun\OTSBSEImageFun.cs" />
     <Compile Include="4-OTSSamplespaceGraphicsPanel\OTSSamplespaceGraphicsPanelFun.cs" />
     <Compile Include="4-OTSSamplespaceGraphicsPanel\SEMDATAFieldManage.cs" />
-    <Compile Include="4-OTSSamplespaceGraphicsPanel\OTSSamplespaceWindow.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="4-OTSSamplespaceGraphicsPanel\OTSSamplespaceWindow.cs" />
     <Compile Include="4-OTSSamplespaceGraphicsPanel\OTSSamplespaceWindow.Designer.cs">
       <DependentUpon>OTSSamplespaceWindow.cs</DependentUpon>
     </Compile>
-    <Compile Include="6-OTSDisplayTreeViewData\OTSSolutionWindow.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="6-OTSDisplayTreeViewData\OTSSolutionWindow.cs" />
     <Compile Include="6-OTSDisplayTreeViewData\OTSSolutionWindow.Designer.cs">
       <DependentUpon>OTSSolutionWindow.cs</DependentUpon>
     </Compile>
@@ -434,9 +392,7 @@
       <DesignTime>True</DesignTime>
       <DependentUpon>IDDescriptionResource.resx</DependentUpon>
     </Compile>
-    <Compile Include="5-OTSMeasureStatuImageFun\ToolWindow.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="5-OTSMeasureStatuImageFun\ToolWindow.cs" />
     <Compile Include="5-OTSMeasureStatuImageFun\ToolWindow.Designer.cs">
       <DependentUpon>ToolWindow.cs</DependentUpon>
     </Compile>

+ 16 - 8
OTSIncAReportApp/1-UI/frmReportApp.cs

@@ -205,9 +205,11 @@ namespace OTSIncAReportApp
         /// </summary>
         public frmReportApp()
         {
-           
+            m_OutputNlog = new OutputNlog();
+            m_OutputNlog.Visible = true;
+            log = NLog.LogManager.GetCurrentClassLogger();
             InitializeComponent();
-
+           
             //初始化Ribbon类,操作Ribbon按钮的可用或者不可用
             m_RibbonFun = new OTSRibbonFun(this);
             //和DataMgr进行数据交互类
@@ -260,11 +262,14 @@ namespace OTSIncAReportApp
         /// </summary>
         public frmReportApp(string[] str_resultfilepaths)
         {
-           
+            m_OutputNlog = new OutputNlog();
+            m_OutputNlog.Visible = true;
+            log = NLog.LogManager.GetCurrentClassLogger();
+
             m_str_resultfilepaths = str_resultfilepaths;
             
             InitializeComponent();
-            log = NLog.LogManager.GetCurrentClassLogger();
+          
 
           
 
@@ -305,9 +310,12 @@ namespace OTSIncAReportApp
         /// <param name="e"></param>
         private void OTSReportApp_Load(object sender, EventArgs e)
         {
-        
+            //m_OutputNlog = new OutputNlog();
+           
 
-          //------------- initialize the HMI of the main form.
+            log = NLog.LogManager.GetCurrentClassLogger();
+
+            //------------- initialize the HMI of the main form.
             if (Cef.IsInitialized == false)
             {
                 var settings = new CefSettings();
@@ -330,7 +338,7 @@ namespace OTSIncAReportApp
             //激活分布图窗体
             this.m_SImageWindow.Activate();
             //----------------end the initialization
-            log = NLog.LogManager.GetCurrentClassLogger();
+         
             if (m_str_resultfilepaths != null)
             {
                 //构造函数直接接收传入的测量结果文件,并加载
@@ -842,7 +850,7 @@ namespace OTSIncAReportApp
             //创建图表窗口
             CreateChartsWindow();
 
-            m_OutputNlog = new OutputNlog();
+           
 
             m_OutputNlog.Show(DockWindowPanel, OTS.WinFormsUI.Docking.DockState.DockRight);
             m_OutputNlog.Visible = true;

+ 1 - 0
OTSIncAReportApp/Program.cs

@@ -13,6 +13,7 @@ namespace OTSIncAReportApp
         {
             Application.EnableVisualStyles();
             Application.SetCompatibleTextRenderingDefault(false);
+           
 
             //分别调用无参报告,和带参报告        
             if (args.Length == 0)

+ 15 - 45
OTSPartA_STDEditor/OTSPartA_STDEditor.csproj

@@ -107,28 +107,20 @@
     <Reference Include="WindowsBase" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="Attributes.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="Attributes.cs" />
     <Compile Include="Attributes.Designer.cs">
       <DependentUpon>Attributes.cs</DependentUpon>
     </Compile>
     <Compile Include="CommonClass\SqlLiteClass.cs" />
-    <Compile Include="FormForWaiting.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="FormForWaiting.cs" />
     <Compile Include="FormForWaiting.Designer.cs">
       <DependentUpon>FormForWaiting.cs</DependentUpon>
     </Compile>
-    <Compile Include="Form_GroupId.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="Form_GroupId.cs" />
     <Compile Include="Form_GroupId.Designer.cs">
       <DependentUpon>Form_GroupId.cs</DependentUpon>
     </Compile>
-    <Compile Include="Form_PeriodicTable.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="Form_PeriodicTable.cs" />
     <Compile Include="Form_PeriodicTable.Designer.cs">
       <DependentUpon>Form_PeriodicTable.cs</DependentUpon>
     </Compile>
@@ -138,40 +130,28 @@
       <DesignTime>True</DesignTime>
       <DependentUpon>Resources.resx</DependentUpon>
     </Compile>
-    <Compile Include="ReferenceLibrary.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="ReferenceLibrary.cs" />
     <Compile Include="ReferenceLibrary.Designer.cs">
       <DependentUpon>ReferenceLibrary.cs</DependentUpon>
     </Compile>
-    <Compile Include="Form_MaxEDSRules.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="Form_MaxEDSRules.cs" />
     <Compile Include="Form_MaxEDSRules.Designer.cs">
       <DependentUpon>Form_MaxEDSRules.cs</DependentUpon>
     </Compile>
-    <Compile Include="Form_UserConstants.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="Form_UserConstants.cs" />
     <Compile Include="Form_UserConstants.Designer.cs">
       <DependentUpon>Form_UserConstants.cs</DependentUpon>
     </Compile>
-    <Compile Include="Form_ZeroElementRules.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="Form_ZeroElementRules.cs" />
     <Compile Include="Form_ZeroElementRules.Designer.cs">
       <DependentUpon>Form_ZeroElementRules.cs</DependentUpon>
     </Compile>
     <Compile Include="STDdata.cs" />
-    <Compile Include="Form_ConstantsEditor2.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="Form_ConstantsEditor2.cs" />
     <Compile Include="Form_ConstantsEditor2.Designer.cs">
       <DependentUpon>Form_ConstantsEditor2.cs</DependentUpon>
     </Compile>
-    <Compile Include="Form_STDConstantsEditor.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="Form_STDConstantsEditor.cs" />
     <Compile Include="Form_STDConstantsEditor.Designer.cs">
       <DependentUpon>Form_STDConstantsEditor.cs</DependentUpon>
     </Compile>
@@ -179,33 +159,23 @@
     <Compile Include="OTSDockWindow\OTSDockWindow.cs" />
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="STDEditor.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="STDEditor.cs" />
     <Compile Include="STDEditor.Designer.cs">
       <DependentUpon>STDEditor.cs</DependentUpon>
     </Compile>
-    <Compile Include="STDRuleslist.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="STDRuleslist.cs" />
     <Compile Include="STDRuleslist.Designer.cs">
       <DependentUpon>STDRuleslist.cs</DependentUpon>
     </Compile>
-    <Compile Include="SubMidWindow.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="SubMidWindow.cs" />
     <Compile Include="SubMidWindow.Designer.cs">
       <DependentUpon>SubMidWindow.cs</DependentUpon>
     </Compile>
-    <Compile Include="UserControl\UXrayControl.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="UserControl\UXrayControl.cs" />
     <Compile Include="UserControl\UXrayControl.Designer.cs">
       <DependentUpon>UXrayControl.cs</DependentUpon>
     </Compile>
-    <Compile Include="XrayContrastForm.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="XrayContrastForm.cs" />
     <Compile Include="XrayContrastForm.Designer.cs">
       <DependentUpon>XrayContrastForm.cs</DependentUpon>
     </Compile>

+ 1 - 3
OTSSysMgrApp/OTSSysMgrApp.csproj

@@ -117,9 +117,7 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="About.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="About.cs" />
     <Compile Include="About.Designer.cs">
       <DependentUpon>About.cs</DependentUpon>
     </Compile>