public void WriteToDataset(CardDataset cds, CardPart part) { if (part == CardPart.Program) { CardDataset.EngineRow er; CardDataset.FlagRow fr; for (int i = 0; i < cds.Engine.Count; i++) { cds.Engine.RemoveEngineRow(cds.Engine [i]); } er = cds.Engine.NewEngineRow(); er.AngleUnit = unit.ToString(); er.FlagCount = flags.Length; er.CardRow = cds.Card [0]; cds.Engine.AddEngineRow(er); for (int i = 0; i < flags.Length; i++) { fr = cds.Flag.NewFlagRow(); fr.Id = i; fr.Value = flags [i]; fr.EngineRow = er; cds.Flag.AddFlagRow(fr); } } }
public void WriteXML(XmlWriter writer) { writer.WriteElementString("TimecodeFormat", timecodeFormat.ToString()); writer.WriteElementString("SpeedUnit", speedUnit.ToString()); writer.WriteElementString("AccelerationUnit", accelerationUnit.ToString()); writer.WriteElementString("AngleUnit", angleUnit.ToString()); writer.WriteElementString("AngularVelocityUnit", angularVelocityUnit.ToString()); writer.WriteElementString("AngularAccelerationUnit", angularAccelerationUnit.ToString()); writer.WriteElementString("CustomLengthUnit", customLengthUnit); writer.WriteElementString("CustomLengthAbbreviation", customLengthAbbreviation); writer.WriteElementString("AspectRatio", aspectRatio.ToString()); writer.WriteElementString("DeinterlaceByDefault", deinterlaceByDefault ? "true" : "false"); writer.WriteElementString("InteractiveFrameTracker", interactiveFrameTracker ? "true" : "false"); writer.WriteElementString("WorkingZoneMemory", workingZoneMemory.ToString()); writer.WriteElementString("SyncLockSpeed", syncLockSpeed ? "true" : "false"); writer.WriteElementString("SyncByMotion", syncByMotion ? "true" : "false"); writer.WriteElementString("ImageFormat", imageFormat.ToString()); writer.WriteElementString("VideoFormat", videoFormat.ToString()); writer.WriteElementString("Background", XmlHelper.WriteColor(backgroundColor, true)); writer.WriteStartElement("InfoFading"); defaultFading.WriteXml(writer); writer.WriteEndElement(); writer.WriteElementString("DrawOnPlay", drawOnPlay ? "true" : "false"); if (recentColors.Count > 0) { writer.WriteStartElement("RecentColors"); for (int i = 0; i < maxRecentColors; i++) { if (i >= recentColors.Count) { break; } writer.WriteElementString("RecentColor", string.Format("{0};{1};{2}", recentColors[i].R.ToString(), recentColors[i].G.ToString(), recentColors[i].B.ToString())); } writer.WriteEndElement(); } writer.WriteElementString("MaxRecentColors", maxRecentColors.ToString()); writer.WriteStartElement("TrackingProfile"); trackingProfile.WriteXml(writer); writer.WriteEndElement(); writer.WriteElementString("EnableFiltering", enableFiltering ? "true" : "false"); writer.WriteElementString("EnableCustomToolsDebugMode", enableCustomToolsDebugMode ? "true" : "false"); writer.WriteElementString("DefaultReplaySpeed", defaultReplaySpeed.ToString("0", CultureInfo.InvariantCulture)); writer.WriteElementString("DetectImageSequences", detectImageSequences ? "true" : "false"); writer.WriteElementString("PreloadKeyframes", preloadKeyframes.ToString()); writer.WriteElementString("PlaybackKVA", playbackKVA); }
public void WriteXML(XmlWriter writer) { writer.WriteElementString("TimecodeFormat", timecodeFormat.ToString()); writer.WriteElementString("SpeedUnit", speedUnit.ToString()); writer.WriteElementString("AccelerationUnit", accelerationUnit.ToString()); writer.WriteElementString("AngleUnit", angleUnit.ToString()); writer.WriteElementString("AngularVelocityUnit", angularVelocityUnit.ToString()); writer.WriteElementString("AngularAccelerationUnit", angularAccelerationUnit.ToString()); writer.WriteElementString("CustomLengthUnit", customLengthUnit); writer.WriteElementString("CustomLengthAbbreviation", customLengthAbbreviation); writer.WriteElementString("AspectRatio", aspectRatio.ToString()); writer.WriteElementString("DeinterlaceByDefault", deinterlaceByDefault ? "true" : "false"); writer.WriteElementString("InteractiveFrameTracker", interactiveFrameTracker ? "true" : "false"); writer.WriteElementString("WorkingZoneSeconds", workingZoneSeconds.ToString()); writer.WriteElementString("WorkingZoneMemory", workingZoneMemory.ToString()); writer.WriteElementString("SyncLockSpeed", syncLockSpeed ? "true" : "false"); writer.WriteElementString("ImageFormat", imageFormat.ToString()); writer.WriteElementString("VideoFormat", videoFormat.ToString()); writer.WriteStartElement("InfoFading"); defaultFading.WriteXml(writer); writer.WriteEndElement(); writer.WriteElementString("MaxFading", maxFading.ToString()); writer.WriteElementString("DrawOnPlay", drawOnPlay ? "true" : "false"); if (recentColors.Count > 0) { writer.WriteStartElement("RecentColors"); for (int i = 0; i < maxRecentColors; i++) { if (i >= recentColors.Count) { break; } writer.WriteElementString("RecentColor", string.Format("{0};{1};{2}", recentColors[i].R.ToString(), recentColors[i].G.ToString(), recentColors[i].B.ToString())); } writer.WriteEndElement(); } writer.WriteElementString("MaxRecentColors", maxRecentColors.ToString()); writer.WriteStartElement("TrackingProfile"); trackingProfile.WriteXml(writer); writer.WriteEndElement(); }