|
public static void ReadARCOLog()
{
FileControl fileControl = new FileControl();
ARCO.LogsName = new string[13];
ARCO.ReadLogNameStatus = new string[13];
ARCO.LogsName[0] = "2020";
ARCO.LogsName[1] = "2050";
ARCO.LogsName[2] = "2030";
ARCO.LogsName[3] = "2010";
ARCO.LogsName[4] = "2000";
ARCO.LogsName[5] = "2040";
ARCO.LogsName[6] = "2060";
ARCO.LogsName[7] = "0096";
ARCO.LogsName[8] = "009C";
ARCO.LogsName[9] = "00C6";
ARCO.LogsName[10] = "00C9";
ARCO.LogsName[11] = "00C1";
ARCO.LogsName[12] = "00A0";
FileControl.ReadFile(ref ARCO.StandardARCOProceSSData, Application.StartupPath + "\\PST\\" + WDPassport.ProductID + "\\A.BIN");
int num = 0;
checked
{
do
{
WDModules.ShowStr = "";
WDModules.ShowStr = "读 Log " + Conversions.ToString(num);
WDModules.ShowStr1 = "";
WDModules.ShowStr2 = "";
int num2 = 53 - Strings.Len(WDModules.ShowStr);
for (int i = 1; i <= num2; i++)
{
WDModules.ShowStr1 = "";
WDModules.ShowStr1 = ".";
WDModules.ShowStr2 += WDModules.ShowStr1;
MyProject.Application.DoEvents();
}
WDPassport.AppendSelfcanTxt(WDModules.ShowStr + WDModules.ShowStr2);
if (WDPassport.WDFWRead(ref Flash.TempData, 1, ARCO.LogsName[num]))
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(Flash.TempData[11]), 2) + Strings.Right("00" + Conversion.Hex(Flash.TempData[10]), 2));
switch (num)
{
case 0:
if (WDPassport.WDFWRead(ref ARCO.ARCO6FData, (int)DetectFWParameters.ModuleLength, ARCO.LogsName[num]))
{
ARCO.ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 1:
if (WDPassport.WDFWRead(ref ARCO.ARCO6AData, (int)DetectFWParameters.ModuleLength, ARCO.LogsName[num]))
{
ARCO.ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 2:
if (WDPassport.WDFWRead(ref ARCO.ARCO6BData, (int)DetectFWParameters.ModuleLength, ARCO.LogsName[num]))
{
ARCO.ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 3:
if (WDPassport.WDFWRead(ref ARCO.ARCO69Data, (int)DetectFWParameters.ModuleLength, ARCO.LogsName[num]))
{
ARCO.ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 4:
if (WDPassport.WDFWRead(ref ARCO.ARCO46Data, (int)DetectFWParameters.ModuleLength, ARCO.LogsName[num]))
{
ARCO.ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 5:
if (WDPassport.WDFWRead(ref ARCO.ARCO4AData, (int)DetectFWParameters.ModuleLength, ARCO.LogsName[num]))
{
ARCO.ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 6:
if (WDPassport.WDFWRead(ref ARCO.ARCO70Data, (int)DetectFWParameters.ModuleLength, ARCO.LogsName[num]))
{
ARCO.ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 7:
if (WDPassport.WDFWRead(ref ARCO.ARCO6FData1, (int)DetectFWParameters.ModuleLength, ARCO.LogsName[num]))
{
ARCO.ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 8:
if (WDPassport.WDFWRead(ref ARCO.ARCO6AData1, (int)DetectFWParameters.ModuleLength, ARCO.LogsName[num]))
{
ARCO.ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 9:
if (WDPassport.WDFWRead(ref ARCO.ARCO6BData1, (int)DetectFWParameters.ModuleLength, ARCO.LogsName[num]))
{
ARCO.ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 10:
if (WDPassport.WDFWRead(ref ARCO.ARCO69Data1, (int)DetectFWParameters.ModuleLength, ARCO.LogsName[num]))
{
ARCO.ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 11:
if (WDPassport.WDFWRead(ref ARCO.ARCO46Data1, (int)DetectFWParameters.ModuleLength, ARCO.LogsName[num]))
{
ARCO.ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
case 12:
if (WDPassport.WDFWRead(ref ARCO.ARCO70Data1, (int)DetectFWParameters.ModuleLength, ARCO.LogsName[num]))
{
ARCO.ReadLogNameStatus[num] = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
}
break;
}
}
else
{
switch (num)
{
case 0:
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 1:
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 2:
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 3:
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 4:
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 5:
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 6:
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 7:
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 8:
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 9:
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 10:
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 11:
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 12:
ARCO.ReadLogNameStatus[num] = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
}
}
num++;
}
while (num <= 12);
}
} |
|