Browse Source

处理多数据源选择界面失效bug

CXS 3 years ago
parent
commit
6990fdbef9
2 changed files with 11 additions and 75 deletions
  1. 11 12
      OTSIncAReportApp/frmMeasureRstMgr.Designer.cs
  2. 0 63
      OTSIncAReportApp/frmMeasureRstMgr.cs

+ 11 - 12
OTSIncAReportApp/frmMeasureRstMgr.Designer.cs

@@ -42,7 +42,7 @@
             // 
             this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(24, 24);
             this.contextMenuStrip1.Name = "contextMenuStrip1";
-            this.contextMenuStrip1.Size = new System.Drawing.Size(181, 26);
+            this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4);
             // 
             // contextMenuStrip2
             // 
@@ -50,13 +50,13 @@
             this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.AddSample});
             this.contextMenuStrip2.Name = "contextMenuStrip2";
-            this.contextMenuStrip2.Size = new System.Drawing.Size(181, 34);
+            this.contextMenuStrip2.Size = new System.Drawing.Size(233, 36);
             // 
             // AddSample
             // 
             this.AddSample.Image = global::OTSIncAReportApp.Properties.Resources.open32;
             this.AddSample.Name = "AddSample";
-            this.AddSample.Size = new System.Drawing.Size(180, 30);
+            this.AddSample.Size = new System.Drawing.Size(232, 32);
             this.AddSample.Text = "增加样品测量结果";
             // 
             // treeView1
@@ -68,11 +68,12 @@
             this.treeView1.CheckBoxes = true;
             this.treeView1.DrawMode = System.Windows.Forms.TreeViewDrawMode.OwnerDrawAll;
             this.treeView1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.treeView1.Location = new System.Drawing.Point(0, 25);
+            this.treeView1.Location = new System.Drawing.Point(0, 38);
+            this.treeView1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.treeView1.Name = "treeView1";
             this.treeView1.ShowLines = false;
             this.treeView1.ShowPlusMinus = false;
-            this.treeView1.Size = new System.Drawing.Size(407, 677);
+            this.treeView1.Size = new System.Drawing.Size(608, 1014);
             this.treeView1.TabIndex = 6;
             this.treeView1.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterCheck);
             this.treeView1.DrawNode += new System.Windows.Forms.DrawTreeNodeEventHandler(this.treeView1_DrawNode);
@@ -81,20 +82,18 @@
             // 
             // button1
             // 
-            this.button1.Location = new System.Drawing.Point(1, 1);
-            this.button1.Margin = new System.Windows.Forms.Padding(2);
+            this.button1.Location = new System.Drawing.Point(2, 2);
             this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(88, 25);
+            this.button1.Size = new System.Drawing.Size(132, 38);
             this.button1.TabIndex = 7;
             this.button1.Text = "多选数据源+";
             this.button1.UseVisualStyleBackColor = true;
-            this.button1.Click += new System.EventHandler(this.button1_Click);
             // 
             // frmMeasureRstMgr
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(405, 700);
+            this.ClientSize = new System.Drawing.Size(608, 1050);
             this.CloseButton = false;
             this.CloseButtonVisible = false;
             this.Controls.Add(this.button1);
@@ -104,7 +103,7 @@
             | OTS.WinFormsUI.Docking.DockAreas.DockBottom)));
             this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
-            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.Name = "frmMeasureRstMgr";
             this.RightToLeftLayout = true;
             this.Text = "测量结果窗口";

+ 0 - 63
OTSIncAReportApp/frmMeasureRstMgr.cs

@@ -531,70 +531,7 @@ namespace OTSIncAReportApp
         #region 多数据源操作部份相关
         private void button1_Click(object sender, EventArgs e)
         {
-            frmMultiSourceSelect frm_Mss = new frmMultiSourceSelect(this.treeView1);
-            if (frm_Mss.ShowDialog() == DialogResult.OK)
-            {
-                //判断是否选择了两个以上的选项,
-                int iselectcount = 0;
-
-                //第一次更新各选项值
-                for (int i = 0; i < frm_Mss.treeView1.Nodes.Count; i++)
-                {
-                    this.treeView1.Nodes[i].Checked = frm_Mss.treeView1.Nodes[i].Checked;
-                    if (frm_Mss.treeView1.Nodes[i].Checked == true)
-                    {
-                        iselectcount++;
-                    }
-
-                    //更新底层及属性窗口
-                    //m_ReportApp.m_DataMgrFun.m_ReportProjFileMgr.SetSwitchForSmlResultFile(i, frm_Mss.treeView1.Nodes[i].Checked);
-
-                    //获取属性窗口底层值
-                    //m_ReportApp.m_DataMgrFun.GetPropertyData();
-                    //OTSSampleMeaInfo SMInfo = m_ReportApp.m_DataMgrFun.AddNewMeaResult(i);
-
-                    //将treeview的选择值,传送给属性grid上。
-                    //m_ReportApp.m_PropWindow.DisProperyWindow(SMInfo);
-
-                }
-
-                //主动去更新让其选择上多数据源或非多数据源
-                if (iselectcount >= 2)
-                {
-                    //获取
-                    OTSSampleMeaInfo SMInfo = new OTSSampleMeaInfo();
-                    //DataMgrFun dataMgr = m_ReportApp.m_DataMgrFun;
-                    //dataMgr.SetSampleParamVal(OTS_RETORT_PROP_GRID_ITEMS.DATA_SOURCE, OTS_ITEM_TYPES.COMBO, 0);
-
-                    //获取属性窗口更新显示
-                    //dataMgr.GetWorkSamplePropertyVal(ref SMInfo);
-                    //m_ReportApp.m_PropWindow.DisProperyWindow(SMInfo);
 
-                    //显示默认的图表
-                    //m_ReportApp.m_PropWindow.m_SampleGrid.ShowDataDiagram();
-                }
-                else
-                {
-                    //单一选项时,也要对该属性窗口进行切换
-                    for (int i = 0; i < frm_Mss.treeView1.Nodes.Count; i++)
-                    {
-                        if (frm_Mss.treeView1.Nodes[i].Checked == true)
-                        {
-                            //OTSSampleMeaInfo SMInfo = new OTSSampleMeaInfo();
-                            //DataMgrFun dataMgr = m_ReportApp.m_DataMgrFun;
-                            //dataMgr.SetSampleParamVal(OTS_RETORT_PROP_GRID_ITEMS.DATA_SOURCE, OTS_ITEM_TYPES.COMBO, i);
-
-                            ////获取属性窗口更新显示
-                            //dataMgr.GetWorkSamplePropertyVal(ref SMInfo);
-                            //m_ReportApp.m_PropWindow.DisProperyWindow(SMInfo);
-
-                            ////显示默认的图表
-                            //m_ReportApp.m_PropWindow.m_SampleGrid.ShowDataDiagram();
-                        }
-                    }
-                }
-
-            }
         }
 
         /// <summary>