private void PkpmMassInfo() { for (int i = 0; i < m_contentArray.Length; i++) { if (m_contentArray[i].Contains("各层的质量、质心坐标信息")) { i = i + 5; string lastFloorNo = string.Empty; for (int j = 0; j < m_SumInfo.FloorElemMatInfo.Count; j++) { List <string> dataList = new List <string>(); int rowIndex = i + j; string lineData = m_contentArray[rowIndex]; int indexOfBrack = lineData.IndexOf('('); if (indexOfBrack >= 0) { lineData = lineData.Remove(indexOfBrack); } string[] dataArray = lineData.Split(new char[] { ' ', '(' }, StringSplitOptions.RemoveEmptyEntries); if (dataArray.Length == 9) { lastFloorNo = dataArray[0]; dataList.Add(dataArray[0]); dataList.Add(dataArray[1]); dataList.Add(dataArray[8]); } else { dataList.Add(lastFloorNo); dataList.Add(dataArray[0]); dataList.Add(dataArray[7]); } InfoMass massInfo = new InfoMass(); massInfo.LoadData(dataList); m_SumInfo.FloorMassInfo.Add(massInfo); } } } if (m_SumInfo.FloorMassInfo.Count > 0) { m_SumInfo.maxMassInfo = m_SumInfo.FloorMassInfo[0]; m_SumInfo.minMassInfo = m_SumInfo.FloorMassInfo[0]; for (int i = 0; i < m_SumInfo.FloorMassInfo.Count; i++) { if (m_SumInfo.maxMassInfo.MassRate < m_SumInfo.FloorMassInfo[i].MassRate) { m_SumInfo.maxMassInfo = m_SumInfo.FloorMassInfo[i]; } if (m_SumInfo.minMassInfo.MassRate > m_SumInfo.FloorMassInfo[i].MassRate) { m_SumInfo.minMassInfo = m_SumInfo.FloorMassInfo[i]; } } } }
private void YjkMassInfo() { for (int i = 0; i < m_contentArray.Length; i++) { if (m_contentArray[i].Contains("各层质量、质心坐标")) { i = i + 5; for (int j = 0; j < m_SumInfo.FloorElemMatInfo.Count; j++) { List <string> dataList = new List <string>(); int rowIndex = i + j; string lineData = m_contentArray[rowIndex]; string[] dataArray = lineData.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); dataList.Add(dataArray[0]); dataList.Add(dataArray[1]); dataList.Add(dataArray[9]); InfoMass massInfo = new InfoMass(); massInfo.LoadData(dataList); m_SumInfo.FloorMassInfo.Add(massInfo); } } } if (m_SumInfo.FloorMassInfo.Count > 0) { m_SumInfo.maxMassInfo = m_SumInfo.FloorMassInfo[0]; m_SumInfo.minMassInfo = m_SumInfo.FloorMassInfo[0]; for (int i = 0; i < m_SumInfo.FloorMassInfo.Count; i++) { if (m_SumInfo.maxMassInfo.MassRate < m_SumInfo.FloorMassInfo[i].MassRate) { m_SumInfo.maxMassInfo = m_SumInfo.FloorMassInfo[i]; } if (m_SumInfo.minMassInfo.MassRate > m_SumInfo.FloorMassInfo[i].MassRate) { m_SumInfo.minMassInfo = m_SumInfo.FloorMassInfo[i]; } } } }