Browse Source

修改报告程序选择测量结果文件时选择取消报错的问题

zhangjiaxin 3 years ago
parent
commit
3a6d30faf0

+ 55 - 53
OTSIncAReportApp/1-UI/OTSTemplateDesigner/OTSReport_Export.Designer.cs

@@ -51,45 +51,47 @@
             // 
             // richTextBox1
             // 
-            this.richTextBox1.Location = new System.Drawing.Point(17, 66);
-            this.richTextBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.richTextBox1.Location = new System.Drawing.Point(13, 53);
+            this.richTextBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.richTextBox1.Name = "richTextBox1";
-            this.richTextBox1.Size = new System.Drawing.Size(605, 288);
+            this.richTextBox1.Size = new System.Drawing.Size(455, 231);
             this.richTextBox1.TabIndex = 60;
             this.richTextBox1.Text = "";
             // 
             // progressBar1
             // 
-            this.progressBar1.Location = new System.Drawing.Point(124, 366);
-            this.progressBar1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.progressBar1.Location = new System.Drawing.Point(93, 293);
+            this.progressBar1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.progressBar1.Name = "progressBar1";
-            this.progressBar1.Size = new System.Drawing.Size(499, 19);
+            this.progressBar1.Size = new System.Drawing.Size(374, 15);
             this.progressBar1.TabIndex = 70;
             // 
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(7, 366);
+            this.label2.Location = new System.Drawing.Point(5, 293);
+            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(97, 15);
+            this.label2.Size = new System.Drawing.Size(77, 12);
             this.label2.TabIndex = 1004;
             this.label2.Text = "当前导出进度";
             // 
             // label3
             // 
             this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(15, 11);
+            this.label3.Location = new System.Drawing.Point(11, 9);
+            this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(67, 15);
+            this.label3.Size = new System.Drawing.Size(53, 12);
             this.label3.TabIndex = 1001;
             this.label3.Text = "选择模板";
             // 
             // btn_exit
             // 
-            this.btn_exit.Location = new System.Drawing.Point(519, 399);
-            this.btn_exit.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.btn_exit.Location = new System.Drawing.Point(389, 319);
+            this.btn_exit.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.btn_exit.Name = "btn_exit";
-            this.btn_exit.Size = new System.Drawing.Size(97, 34);
+            this.btn_exit.Size = new System.Drawing.Size(73, 27);
             this.btn_exit.TabIndex = 90;
             this.btn_exit.Text = "退  出";
             this.btn_exit.UseVisualStyleBackColor = true;
@@ -98,29 +100,30 @@
             // label1
             // 
             this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(15, 41);
+            this.label1.Location = new System.Drawing.Point(11, 33);
+            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(67, 15);
+            this.label1.Size = new System.Drawing.Size(53, 12);
             this.label1.TabIndex = 1002;
             this.label1.Text = "保存路径";
             this.label1.Visible = false;
             // 
             // tb_lj
             // 
-            this.tb_lj.Location = new System.Drawing.Point(91, 38);
-            this.tb_lj.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.tb_lj.Location = new System.Drawing.Point(68, 30);
+            this.tb_lj.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.tb_lj.Name = "tb_lj";
             this.tb_lj.ReadOnly = true;
-            this.tb_lj.Size = new System.Drawing.Size(379, 25);
+            this.tb_lj.Size = new System.Drawing.Size(285, 21);
             this.tb_lj.TabIndex = 30;
             this.tb_lj.Visible = false;
             // 
             // btn_selectPath
             // 
-            this.btn_selectPath.Location = new System.Drawing.Point(475, 36);
-            this.btn_selectPath.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.btn_selectPath.Location = new System.Drawing.Point(356, 29);
+            this.btn_selectPath.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.btn_selectPath.Name = "btn_selectPath";
-            this.btn_selectPath.Size = new System.Drawing.Size(63, 25);
+            this.btn_selectPath.Size = new System.Drawing.Size(47, 20);
             this.btn_selectPath.TabIndex = 40;
             this.btn_selectPath.Text = "...";
             this.btn_selectPath.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -130,19 +133,19 @@
             // 
             // tb_mblj
             // 
-            this.tb_mblj.Location = new System.Drawing.Point(91, 8);
-            this.tb_mblj.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.tb_mblj.Location = new System.Drawing.Point(68, 6);
+            this.tb_mblj.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.tb_mblj.Name = "tb_mblj";
             this.tb_mblj.ReadOnly = true;
-            this.tb_mblj.Size = new System.Drawing.Size(379, 25);
+            this.tb_mblj.Size = new System.Drawing.Size(285, 21);
             this.tb_mblj.TabIndex = 0;
             // 
             // btn_openfilepath
             // 
-            this.btn_openfilepath.Location = new System.Drawing.Point(475, 5);
-            this.btn_openfilepath.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.btn_openfilepath.Location = new System.Drawing.Point(356, 4);
+            this.btn_openfilepath.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.btn_openfilepath.Name = "btn_openfilepath";
-            this.btn_openfilepath.Size = new System.Drawing.Size(63, 25);
+            this.btn_openfilepath.Size = new System.Drawing.Size(47, 20);
             this.btn_openfilepath.TabIndex = 10;
             this.btn_openfilepath.Text = "...";
             this.btn_openfilepath.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -151,10 +154,10 @@
             // 
             // btn_TempDes
             // 
