// ToDo: sort this out.. private void ParseDescriptionForFeatures(List <string> FeatureDescription) { lock (this) { DriveFeatures currentFeatures = new DriveFeatures(false, false, false, false, false, false, false, false, false, false, false, false, string.Empty, string.Empty); MediaTypeSupport currentProfile = new MediaTypeSupport(false, false, false, false, false, false, false, false, false, false); for (int i = 0; i < FeatureDescription.Count; i++) { string checkStr = FeatureDescription[i]; if (checkStr.Contains(@"Does read CD-R media")) { currentFeatures.ReadsCDR = true; } else if (checkStr.Contains(@"Does write CD-R media")) { currentFeatures.WriteCDR = true; } else if (checkStr.Contains(@"Does read CD-RW media")) { currentFeatures.ReadsCDRW = true; } else if (checkStr.Contains(@"Does write CD-RW")) { currentFeatures.WriteCDRW = true; } else if (checkStr.Contains(@"Does read DVD-ROM")) { currentFeatures.ReadsDVDRom = true; } else if (checkStr.Contains(@"Does read DVD-R")) { currentFeatures.ReadsDVDR = true; } else if (checkStr.Contains(@"Does write DVD-R")) { currentFeatures.WriteDVDR = true; } else if (checkStr.Contains(@"Does read DVD-RAM")) { currentFeatures.ReadsDVDRam = true; } else if (checkStr.Contains(@"Does write DVD-RAM")) { currentFeatures.WriteDVDRam = true; } else if (checkStr.Contains(@"Does support Buffer-Underrun-Free recording")) { currentFeatures.SupportsBurnFree = true; } else if (checkStr.Contains(@"Does support test writing")) { currentFeatures.AllowsDummyWrite = true; } else if (checkStr.Contains(@"Maximum read")) { currentFeatures.MaxReadSpeed = checkStr.Substring(23).Trim(trimchars); } else if (checkStr.Contains(@"Maximum write")) { currentFeatures.MaxWriteSpeed = checkStr.Substring(23).Trim(trimchars); } else if (checkStr.Contains(@"Vendor_info")) { fDeviceVendor = checkStr.Substring(16).Trim(trimchars); } else if (checkStr.Contains(@"Identifikation : ")) { fDeviceName = checkStr.Substring(16).Trim(trimchars); } else if (checkStr.Contains(@" DVD+R/DL")) { currentProfile.WriteDlDVDplusR = true; } else if (checkStr.Contains(@" DVD+RW")) { currentProfile.WriteDVDplusRW = true; } else if (checkStr.Contains(@" DVD+R")) { currentProfile.WriteDVDplusR = true; } else if (checkStr.Contains(@" DVD-RW")) { currentProfile.WriteDVDminusRW = true; } else if (checkStr.Contains(@" DVD-R")) { currentProfile.WriteDVDminusR = true; } else if (checkStr.Contains(@" CD-RW")) { currentProfile.WriteCDRW = true; } else if (checkStr.Contains(@" CD-R")) { currentProfile.WriteCDR = true; } else if (checkStr.Contains(@"BD-ROM")) { currentFeatures.ReadsBRRom = true; } } fDriveFeatures = currentFeatures; fMediaFeatures = currentProfile; } }
// ToDo: sort this out.. private void ParseDescriptionForFeatures(List<string> FeatureDescription) { lock (this) { DriveFeatures currentFeatures = new DriveFeatures(false, false, false, false, false, false, false, false, false, false, false, false, string.Empty, string.Empty); MediaTypeSupport currentProfile = new MediaTypeSupport(false, false, false, false, false, false, false, false, false, false); for (int i = 0; i < FeatureDescription.Count; i++) { string checkStr = FeatureDescription[i]; if (checkStr.Contains(@"Does read CD-R media")) currentFeatures.ReadsCDR = true; else if (checkStr.Contains(@"Does write CD-R media")) currentFeatures.WriteCDR = true; else if (checkStr.Contains(@"Does read CD-RW media")) currentFeatures.ReadsCDRW = true; else if (checkStr.Contains(@"Does write CD-RW")) currentFeatures.WriteCDRW = true; else if (checkStr.Contains(@"Does read DVD-ROM")) currentFeatures.ReadsDVDRom = true; else if (checkStr.Contains(@"Does read DVD-R")) currentFeatures.ReadsDVDR = true; else if (checkStr.Contains(@"Does write DVD-R")) currentFeatures.WriteDVDR = true; else if (checkStr.Contains(@"Does read DVD-RAM")) currentFeatures.ReadsDVDRam = true; else if (checkStr.Contains(@"Does write DVD-RAM")) currentFeatures.WriteDVDRam = true; else if (checkStr.Contains(@"Does support Buffer-Underrun-Free recording")) currentFeatures.SupportsBurnFree = true; else if (checkStr.Contains(@"Does support test writing")) currentFeatures.AllowsDummyWrite = true; else if (checkStr.Contains(@"Maximum read")) currentFeatures.MaxReadSpeed = checkStr.Substring(23).Trim(trimchars); else if (checkStr.Contains(@"Maximum write")) currentFeatures.MaxWriteSpeed = checkStr.Substring(23).Trim(trimchars); else if (checkStr.Contains(@"Vendor_info")) fDeviceVendor = checkStr.Substring(16).Trim(trimchars); else if (checkStr.Contains(@"Identifikation : ")) fDeviceName = checkStr.Substring(16).Trim(trimchars); else if (checkStr.Contains(@" DVD+R/DL")) currentProfile.WriteDlDVDplusR = true; else if (checkStr.Contains(@" DVD+RW")) currentProfile.WriteDVDplusRW = true; else if (checkStr.Contains(@" DVD+R")) currentProfile.WriteDVDplusR = true; else if (checkStr.Contains(@" DVD-RW")) currentProfile.WriteDVDminusRW = true; else if (checkStr.Contains(@" DVD-R")) currentProfile.WriteDVDminusR = true; else if (checkStr.Contains(@" CD-RW")) currentProfile.WriteCDRW = true; else if (checkStr.Contains(@" CD-R")) currentProfile.WriteCDR = true; else if (checkStr.Contains(@"BD-ROM")) currentFeatures.ReadsBRRom = true; } fDriveFeatures = currentFeatures; fMediaFeatures = currentProfile; } }