public WhiskerTrackerXml(ClipSettingsXml clipSettings, MouseFrameXml[] frames, UnitSettingsXml unitSettings, FrameRateSettingsXml frameRateSettings) { ClipSettings = clipSettings; Frames = frames; UnitSettings = unitSettings; FrameRateSettings = frameRateSettings; }
private void SaveFileAs() { string filePath = FileBrowser.SaveFile("MWA|*.mwa"); if (string.IsNullOrWhiteSpace(filePath)) { return; } MouseFrameXml[] frames = m_Frames.Values.Select(x => new MouseFrameXml(x.Model)).ToArray(); UnitSettingsXml unitSettings = new UnitSettingsXml(GlobalSettings.GlobalSettings.UnitSettings); ClipSettingsXml clipSettings = new ClipSettingsXml(GlobalSettings.GlobalSettings.ClipSettings); FrameRateSettingsXml frameRateSettings = new FrameRateSettingsXml(GlobalSettings.GlobalSettings.FrameRateSettings); WhiskerTrackerXml filXml = new WhiskerTrackerXml(clipSettings, frames, unitSettings, frameRateSettings); XmlSerializer serializer = new XmlSerializer(typeof(WhiskerTrackerXml)); using (StreamWriter writer = new StreamWriter(filePath)) { serializer.Serialize(writer, filXml); } }