public void ParseDispInfo(ParserWdisp dispParser) { m_SumInfo.maxDispX = dispParser.maxX; m_SumInfo.maxDispX_floor = dispParser.maxX_floor; m_SumInfo.maxDispY = dispParser.maxY; m_SumInfo.maxDispY_floor = dispParser.maxY_floor; m_SumInfo.maxX_FloorDispAngle = dispParser.maxX_FloorDispAngle; m_SumInfo.maxY_FloorDispAngle = dispParser.maxY_FloorDispAngle; m_SumInfo.DispInfoList = dispParser.dispList; }
private void LoadData() { try { string selectPath = (string)cb_path.SelectedItem as string; FileInfo fileInfo = new FileInfo(selectPath); int lastIndex = selectPath.LastIndexOf('\\'); string sourceName = null; if (fileInfo.Extension == ".yjk" || fileInfo.Extension == ".YJK") { sourceName = PathFinder.YJK; } else if (fileInfo.Extension == ".jws" || fileInfo.Extension == ".JWS") { sourceName = PathFinder.PKPM; } string dir = selectPath.Substring(0, lastIndex); if (sourceName == PathFinder.YJK) { dir += @"\设计结果"; } string wzqFile = dir + @"\WZQ.OUT"; ParserWzq parserWzq = new ParserWzq(); if (parserWzq.ReadFile(wzqFile)) { this.rtb_wzq.TextPanel.Text = parserWzq.FullContent(_isShowNumber); } else { MessageBox.Show("无法解析WZQ.OUT文件,请确认文件正确", "解析错误"); this.rtb_wzq.TextPanel.Text = ""; } string wgcpjFile = dir + @"\WGCPJ.OUT"; ParserWgcpj parserWgcpj = new ParserWgcpj(); if (parserWgcpj.ReadFile(wgcpjFile)) { this.rtb_wgcpj.TextPanel.Text = parserWgcpj.FullContent(_isShowNumber); } else { MessageBox.Show("无法解析WGCPJ.OUT文件,请确认文件正确", "解析错误"); this.rtb_wgcpj.TextPanel.Text = ""; } string wdcnlFile = dir + @"\WDCNL.OUT"; ParserWdcnl parserWdcnl = new ParserWdcnl(); if (parserWdcnl.ReadFile(wdcnlFile)) { this.rtb_wdcnl.TextPanel.Text = parserWdcnl.FullContent(_isShowNumber); } else { MessageBox.Show("无法解析WDCNL.OUT文件,请确认文件正确", "解析错误"); this.rtb_wdcnl.TextPanel.Text = ""; } string wv02qFile = dir + @"\WV02Q.OUT"; ParserWv02q parserWv02q = new ParserWv02q(); if (parserWv02q.ReadFile(wv02qFile)) { this.rtb_wv02q.TextPanel.Text = parserWv02q.FullContent(_isShowNumber); } else { MessageBox.Show("无法解析WV02Q.OUT文件,请确认文件正确", "解析错误"); this.rtb_wv02q.TextPanel.Text = ""; } string satkFile = dir + @"\SAT-K.OUT"; ParserSatk parserSatk = new ParserSatk(); if (parserSatk.ReadFile(satkFile)) { this.rtb_satk.TextPanel.Text = parserSatk.FullContent(_isShowNumber); } string satbmbFile = dir + @"\SATBMB.OUT"; ParserSatbmb parserSatbmb = new ParserSatbmb(); if (parserSatbmb.ReadFile(satbmbFile)) { this.rtb_satbmb.TextPanel.Text = parserSatbmb.FullContent(_isShowNumber); } string wdispFile = dir + @"\WDISP.OUT"; ParserWdisp parserWdisp = new ParserWdisp(); if (parserWdisp.ReadFile(wdispFile)) { parserWdisp.ParseDisp(); this.rtb_wdisp.TextPanel.Text = parserWdisp.FullContent(_isShowNumber); } else { MessageBox.Show("无法解析WDISP.OUT文件,请确认文件正确", "解析错误"); this.rtb_wdisp.TextPanel.Text = ""; } string wmassFile = dir + @"\WMASS.OUT"; ParserWmass parserWmass; if (_controlMarker == 1) { parserWmass = ParserWmass.InstanceLeft; } else { parserWmass = ParserWmass.InstanceRight; } parserWmass.SourceName = sourceName; if (parserWmass.ReadFile(wmassFile)) { parserWmass.ParseTInfo(parserWzq); parserWmass.ParseDispInfo(parserWdisp); this.rtb_Summary.TextPanel.Text = parserWmass.m_SumInfo.GetData(_showType); this.rtb_wmass.TextPanel.Text = parserWmass.FullContent(_isShowNumber); } else { MessageBox.Show("无法解析WMASS.OUT文件,请确认文件正确", "解析错误"); this.rtb_wmass.TextPanel.Text = ""; } formatContent(); } catch (System.Exception ex) { MessageBox.Show(ex.Message); } }