在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
public static void ExportTxt(string[] fileContent) { System.Windows.Forms.SaveFileDialog objSave = new System.Windows.Forms.SaveFileDialog(); objSave.Filter = "(*.txt)|*.txt|" + "(*.*)|*.*"; // objSave.FileName = "CallHistory.txt"; string[] nuclide = { "H3", "H4", "H5" }; string[] km = { "N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW" }; if (objSave.ShowDialog() == DialogResult.OK) { using (StreamWriter objWriter = new StreamWriter(objSave.FileName, false, System.Text.Encoding.UTF8)) { foreach (string str in nuclide) { objWriter.WriteLine("核素:" + str); objWriter.WriteLine("每个扇区的年平均大气弥散因子(S/M**3)".PadLeft(56)); objWriter.WriteLine("".PadRight(114, '-')); objWriter.WriteLine(" KM 0.25-1 1- 2 2- 3 3- 5 5- 10 10- 20 20- 30 30- 40 40- 50 50- 60 60- 70 70- 80 "); objWriter.WriteLine("".PadRight(114, '-')); for (int i = 0; i < km.Length; i++) { TaoCalculate.Model.CalculateModel model = new Model.CalculateModel(fileContent[i]); objWriter.WriteLine(km[i].PadLeft(6) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9)); } objWriter.WriteLine(); objWriter.WriteLine("每个扇区的相对地面沉积因子(1/m**2)".PadLeft(56)); objWriter.WriteLine("".PadRight(114, '-')); objWriter.WriteLine(" KM 0.25-1 1- 2 2- 3 3- 5 5- 10 10- 20 20- 30 30- 40 40- 50 50- 60 60- 70 70- 80 "); objWriter.WriteLine("".PadRight(114, '-')); for (int i = 0; i < km.Length; i++) { TaoCalculate.Model.CalculateModel model = new Model.CalculateModel(fileContent[i]); objWriter.WriteLine(km[i].PadLeft(6) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9) + ScienceCount.KXJSF(model.Wind1.Deviation).PadLeft(9)); } objWriter.WriteLine(); objWriter.WriteLine("".PadRight(114, '-')); objWriter.WriteLine("".PadRight(114, '-')); } Process.Start(objSave.FileName); } } } |
请发表评论