public void ReadXML(XmlReader reader) { reader.ReadStartElement(); while (reader.NodeType == XmlNodeType.Element) { switch (reader.Name) { case "TimecodeFormat": timecodeFormat = (TimecodeFormat)Enum.Parse(typeof(TimecodeFormat), reader.ReadElementContentAsString()); break; case "SpeedUnit": speedUnit = (SpeedUnit)Enum.Parse(typeof(SpeedUnit), reader.ReadElementContentAsString()); break; case "AccelerationUnit": accelerationUnit = (AccelerationUnit)Enum.Parse(typeof(AccelerationUnit), reader.ReadElementContentAsString()); break; case "AngleUnit": angleUnit = (AngleUnit)Enum.Parse(typeof(AngleUnit), reader.ReadElementContentAsString()); break; case "AngularVelocityUnit": angularVelocityUnit = (AngularVelocityUnit)Enum.Parse(typeof(AngularVelocityUnit), reader.ReadElementContentAsString()); break; case "AngularAccelerationUnit": angularAccelerationUnit = (AngularAccelerationUnit)Enum.Parse(typeof(AngularAccelerationUnit), reader.ReadElementContentAsString()); break; case "CustomLengthUnit": customLengthUnit = reader.ReadElementContentAsString(); break; case "CustomLengthAbbreviation": customLengthAbbreviation = reader.ReadElementContentAsString(); break; case "AspectRatio": aspectRatio = (ImageAspectRatio)Enum.Parse(typeof(ImageAspectRatio), reader.ReadElementContentAsString()); break; case "DeinterlaceByDefault": deinterlaceByDefault = XmlHelper.ParseBoolean(reader.ReadElementContentAsString()); break; case "InteractiveFrameTracker": interactiveFrameTracker = XmlHelper.ParseBoolean(reader.ReadElementContentAsString()); break; case "WorkingZoneSeconds": workingZoneSeconds = reader.ReadElementContentAsInt(); break; case "WorkingZoneMemory": workingZoneMemory = reader.ReadElementContentAsInt(); break; case "SyncLockSpeed": syncLockSpeed = XmlHelper.ParseBoolean(reader.ReadElementContentAsString()); break; case "ImageFormat": imageFormat = (KinoveaImageFormat)Enum.Parse(typeof(KinoveaImageFormat), reader.ReadElementContentAsString()); break; case "VideoFormat": videoFormat = (KinoveaVideoFormat)Enum.Parse(typeof(KinoveaVideoFormat), reader.ReadElementContentAsString()); break; case "Background": backgroundColor = XmlHelper.ParseColor(reader.ReadElementContentAsString(), defaultBackgroundColor); break; case "InfoFading": defaultFading.ReadXml(reader); break; case "DrawOnPlay": drawOnPlay = XmlHelper.ParseBoolean(reader.ReadElementContentAsString()); break; case "RecentColors": ParseRecentColors(reader); break; case "MaxRecentColors": maxRecentColors = reader.ReadElementContentAsInt(); break; case "TrackingProfile": trackingProfile.ReadXml(reader); break; case "EnableFiltering": enableFiltering = XmlHelper.ParseBoolean(reader.ReadElementContentAsString()); break; case "EnableCustomToolsDebugMode": enableCustomToolsDebugMode = XmlHelper.ParseBoolean(reader.ReadElementContentAsString()); break; case "DefaultReplaySpeed": string str = reader.ReadElementContentAsString(); defaultReplaySpeed = float.Parse(str, CultureInfo.InvariantCulture); break; case "DetectImageSequences": detectImageSequences = XmlHelper.ParseBoolean(reader.ReadElementContentAsString()); break; case "PreloadKeyframes": preloadKeyframes = reader.ReadElementContentAsInt(); break; default: reader.ReadOuterXml(); break; } } reader.ReadEndElement(); }