private static CaptanceUpandata[] ReadCaptance(string DciPath) { try { string[] filenum = Directory.GetFiles(DciPath); CaptanceUpandata[] DciData = new CaptanceUpandata[filenum.Length]; for (int i = 1; i <= filenum.Length; i++) { if (File.Exists(DciPath + "\\" + NumCorrection.KeepNum(i.ToString(), 2, HeadOrTail.Head) + ".ini")) { INIFiLE myini = new INIFiLE(DciPath + "\\" + NumCorrection.KeepNum(i.ToString(), 2, HeadOrTail.Head) + ".ini"); DciData[i - 1].Data = myini.ReadString("result", "Date", ""); DciData[i - 1].Time = myini.ReadString("result", "Time", ""); DciData[i - 1].Position = myini.ReadString("result", "试验位置", ""); DciData[i - 1].TestKind = myini.ReadString("result", "试验模式", ""); DciData[i - 1].Volate = myini.ReadString("result", "Vo", ""); DciData[i - 1].Fre = myini.ReadString("result", "Fr", ""); DciData[i - 1].Cx = myini.ReadString("result", "Cx", ""); DciData[i - 1].Tan = myini.ReadString("result", "tan", ""); DciData[i - 1].Error = myini.ReadString("result", "Error", ""); } } return(DciData); } catch { throw new Exception("介质损耗地址错误"); } }
/// <summary> /// 更新jobinf单 /// </summary> /// <param name="taskinformationpath"></param> /// <returns></returns> public JobList UpdataJob(string taskinformationpath) { INIFiLE iNI = new INIFiLE(taskinformationpath); if (!DateTime.TryParse(iNI.ReadString("information", "测试时间", ""), out jobInfo.Information.testingTime)) { jobInfo.Information.testingTime = DateTime.Now; } jobInfo.Information.testingName = iNI.ReadString("information", "试验名称", ""); jobInfo.Information.tester = iNI.ReadString("information", "试验人员", ""); jobInfo.Information.testingAgency = iNI.ReadString("information", "试验单位", ""); jobInfo.Information.auditor = iNI.ReadString("information", "审核人", ""); jobInfo.Information.approver = iNI.ReadString("information", "批准人", ""); jobInfo.Information.principal = iNI.ReadString("information", "负责人", ""); jobInfo.Information.weather = iNI.ReadString("information", "天气", ""); jobInfo.Information.temperature = iNI.ReadString("information", "温度", ""); jobInfo.Information.humidity = iNI.ReadString("information", "湿度", ""); jobInfo.Information.oilTemperature = iNI.ReadInt("information", "变压器油温(整数)", 23); return(jobInfo); }
private static DcresistaceUpandata[] ReadDcresisitance(string DcPath) { try { string[] filenum = Directory.GetFiles(DcPath); DcresistaceUpandata[] DcresData = new DcresistaceUpandata[filenum.Length]; for (int i = 1; i <= filenum.Length; i++) { if (File.Exists(DcPath + "\\" + NumCorrection.KeepNum(i.ToString(), 2, HeadOrTail.Head) + ".ini")) { INIFiLE myini = new INIFiLE(DcPath + "\\" + NumCorrection.KeepNum(i.ToString(), 2, HeadOrTail.Head) + ".ini"); DcresData[i - 1].Data = myini.ReadString("result", "Date", ""); DcresData[i - 1].Time = myini.ReadString("result", "Time", ""); DcresData[i - 1].Position = myini.ReadString("result", "试验位置", ""); DcresData[i - 1].Windingconfige = myini.ReadString("result", "绕组类型", ""); if (myini.ReadString("result", "VA", "") != "NULL") { DcresData[i - 1].Av = myini.ReadString("result", "VA", ""); } if (myini.ReadString("result", "IA", "") != "NULL") { DcresData[i - 1].Ai = myini.ReadString("result", "IA", ""); } if (myini.ReadString("result", "RA", "") != "NULL") { DcresData[i - 1].Ar = myini.ReadString("result", "RA", ""); } if (myini.ReadString("result", "VB", "") != "NULL") { DcresData[i - 1].Bv = myini.ReadString("result", "VB", ""); } if (myini.ReadString("result", "IB", "") != "NULL") { DcresData[i - 1].Bi = myini.ReadString("result", "IB", ""); } if (myini.ReadString("result", "RB", "") != "NULL") { DcresData[i - 1].Br = myini.ReadString("result", "RB", ""); } if (myini.ReadString("result", "VC", "") != "NULL") { DcresData[i - 1].Cv = myini.ReadString("result", "VC", ""); } if (myini.ReadString("result", "IC", "") != "NULL") { DcresData[i - 1].Ci = myini.ReadString("result", "IC", ""); } if (myini.ReadString("result", "RC", "") != "NULL") { DcresData[i - 1].Cr = myini.ReadString("result", "RC", ""); } DcresData[i - 1].Error = myini.ReadString("result", "Error", ""); } } return(DcresData); } catch { throw new Exception("直流电阻地址不存在"); } }
private static OltcUpandata[] ReadOltc(string DciPath) { try { string[] filenum = Directory.GetFiles(DciPath); OltcUpandata[] DciData = new OltcUpandata[filenum.Length]; for (int i = 1; i <= filenum.Length; i++) { if (File.Exists(DciPath + "\\" + NumCorrection.KeepNum(i.ToString(), 2, HeadOrTail.Head) + ".ini")) { INIFiLE myini = new INIFiLE(DciPath + "\\" + NumCorrection.KeepNum(i.ToString(), 2, HeadOrTail.Head) + ".ini"); DciData[i - 1].Data = myini.ReadString("result", "Date", ""); DciData[i - 1].Time = myini.ReadString("result", "Time", ""); DciData[i - 1].Windkind = myini.ReadString("result", "绕组类型", ""); DciData[i - 1].windposition = myini.ReadString("result", "分接位置", ""); DciData[i - 1].Current = myini.ReadString("result", "试验电流", ""); DciData[i - 1].Protectresistance = myini.ReadString("result", "触发电阻", ""); DciData[i - 1].Starttime = myini.ReadString("result", "触发时间", ""); for (int j = 1; j < 25; j++) { DciData[i - 1].Awaveform += myini.ReadString("result", "A" + NumCorrection.KeepNum(j.ToString(), 2, HeadOrTail.Head), ""); if (DciData[i - 1].Awaveform.Length > 8000) { break; } } DciData[i - 1].Awaveform += myini.ReadString("result", "AED", ""); for (int j = 1; j < 25; j++) { DciData[i - 1].Bwaveform += myini.ReadString("result", "B" + NumCorrection.KeepNum(j.ToString(), 2, HeadOrTail.Head), ""); if (DciData[i - 1].Bwaveform.Length > 8000) { break; } } DciData[i - 1].Bwaveform += myini.ReadString("result", "BED", ""); for (int j = 1; j < 25; j++) { DciData[i - 1].Cwaveform += myini.ReadString("result", "C" + NumCorrection.KeepNum(j.ToString(), 2, HeadOrTail.Head), ""); if (DciData[i - 1].Cwaveform.Length > 8000) { break; } } DciData[i - 1].Cwaveform += myini.ReadString("result", "CED", ""); for (int j = 1; j < 25; j++) { DciData[i - 1].Dwaveform += myini.ReadString("result", "D" + NumCorrection.KeepNum(j.ToString(), 2, HeadOrTail.Head), ""); if (DciData[i - 1].Dwaveform.Length > 8000) { break; } } DciData[i - 1].Dwaveform += myini.ReadString("result", "DED", ""); DciData[i - 1].Error = myini.ReadString("result", "Error", ""); } } return(DciData); } catch (Exception ex) { throw ex; } }
private static DcInlutionUpandata[] ReadDcinlution(string DciPath) { try { string[] filenum = Directory.GetFiles(DciPath); DcInlutionUpandata[] DciData = new DcInlutionUpandata[filenum.Length]; for (int i = 1; i <= filenum.Length; i++) { if (File.Exists(DciPath + "\\" + NumCorrection.KeepNum(i.ToString(), 2, HeadOrTail.Head) + ".ini")) { INIFiLE myini = new INIFiLE(DciPath + "\\" + NumCorrection.KeepNum(i.ToString(), 2, HeadOrTail.Head) + ".ini"); DciData[i - 1].Data = myini.ReadString("result", "Date", ""); DciData[i - 1].Time = myini.ReadString("result", "Time", ""); DciData[i - 1].Position = myini.ReadString("result", "试验位置", ""); DciData[i - 1].PreResistance = myini.ReadString("result", "保护阻值", ""); DciData[i - 1].JyxxM = myini.ReadString("result", "绝缘下限", ""); DciData[i - 1].AbsM = myini.ReadString("result", "吸收比下限", ""); if (myini.ReadString("result", "Vo", "") != "NULL") { DciData[i - 1].Volate = myini.ReadString("result", "Vo", ""); } if (myini.ReadString("result", "R", "") != "NULL") { DciData[i - 1].Resistance = myini.ReadString("result", "R", ""); } if (myini.ReadString("result", "0:15", "") != "NULL") { DciData[i - 1]._0_15 = myini.ReadString("result", "0:15", ""); } if (myini.ReadString("result", "1:00", "") != "NULL") { DciData[i - 1]._1_00 = myini.ReadString("result", "1:00", ""); } if (myini.ReadString("result", "吸收比", "") != "NULL") { DciData[i - 1].Abs = myini.ReadString("result", "吸收比", ""); } if (myini.ReadString("result", "极化指数", "") != "NULL") { DciData[i - 1].Jhzs = myini.ReadString("result", "极化指数", ""); } DciData[i - 1].Error = myini.ReadString("result", "Error", ""); } } return(DciData); } catch { throw new Exception("绝缘电阻地址错误"); } }