public void ParseTInfo(ParserWzq wzqParser)
 {
     m_SumInfo.VibrationT = wzqParser.ParseTInfo(m_SumInfo.FloorElemMatInfo.Count, SourceName);
     m_SumInfo.FirstTq    = m_SumInfo.VibrationT[m_SumInfo.VibrationT.Count - 1];
     m_SumInfo.FirstTt    = m_SumInfo.VibrationT[m_SumInfo.VibrationT.Count - 1];
     foreach (var item in m_SumInfo.VibrationT)
     {
         if (item.MoveFactor > 0.5 && m_SumInfo.FirstTq.T < item.T)
         {
             m_SumInfo.FirstTq = item;
         }
         if (item.TwistFactor > 0.5 && m_SumInfo.FirstTt.T < item.T)
         {
             m_SumInfo.FirstTt = item;
         }
     }
     m_SumInfo.EffectiveMassFactor_X = wzqParser.EffectiveMassFactor_X;
     m_SumInfo.EffectiveMassFactor_Y = wzqParser.EffectiveMassFactor_Y;
     m_SumInfo.VgList  = wzqParser.VgList;
     m_SumInfo.minVg_X = wzqParser.minVg_X;
     m_SumInfo.minVg_Y = wzqParser.minVg_Y;
 }
Esempio n. 2
0
        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);
            }
        }