private bool DetectModelFromCloneInfoFile(ZipFile zip) { byte[] cloneInfo = ReadFileContent(zip, "CloneInfo"); if (cloneInfo == null) { this.c = this.modelConstants["Series:B"]; return(true); } if (cloneInfo.Length >= 9) { char series = (char)cloneInfo[8]; if (series == 'B') // LTxxBxxx uses 1201 format. The 2009 B-models have no CloneInfo file, so we can tell the difference { series = 'E'; } else if (series == 'C') // "C" usually means 1001 format, but there some with 1201 format: LTxxCxxx, HExxCxxx, ... so we can't decide here { return(false); } else if ("EFHJ".Contains(series)) // E, F, H, some J { series = 'E'; } if (this.modelConstants.TryGetValue("Series:" + series, out this.c)) { return(true); } } return(false); }
private bool DetectModelFromCloneInfoFile(ZipFile zip) { byte[] cloneInfo = ReadFileContent(zip, "CloneInfo"); if (cloneInfo == null) { this.c = this.modelConstants["Series:B"]; return true; } if (cloneInfo.Length >= 9) { char series = (char) cloneInfo[8]; if (series == 'B') // 2013 B-series uses E/F-series format series = 'F'; if (this.modelConstants.TryGetValue("Series:" + series, out this.c)) return true; } return false; }
private bool DetectModelFromCloneInfoFile(ZipFile zip) { byte[] cloneInfo = ReadFileContent(zip, "CloneInfo"); if (cloneInfo == null) { this.c = this.modelConstants["Series:B"]; return true; } if (cloneInfo.Length >= 9) { char series = (char) cloneInfo[8]; if (series == 'B') // LTxxBxxx uses 1201 format. The 2009 B-models have no CloneInfo file, so we can tell the difference series = 'E'; else if (series == 'C') // "C" usually means 1001 format, but there some with 1201 format: LTxxCxxx, HExxCxxx, ... so we can't decide here return false; else if (series >= 'E') // E, F, H, some J series = 'E'; if (this.modelConstants.TryGetValue("Series:" + series, out this.c)) return true; } return false; }