public void ClearAll() { DL_Self_Weight.Clear(); DL_Deck_Wet_Conc.Clear(); DL_Deck_Dry_Conc.Clear(); DL_Self_Deck.Clear(); SIDL_Crash_Barrier.Clear(); SIDL_Wearing.Clear(); LL_Moving.Clear(); }
public void Read_Data(string fileName) { ClearAll(); //string fileName = @"C:\Excel Test\ANALYSIS_RESULT.TXT"; List <string> list = new List <string>(File.ReadAllLines(fileName)); int find = 0; string kStr = ""; int indx = 0; for (int i = 0; i < list.Count; i++) { kStr = list[i]; if (kStr.StartsWith("-----")) { continue; } if (kStr == "") { continue; } if (i >= 123) { kStr = kStr + ""; } if (kStr.Contains("Summary of B.M. & S.F. due to Dead Load (Forces due to Self weight of girder) kN-m")) { find = 1; continue; } else if (kStr.Contains("Summary of B.M. & S.F. due to Dead Load (Forces due to Deck slab Wet concrete and Shuttering load)")) { find = 2; continue; } else if (kStr.Contains("Summary of B.M. & S.F. due to Deshutering load")) { find = 3; continue; } else if (kStr.Contains("Summary of B.M. & S.F. per girder due to Dead Load (Forces due to Self weight of girder,Deck slab dry concrete)")) { find = 4; continue; } else if (kStr.Contains("Summary of B.M. & S.F. per girder due to SIDL(Crash barrier)")) { find = 5; continue; } else if (kStr.Contains("Summary of B.M. & S.F. per girder due to SIDL(Wearing coat)")) { find = 6; continue; } else if (kStr.Contains("Summary of B.M. & S.F. per girder due to Live Load")) { find = 7; continue; } else if (kStr.ToUpper().StartsWith("CHECK FOR LIVE LOAD DEFLECTION")) { find = 8; break; } try { VData vd = new VData(); MyList mlist = null; kStr = MyList.RemoveAllSpaces(kStr); mlist = new MyList(kStr, ' '); indx = mlist.Count - 1; vd.Mid = mlist.GetDouble(indx--); vd._3L_8 = mlist.GetDouble(indx--); vd._L_4 = mlist.GetDouble(indx--); vd._L_8 = mlist.GetDouble(indx--); vd.Web_Widening = mlist.GetDouble(indx--); vd.Support = mlist.GetDouble(indx--); switch (find) { case 1: DL_Self_Weight.Add(vd); break; case 2: DL_Deck_Wet_Conc.Add(vd); break; case 3: DL_Deck_Dry_Conc.Add(vd); break; case 4: DL_Self_Deck.Add(vd); break; case 5: SIDL_Crash_Barrier.Add(vd); break; case 6: SIDL_Wearing.Add(vd); break; case 7: string lname = mlist.GetString(0, ")").Trim(); vd.LoadText = lname; LL_Moving.Add(vd); break; } } catch (Exception ex) { } } }