Loading INAF.Apps.Uwp.SLabDataManager/Constants/Constants.cs +2 −2 Original line number Diff line number Diff line Loading @@ -40,11 +40,11 @@ public static readonly string XML_CONTINUUM_REMOVAL_SETTINGS_SEGMENT_PARAMETER_VALUE = "ParameterValue"; public static readonly string XML_ELEMENTS = "Elements"; public static readonly string XML_ELEMENT = "Element"; public static readonly string XML_MAX = "Max"; public static readonly string XML_MIN = "Min"; public static readonly string XML_NUM_OF_POINTS = "NumOfPoints"; public static readonly string XML_RAW_FILENAME = "RawFilename"; public static readonly string XML_INFO = "Info"; public static readonly string XML_MAX = "Max"; public static readonly string XML_MIN = "Min"; public static readonly string XML_PARENT_FILES = "ParentFiles"; public static readonly string XML_PARENT_FILE_ID = "ParentFileId"; public static readonly string XML_REF_FILE_ID = "RefFileId"; Loading INAF.Apps.Uwp.SLabDataManager/Extensions/Extensions.cs +6 −6 Original line number Diff line number Diff line Loading @@ -350,12 +350,6 @@ namespace INAF.Apps.Uwp.SLabDataManager.Extensions return xmlelements; } /* used for 'ToSpectrumFile' extension method */ public static string ToXmlString(this IChartSpectrumModel spectrum) { return ((IChartSpectrumOfTypeProcessedModel)spectrum).ToXml().GetXml(); } /* used for 'saveSpectrumOfTypeAsLocalFileAsync' method in BaseUserControlViewModel */ public static XmlDocument ToXml(this IChartSpectrumOfTypeProcessedModel spectrum) { Loading Loading @@ -388,6 +382,12 @@ namespace INAF.Apps.Uwp.SLabDataManager.Extensions return dom; } /* used for 'ToSpectrumFile' extension method */ public static string ToXmlString(this IChartSpectrumModel spectrum) { return ((IChartSpectrumOfTypeProcessedModel)spectrum).ToXml().GetXml(); } #endregion #region elements Loading INAF.Apps.Uwp.SLabDataManager/Helpers/FileReaders/SpectrumFiles/XmlSpectrumFile.cs +129 −109 Original line number Diff line number Diff line Loading @@ -8,6 +8,10 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders.SpectrumFiles { [XmlElement(ElementName = "RawFilename")] public string RawFilename { get; set; } [XmlElement(ElementName = "Filepath")] public string Filepath { get; set; } [XmlElement(ElementName = "Type")] public string Type { get; set; } } Loading @@ -17,8 +21,10 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders.SpectrumFiles { [XmlElement(ElementName = "ParentFileId")] public string ParentFileId { get; set; } [XmlElement(ElementName = "RefFileId")] public string RefFileId { get; set; } [XmlElement(ElementName = "RefWhiteFileId")] public string RefWhiteFileId { get; set; } } Loading @@ -28,6 +34,7 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders.SpectrumFiles { [XmlElement(ElementName = "Min")] public string Min { get; set; } [XmlElement(ElementName = "Max")] public string Max { get; set; } } Loading @@ -37,6 +44,7 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders.SpectrumFiles { [XmlElement(ElementName = "NumOfPoints")] public string NumOfPoints { get; set; } [XmlElement(ElementName = "SegmentBoundaries")] public DeserializedSegmentBoundaries SegmentBoundaries { get; set; } } Loading @@ -46,14 +54,19 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders.SpectrumFiles { [XmlElement(ElementName = "FitMethodName")] public string FitMethodName { get; set; } [XmlElement(ElementName = "SegmentStart")] public string SegmentStart { get; set; } [XmlElement(ElementName = "SegmentEnd")] public string SegmentEnd { get; set; } [XmlElement(ElementName = "ParameterValue")] public string ParameterValue { get; set; } [XmlElement(ElementName = "PolynomialOrder")] public string PolynomialOrder { get; set; } [XmlElement(ElementName = "WindowSize")] public string WindowSize { get; set; } } Loading @@ -70,6 +83,7 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders.SpectrumFiles { [XmlElement(ElementName = "NumOfPoints")] public string NumOfPoints { get; set; } [XmlElement(ElementName = "Segments")] public DeserializedSegments Segments { get; set; } } Loading @@ -86,6 +100,7 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders.SpectrumFiles { [XmlAttribute(AttributeName = "Wavelength")] public string Wavelength { get; set; } [XmlText] public string Text { get; set; } } Loading @@ -102,14 +117,19 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders.SpectrumFiles { [XmlElement(ElementName = "Info")] public DeserializedInfo Info { get; set; } [XmlElement(ElementName = "ParentFiles")] public DeserializedParentFiles ParentFiles { get; set; } [XmlElement(ElementName = "AlignmentSettings")] public DeserializedAlignmentSettings AlignmentSettings { get; set; } [XmlElement(ElementName = "ContinuumRemovalSettings")] public DeserializedContinuumRemovalSettings ContinuumRemovalSettings { get; set; } [XmlElement(ElementName = "SmoothingSettings")] public DeserializedSmoothingSettings SmoothingSettings { get; set; } [XmlElement(ElementName = "Elements")] public DeserializedElements Elements { get; set; } } Loading INAF.Apps.Uwp.SLabDataManager/Helpers/FileReaders/SpectrumFiles/XmlSpectrumFileReader.cs +1 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders using (var stream = await file.OpenStreamForReadAsync()) { spectrumObj = (DeserializedSpectrum)xmlSerializer.Deserialize(stream); spectrumObj.Info.Filepath = file.Path; } if (spectrumObj == null) Loading INAF.Apps.Uwp.SLabDataManager/Helpers/UI/ProcessedFilesSummaryItemsTemplateSelector.cs 0 → 100644 +27 −0 Original line number Diff line number Diff line using INAF.Apps.Uwp.SLabDataManager.Models.Chart; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; namespace INAF.Apps.Uwp.SLabDataManager.Helpers.UI { public class ProcessedFilesSummaryItemsTemplateSelector : DataTemplateSelector { public DataTemplate AlignedFileSettingsAummary { get; set; } public DataTemplate ContinuumRemovedFileSettingsSummary { get; set; } public DataTemplate RawOrRefSummary { get; set; } protected override DataTemplate SelectTemplateCore(object item, DependencyObject container) { if (item is ChartSpectrumOfTypeRawModel) return RawOrRefSummary; else if (item is ChartSpectrumOfTypeAlignedModel) return AlignedFileSettingsAummary; else if (item is ChartSpectrumOfTypeContinuumRemovedModel) return ContinuumRemovedFileSettingsSummary; else return null; } } } Loading
INAF.Apps.Uwp.SLabDataManager/Constants/Constants.cs +2 −2 Original line number Diff line number Diff line Loading @@ -40,11 +40,11 @@ public static readonly string XML_CONTINUUM_REMOVAL_SETTINGS_SEGMENT_PARAMETER_VALUE = "ParameterValue"; public static readonly string XML_ELEMENTS = "Elements"; public static readonly string XML_ELEMENT = "Element"; public static readonly string XML_MAX = "Max"; public static readonly string XML_MIN = "Min"; public static readonly string XML_NUM_OF_POINTS = "NumOfPoints"; public static readonly string XML_RAW_FILENAME = "RawFilename"; public static readonly string XML_INFO = "Info"; public static readonly string XML_MAX = "Max"; public static readonly string XML_MIN = "Min"; public static readonly string XML_PARENT_FILES = "ParentFiles"; public static readonly string XML_PARENT_FILE_ID = "ParentFileId"; public static readonly string XML_REF_FILE_ID = "RefFileId"; Loading
INAF.Apps.Uwp.SLabDataManager/Extensions/Extensions.cs +6 −6 Original line number Diff line number Diff line Loading @@ -350,12 +350,6 @@ namespace INAF.Apps.Uwp.SLabDataManager.Extensions return xmlelements; } /* used for 'ToSpectrumFile' extension method */ public static string ToXmlString(this IChartSpectrumModel spectrum) { return ((IChartSpectrumOfTypeProcessedModel)spectrum).ToXml().GetXml(); } /* used for 'saveSpectrumOfTypeAsLocalFileAsync' method in BaseUserControlViewModel */ public static XmlDocument ToXml(this IChartSpectrumOfTypeProcessedModel spectrum) { Loading Loading @@ -388,6 +382,12 @@ namespace INAF.Apps.Uwp.SLabDataManager.Extensions return dom; } /* used for 'ToSpectrumFile' extension method */ public static string ToXmlString(this IChartSpectrumModel spectrum) { return ((IChartSpectrumOfTypeProcessedModel)spectrum).ToXml().GetXml(); } #endregion #region elements Loading
INAF.Apps.Uwp.SLabDataManager/Helpers/FileReaders/SpectrumFiles/XmlSpectrumFile.cs +129 −109 Original line number Diff line number Diff line Loading @@ -8,6 +8,10 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders.SpectrumFiles { [XmlElement(ElementName = "RawFilename")] public string RawFilename { get; set; } [XmlElement(ElementName = "Filepath")] public string Filepath { get; set; } [XmlElement(ElementName = "Type")] public string Type { get; set; } } Loading @@ -17,8 +21,10 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders.SpectrumFiles { [XmlElement(ElementName = "ParentFileId")] public string ParentFileId { get; set; } [XmlElement(ElementName = "RefFileId")] public string RefFileId { get; set; } [XmlElement(ElementName = "RefWhiteFileId")] public string RefWhiteFileId { get; set; } } Loading @@ -28,6 +34,7 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders.SpectrumFiles { [XmlElement(ElementName = "Min")] public string Min { get; set; } [XmlElement(ElementName = "Max")] public string Max { get; set; } } Loading @@ -37,6 +44,7 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders.SpectrumFiles { [XmlElement(ElementName = "NumOfPoints")] public string NumOfPoints { get; set; } [XmlElement(ElementName = "SegmentBoundaries")] public DeserializedSegmentBoundaries SegmentBoundaries { get; set; } } Loading @@ -46,14 +54,19 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders.SpectrumFiles { [XmlElement(ElementName = "FitMethodName")] public string FitMethodName { get; set; } [XmlElement(ElementName = "SegmentStart")] public string SegmentStart { get; set; } [XmlElement(ElementName = "SegmentEnd")] public string SegmentEnd { get; set; } [XmlElement(ElementName = "ParameterValue")] public string ParameterValue { get; set; } [XmlElement(ElementName = "PolynomialOrder")] public string PolynomialOrder { get; set; } [XmlElement(ElementName = "WindowSize")] public string WindowSize { get; set; } } Loading @@ -70,6 +83,7 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders.SpectrumFiles { [XmlElement(ElementName = "NumOfPoints")] public string NumOfPoints { get; set; } [XmlElement(ElementName = "Segments")] public DeserializedSegments Segments { get; set; } } Loading @@ -86,6 +100,7 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders.SpectrumFiles { [XmlAttribute(AttributeName = "Wavelength")] public string Wavelength { get; set; } [XmlText] public string Text { get; set; } } Loading @@ -102,14 +117,19 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders.SpectrumFiles { [XmlElement(ElementName = "Info")] public DeserializedInfo Info { get; set; } [XmlElement(ElementName = "ParentFiles")] public DeserializedParentFiles ParentFiles { get; set; } [XmlElement(ElementName = "AlignmentSettings")] public DeserializedAlignmentSettings AlignmentSettings { get; set; } [XmlElement(ElementName = "ContinuumRemovalSettings")] public DeserializedContinuumRemovalSettings ContinuumRemovalSettings { get; set; } [XmlElement(ElementName = "SmoothingSettings")] public DeserializedSmoothingSettings SmoothingSettings { get; set; } [XmlElement(ElementName = "Elements")] public DeserializedElements Elements { get; set; } } Loading
INAF.Apps.Uwp.SLabDataManager/Helpers/FileReaders/SpectrumFiles/XmlSpectrumFileReader.cs +1 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders using (var stream = await file.OpenStreamForReadAsync()) { spectrumObj = (DeserializedSpectrum)xmlSerializer.Deserialize(stream); spectrumObj.Info.Filepath = file.Path; } if (spectrumObj == null) Loading
INAF.Apps.Uwp.SLabDataManager/Helpers/UI/ProcessedFilesSummaryItemsTemplateSelector.cs 0 → 100644 +27 −0 Original line number Diff line number Diff line using INAF.Apps.Uwp.SLabDataManager.Models.Chart; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; namespace INAF.Apps.Uwp.SLabDataManager.Helpers.UI { public class ProcessedFilesSummaryItemsTemplateSelector : DataTemplateSelector { public DataTemplate AlignedFileSettingsAummary { get; set; } public DataTemplate ContinuumRemovedFileSettingsSummary { get; set; } public DataTemplate RawOrRefSummary { get; set; } protected override DataTemplate SelectTemplateCore(object item, DependencyObject container) { if (item is ChartSpectrumOfTypeRawModel) return RawOrRefSummary; else if (item is ChartSpectrumOfTypeAlignedModel) return AlignedFileSettingsAummary; else if (item is ChartSpectrumOfTypeContinuumRemovedModel) return ContinuumRemovedFileSettingsSummary; else return null; } } }