-            this.btn_TempDes.Location = new System.Drawing.Point(543, 5);
-            this.btn_TempDes.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.btn_TempDes.Location = new System.Drawing.Point(407, 4);
+            this.btn_TempDes.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.btn_TempDes.Name = "btn_TempDes";
-            this.btn_TempDes.Size = new System.Drawing.Size(87, 25);
+            this.btn_TempDes.Size = new System.Drawing.Size(65, 20);
             this.btn_TempDes.TabIndex = 20;
             this.btn_TempDes.Text = "导出编辑";
             this.btn_TempDes.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -164,9 +167,10 @@
             // label4
             // 
             this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(15, 41);
+            this.label4.Location = new System.Drawing.Point(11, 33);
+            this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(68, 15);
+            this.label4.Size = new System.Drawing.Size(53, 12);
             this.label4.TabIndex = 1003;
             this.label4.Text = "数 据 源";
             // 
@@ -174,26 +178,26 @@
             // 
             this.cbo_sjy.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cbo_sjy.FormattingEnabled = true;
-            this.cbo_sjy.Location = new System.Drawing.Point(91, 39);
-            this.cbo_sjy.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.cbo_sjy.Location = new System.Drawing.Point(68, 31);
+            this.cbo_sjy.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.cbo_sjy.Name = "cbo_sjy";
-            this.cbo_sjy.Size = new System.Drawing.Size(379, 23);
+            this.cbo_sjy.Size = new System.Drawing.Size(285, 20);
             this.cbo_sjy.TabIndex = 50;
             // 
             // panel_container
             // 
-            this.panel_container.Location = new System.Drawing.Point(88, 235);
-            this.panel_container.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.panel_container.Location = new System.Drawing.Point(66, 188);
+            this.panel_container.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.panel_container.Name = "panel_container";
-            this.panel_container.Size = new System.Drawing.Size(23, 26);
+            this.panel_container.Size = new System.Drawing.Size(17, 21);
             this.panel_container.TabIndex = 5;
             // 
             // button3
             // 
-            this.button3.Location = new System.Drawing.Point(543, 36);
-            this.button3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.button3.Location = new System.Drawing.Point(407, 29);
+            this.button3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.button3.Name = "button3";
-            this.button3.Size = new System.Drawing.Size(87, 25);
+            this.button3.Size = new System.Drawing.Size(65, 20);
             this.button3.TabIndex = 40;
             this.button3.Text = "打开文件";
             this.button3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -203,10 +207,10 @@
             // 
             // btn_preview
             // 
-            this.btn_preview.Location = new System.Drawing.Point(416, 399);
-            this.btn_preview.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.btn_preview.Location = new System.Drawing.Point(312, 319);
+            this.btn_preview.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.btn_preview.Name = "btn_preview";
-            this.btn_preview.Size = new System.Drawing.Size(97, 34);
+            this.btn_preview.Size = new System.Drawing.Size(73, 27);
             this.btn_preview.TabIndex = 80;
             this.btn_preview.Text = "打开报表";
             this.btn_preview.UseVisualStyleBackColor = true;
@@ -220,21 +224,19 @@
             // 
             // button7
             // 
-            this.button7.Location = new System.Drawing.Point(312, 399);
-            this.button7.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.button7.Location = new System.Drawing.Point(234, 319);
             this.button7.Name = "button7";
-            this.button7.Size = new System.Drawing.Size(97, 34);
+            this.button7.Size = new System.Drawing.Size(73, 27);
             this.button7.TabIndex = 1008;
             this.button7.Text = "国标导出";
             this.button7.UseVisualStyleBackColor = true;
-            this.button7.Visible = false;
             this.button7.Click += new System.EventHandler(this.button7_Click);
             // 
             // OTSReport_Export
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(631, 429);
+            this.ClientSize = new System.Drawing.Size(475, 350);
             this.ControlBox = false;
             this.Controls.Add(this.button7);
             this.Controls.Add(this.cbo_sjy);
@@ -254,11 +256,11 @@
             this.Controls.Add(this.richTextBox1);
             this.Controls.Add(this.panel_container);
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
-            this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.MaximizeBox = false;
-            this.MaximumSize = new System.Drawing.Size(649, 476);
+            this.MaximumSize = new System.Drawing.Size(491, 389);
             this.MinimizeBox = false;
-            this.MinimumSize = new System.Drawing.Size(649, 476);
+            this.MinimumSize = new System.Drawing.Size(491, 389);
             this.Name = "OTSReport_Export";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
             this.Text = "报告程序输出界面";

+ 5 - 2
OTSIncAReportApp/1-UI/frmReportApp.cs

@@ -413,9 +413,12 @@ namespace OTSIncAReportApp
             fileDialog.Filter = "text File|*.rst";
             fileDialog.RestoreDirectory = true; 
             if (fileDialog.ShowDialog() == DialogResult.OK)
+            {
                 path = System.IO.Path.GetFullPath(fileDialog.FileName);
-            log.Info("begin to load the result!");
-            this.m_RstWindow.AddSampleResult(path);
+                log.Info("begin to load the result!");
+                this.m_RstWindow.AddSampleResult(path);
+            }
+                
         }