/// <summary> /// Analysis status information string in down left corner of the module /// </summary> /// <returns> /// true: if no error or failure was detected /// false: if an error or failure was detected /// </returns> public bool CheckInfo() { string actualInfo = new InformationElements().InfoText; string actualInfoLowerCase = actualInfo.ToLower(); if (actualInfoLowerCase.Contains("error") || actualInfoLowerCase.Contains("fail") || actualInfoLowerCase.Contains("corrupt")) { Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "HistoROM module reports: \"" + actualInfo + "\""); return(false); } return(true); }
/// <summary> /// Analysis status information string in down left corner of the module whether it contains a user given string /// </summary> /// <param name="value"> /// The value. /// </param> /// <returns> /// true: if no error or failure was detected /// false: if an error or failure was detected /// </returns> public bool CheckIfInfoContains(string value) { string actualInfo = new InformationElements().InfoText; string actualInfoLowerCase = actualInfo.ToLower(); string valueToLowerCase = value.ToLower(); if (actualInfoLowerCase.Contains(valueToLowerCase) == false) { Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "HistoROM module actual info message does not contain: '" + value + "'."); return(false); } Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "HistoROM module actual info says: '" + actualInfo + "'."); return(true); }
/// <summary> /// Analysis status information string in down left corner of the module /// </summary> /// <returns> /// true: if no error or failure was detected /// false: if an error or failure was detected /// </returns> public bool CheckInfo() { bool result = true; string actualInfo = new InformationElements().InfoText; string actualInfoLowerCase = actualInfo.ToLower(); ResourceSet messages = UsermessageTranslations.ResourceManager.GetResourceSet(CultureInfo.CurrentUICulture, true, true); foreach (DictionaryEntry message in messages) { if (actualInfoLowerCase.Contains(message.ToString())) { Log.Error(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "HistoROM module reports: \"" + actualInfo + "\""); result = false; break; } } return(result); }