读ARCO LOG
public static void ReadARCOLog(){
FileControl fileControl = new FileControl();
ARCO.LogsName = new string;
ARCO.ReadLogNameStatus = new string;
ARCO.LogsName = "2020";
ARCO.LogsName = "2050";
ARCO.LogsName = "2030";
ARCO.LogsName = "2010";
ARCO.LogsName = "2000";
ARCO.LogsName = "2040";
ARCO.LogsName = "2060";
ARCO.LogsName = "0096";
ARCO.LogsName = "009C";
ARCO.LogsName = "00C6";
ARCO.LogsName = "00C9";
ARCO.LogsName = "00C1";
ARCO.LogsName = "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))
{
DetectFWParameters.ModuleLength = Conversions.ToLong("&h" + Strings.Right("00" + Conversion.Hex(Flash.TempData), 2) + Strings.Right("00" + Conversion.Hex(Flash.TempData), 2));
switch (num)
{
case 0:
if (WDPassport.WDFWRead(ref ARCO.ARCO6FData, (int)DetectFWParameters.ModuleLength, ARCO.LogsName))
{
ARCO.ReadLogNameStatus = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus = "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))
{
ARCO.ReadLogNameStatus = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus = "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))
{
ARCO.ReadLogNameStatus = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus = "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))
{
ARCO.ReadLogNameStatus = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus = "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))
{
ARCO.ReadLogNameStatus = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus = "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))
{
ARCO.ReadLogNameStatus = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus = "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))
{
ARCO.ReadLogNameStatus = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus = "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))
{
ARCO.ReadLogNameStatus = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus = "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))
{
ARCO.ReadLogNameStatus = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus = "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))
{
ARCO.ReadLogNameStatus = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus = "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))
{
ARCO.ReadLogNameStatus = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus = "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))
{
ARCO.ReadLogNameStatus = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus = "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))
{
ARCO.ReadLogNameStatus = "True";
WDPassport.AppendSelfcanTxt(":成功.\r\n");
}
else
{
ARCO.ReadLogNameStatus = "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 = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 1:
ARCO.ReadLogNameStatus = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 2:
ARCO.ReadLogNameStatus = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 3:
ARCO.ReadLogNameStatus = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 4:
ARCO.ReadLogNameStatus = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 5:
ARCO.ReadLogNameStatus = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 6:
ARCO.ReadLogNameStatus = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 7:
ARCO.ReadLogNameStatus = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 8:
ARCO.ReadLogNameStatus = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 9:
ARCO.ReadLogNameStatus = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 10:
ARCO.ReadLogNameStatus = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 11:
ARCO.ReadLogNameStatus = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
case 12:
ARCO.ReadLogNameStatus = "False";
if (WDPassport.HDDError)
{
WDErrorCode.GetWDErrorCode();
WDPassport.AppendSelfcanTxt(":失败.(" + WDErrorCode.WDErrorCodeMenas + ")\r\n");
}
else
{
WDPassport.AppendSelfcanTxt(":失败.\r\n");
}
break;
}
}
num++;
}
while (num <= 12);
}
} Tranks
看不懂新手学习中 完全不懂 看不懂新手学习中 这个干嘛用的?
页:
[1]