Loading INAF.Apps.Uwp.SLabDataManager/Assets/logbook/logbook.xml +3 −0 Original line number Diff line number Diff line Loading @@ -3,10 +3,13 @@ <updates> <fixes> <fix>When a processing step (alignment, etc) is saved on cloud, cloud icon appears on related panel</fix> <fix>Fixed issue in saving smoothed spectrum on cloud</fix> <fix>Fixed issue in saving smoothed spectrum locally</fix> </fixes> <addings> <adding>Added warning message when saving on cloud overwrites data already saved on cloud</adding> <adding>Improved cloud icon in 'Smoothing' panel: each smoothing type has its own cloud icon</adding> <adding>Added 'refresh' button in smoothing panel for updating the selected spectrum type</adding> </addings> </updates> </logbook> No newline at end of file INAF.Apps.Uwp.SLabDataManager/Strings/en-us/Resources.resw +6 −0 Original line number Diff line number Diff line Loading @@ -1096,4 +1096,10 @@ <data name="OverwriteSavedSpectrumQuestion" xml:space="preserve"> <value>By saving this processing step, the one saved on cloud will be overwritten. Do you want to continue?</value> </data> <data name="RawSpectrumSmoothingButtonHidePanel.Text" xml:space="preserve"> <value>Close smoothing settings panel</value> </data> <data name="RawSpectrumSmoothingButtonRefreshPanel.Text" xml:space="preserve"> <value>Refresh selected spectrum type</value> </data> </root> No newline at end of file INAF.Apps.Uwp.SLabDataManager/ViewModels/ChartViewModel.cs +7 −0 Original line number Diff line number Diff line Loading @@ -362,6 +362,11 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels WorkingItems.SpectrumChartOptions.AreErrorBarsRequired = isStdDevAvailableForPoints; } private void prepareProcessedSpectrumForSaving<T>(SpectrumType spectrumType) where T : IChartSpectrumOfTypeProcessedModel { ((T)WorkingItems.SpectraContainer.tryGetSpectrumOfType(spectrumType)).prepareForSaving(); } private void setChartLegendHeight() { int candidateHeight = chartLegendMinimumHeight + (45 * (WorkingItems.SpectraContainer.getSpectraNum() - 2)); Loading Loading @@ -593,6 +598,8 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels { if (SmoothingViewModel == null) SmoothingViewModel = await userControlsViewModelFactory.createSmoothingViewModelAsync(); else await SmoothingViewModel.initAsync(); } #endregion Loading INAF.Apps.Uwp.SLabDataManager/ViewModels/ChartViewModelAlignment.cs +10 −11 Original line number Diff line number Diff line Loading @@ -4,6 +4,8 @@ using INAF.Apps.Uwp.SLabDataManager.Helpers; using INAF.Apps.Uwp.SLabDataManager.Models.Chart; using INAF.Apps.Uwp.SLabDataManager.Models.Chart.Processing; using INAF.Apps.Uwp.SLabDataManager.ViewModels.UserControlViewModels; using INAF.Libraries.NetStandard.SLabCommonModels.Models.Spectrum; using INAF.Libraries.NetStandard.SLabCommonModels.Models.Spectrum.ProcessedSpectraInfo; using INAF.Libraries.NetStandard.SLabCommonModels.Models.WebApp.Responses; using Microsoft.Extensions.DependencyInjection; using System.Threading.Tasks; Loading Loading @@ -81,11 +83,6 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels /* add processing step to the list */ addProcessingStep(SpectrumType.Aligned); /* save info about files used for alignment */ ((ChartSpectrumOfTypeAlignedModel)result.Spectrum).ParentFiles.ParentFile = WorkingItems.SpectraContainer.tryGetSpectrumOfType(SpectrumType.Raw).ToSpectrumFileBaseInfo(); ((ChartSpectrumOfTypeAlignedModel)result.Spectrum).ParentFiles.RefFile = WorkingItems.SpectraContainer.tryGetSpectrumOfType(SpectrumType.Ref).ToSpectrumFileBaseInfo(); ((ChartSpectrumOfTypeAlignedModel)result.Spectrum).ParentFiles.RefWhiteFile = WorkingItems.SpectraContainer.tryGetSpectrumOfType(SpectrumType.RefWhite).ToSpectrumFileBaseInfo(); /* enable toggleSwitch for adding points for continuum fit by tapping on spectrum */ initSegmentsFitViewModel(); Loading @@ -104,11 +101,6 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels showDialogMessage(result.DialogMessage, result.DialogMessageType); } private void prepareProcessedSpectrumForSaving<T>(SpectrumType spectrumType) where T : IChartSpectrumOfTypeProcessedModel { ((T)WorkingItems.SpectraContainer.tryGetSpectrumOfType(spectrumType)).prepareForSaving(); } private async Task saveSpectrumOfTypeAlignedCloudAndLocalAsync(StorageItemType fileExt) { prepareProcessedSpectrumForSaving<ChartSpectrumOfTypeAlignedModel>(SpectrumType.Aligned); Loading Loading @@ -165,7 +157,14 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels { raiseHideAlignmentFlyoutRequired(); prepareProcessedSpectrumForSaving<ChartSpectrumOfTypeAlignedModel>(SpectrumType.Aligned); /* save info about files used for alignment */ ParentFilesModel parentFiles = new ParentFilesModel() { ParentFile = WorkingItems.SpectraContainer.tryGetSpectrumOfType(SpectrumType.Raw).ToSpectrumFileBaseInfo(), RefFile = WorkingItems.SpectraContainer.tryGetSpectrumOfType(SpectrumType.Ref).ToSpectrumFileBaseInfo(), RefWhiteFile = WorkingItems.SpectraContainer.tryGetSpectrumOfType(SpectrumType.RefWhite).ToSpectrumFileBaseInfo() }; ((ISpectrumOfTypeProcessedModel)WorkingItems.SpectraContainer.tryGetSpectrumOfType(SpectrumType.Aligned)).ParentFiles = parentFiles; await saveSpectrumOfTypeLocalAsync(SpectrumType.Aligned, fileExt, closeIsLoading); } Loading INAF.Apps.Uwp.SLabDataManager/ViewModels/ChartViewModelSegmentsFit.cs +2 −2 Original line number Diff line number Diff line Loading @@ -329,8 +329,9 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels if (creationCollisionOption == CreationCollisionOption.GenerateUniqueName && !SegmentsFitViewModel.IsSaveAsCopyAllowed) return; /* save spectrum locally */ prepareProcessedSpectrumForSaving<ChartSpectrumOfTypeContinuumRemovedModel>(SpectrumType.ContinuumRemoved); /* save spectrum locally */ await saveSpectrumOfTypeContinuumRemovedLocalAsync(fileExt, closeIsLoading: false, creationCollisionOption); SegmentsFitViewModel.tryRaiseIsSaveAsCopyAllowed(); Loading Loading @@ -410,7 +411,6 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels ((ISpectrumOfTypeProcessedModel)WorkingItems.SpectraContainer.tryGetSpectrumOfType(SpectrumType.ContinuumRemoved)).ParentFiles = parentFiles; /* save spectrum locally */ prepareProcessedSpectrumForSaving<ChartSpectrumOfTypeContinuumRemovedModel>(SpectrumType.ContinuumRemoved); await saveSpectrumOfTypeLocalAsync(SpectrumType.ContinuumRemoved, fileExt, closeIsLoading, creationCollisionOption); SegmentsFitViewModel.tryRaiseIsSaveAsCopyAllowed(); Loading Loading
INAF.Apps.Uwp.SLabDataManager/Assets/logbook/logbook.xml +3 −0 Original line number Diff line number Diff line Loading @@ -3,10 +3,13 @@ <updates> <fixes> <fix>When a processing step (alignment, etc) is saved on cloud, cloud icon appears on related panel</fix> <fix>Fixed issue in saving smoothed spectrum on cloud</fix> <fix>Fixed issue in saving smoothed spectrum locally</fix> </fixes> <addings> <adding>Added warning message when saving on cloud overwrites data already saved on cloud</adding> <adding>Improved cloud icon in 'Smoothing' panel: each smoothing type has its own cloud icon</adding> <adding>Added 'refresh' button in smoothing panel for updating the selected spectrum type</adding> </addings> </updates> </logbook> No newline at end of file
INAF.Apps.Uwp.SLabDataManager/Strings/en-us/Resources.resw +6 −0 Original line number Diff line number Diff line Loading @@ -1096,4 +1096,10 @@ <data name="OverwriteSavedSpectrumQuestion" xml:space="preserve"> <value>By saving this processing step, the one saved on cloud will be overwritten. Do you want to continue?</value> </data> <data name="RawSpectrumSmoothingButtonHidePanel.Text" xml:space="preserve"> <value>Close smoothing settings panel</value> </data> <data name="RawSpectrumSmoothingButtonRefreshPanel.Text" xml:space="preserve"> <value>Refresh selected spectrum type</value> </data> </root> No newline at end of file
INAF.Apps.Uwp.SLabDataManager/ViewModels/ChartViewModel.cs +7 −0 Original line number Diff line number Diff line Loading @@ -362,6 +362,11 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels WorkingItems.SpectrumChartOptions.AreErrorBarsRequired = isStdDevAvailableForPoints; } private void prepareProcessedSpectrumForSaving<T>(SpectrumType spectrumType) where T : IChartSpectrumOfTypeProcessedModel { ((T)WorkingItems.SpectraContainer.tryGetSpectrumOfType(spectrumType)).prepareForSaving(); } private void setChartLegendHeight() { int candidateHeight = chartLegendMinimumHeight + (45 * (WorkingItems.SpectraContainer.getSpectraNum() - 2)); Loading Loading @@ -593,6 +598,8 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels { if (SmoothingViewModel == null) SmoothingViewModel = await userControlsViewModelFactory.createSmoothingViewModelAsync(); else await SmoothingViewModel.initAsync(); } #endregion Loading
INAF.Apps.Uwp.SLabDataManager/ViewModels/ChartViewModelAlignment.cs +10 −11 Original line number Diff line number Diff line Loading @@ -4,6 +4,8 @@ using INAF.Apps.Uwp.SLabDataManager.Helpers; using INAF.Apps.Uwp.SLabDataManager.Models.Chart; using INAF.Apps.Uwp.SLabDataManager.Models.Chart.Processing; using INAF.Apps.Uwp.SLabDataManager.ViewModels.UserControlViewModels; using INAF.Libraries.NetStandard.SLabCommonModels.Models.Spectrum; using INAF.Libraries.NetStandard.SLabCommonModels.Models.Spectrum.ProcessedSpectraInfo; using INAF.Libraries.NetStandard.SLabCommonModels.Models.WebApp.Responses; using Microsoft.Extensions.DependencyInjection; using System.Threading.Tasks; Loading Loading @@ -81,11 +83,6 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels /* add processing step to the list */ addProcessingStep(SpectrumType.Aligned); /* save info about files used for alignment */ ((ChartSpectrumOfTypeAlignedModel)result.Spectrum).ParentFiles.ParentFile = WorkingItems.SpectraContainer.tryGetSpectrumOfType(SpectrumType.Raw).ToSpectrumFileBaseInfo(); ((ChartSpectrumOfTypeAlignedModel)result.Spectrum).ParentFiles.RefFile = WorkingItems.SpectraContainer.tryGetSpectrumOfType(SpectrumType.Ref).ToSpectrumFileBaseInfo(); ((ChartSpectrumOfTypeAlignedModel)result.Spectrum).ParentFiles.RefWhiteFile = WorkingItems.SpectraContainer.tryGetSpectrumOfType(SpectrumType.RefWhite).ToSpectrumFileBaseInfo(); /* enable toggleSwitch for adding points for continuum fit by tapping on spectrum */ initSegmentsFitViewModel(); Loading @@ -104,11 +101,6 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels showDialogMessage(result.DialogMessage, result.DialogMessageType); } private void prepareProcessedSpectrumForSaving<T>(SpectrumType spectrumType) where T : IChartSpectrumOfTypeProcessedModel { ((T)WorkingItems.SpectraContainer.tryGetSpectrumOfType(spectrumType)).prepareForSaving(); } private async Task saveSpectrumOfTypeAlignedCloudAndLocalAsync(StorageItemType fileExt) { prepareProcessedSpectrumForSaving<ChartSpectrumOfTypeAlignedModel>(SpectrumType.Aligned); Loading Loading @@ -165,7 +157,14 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels { raiseHideAlignmentFlyoutRequired(); prepareProcessedSpectrumForSaving<ChartSpectrumOfTypeAlignedModel>(SpectrumType.Aligned); /* save info about files used for alignment */ ParentFilesModel parentFiles = new ParentFilesModel() { ParentFile = WorkingItems.SpectraContainer.tryGetSpectrumOfType(SpectrumType.Raw).ToSpectrumFileBaseInfo(), RefFile = WorkingItems.SpectraContainer.tryGetSpectrumOfType(SpectrumType.Ref).ToSpectrumFileBaseInfo(), RefWhiteFile = WorkingItems.SpectraContainer.tryGetSpectrumOfType(SpectrumType.RefWhite).ToSpectrumFileBaseInfo() }; ((ISpectrumOfTypeProcessedModel)WorkingItems.SpectraContainer.tryGetSpectrumOfType(SpectrumType.Aligned)).ParentFiles = parentFiles; await saveSpectrumOfTypeLocalAsync(SpectrumType.Aligned, fileExt, closeIsLoading); } Loading
INAF.Apps.Uwp.SLabDataManager/ViewModels/ChartViewModelSegmentsFit.cs +2 −2 Original line number Diff line number Diff line Loading @@ -329,8 +329,9 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels if (creationCollisionOption == CreationCollisionOption.GenerateUniqueName && !SegmentsFitViewModel.IsSaveAsCopyAllowed) return; /* save spectrum locally */ prepareProcessedSpectrumForSaving<ChartSpectrumOfTypeContinuumRemovedModel>(SpectrumType.ContinuumRemoved); /* save spectrum locally */ await saveSpectrumOfTypeContinuumRemovedLocalAsync(fileExt, closeIsLoading: false, creationCollisionOption); SegmentsFitViewModel.tryRaiseIsSaveAsCopyAllowed(); Loading Loading @@ -410,7 +411,6 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels ((ISpectrumOfTypeProcessedModel)WorkingItems.SpectraContainer.tryGetSpectrumOfType(SpectrumType.ContinuumRemoved)).ParentFiles = parentFiles; /* save spectrum locally */ prepareProcessedSpectrumForSaving<ChartSpectrumOfTypeContinuumRemovedModel>(SpectrumType.ContinuumRemoved); await saveSpectrumOfTypeLocalAsync(SpectrumType.ContinuumRemoved, fileExt, closeIsLoading, creationCollisionOption); SegmentsFitViewModel.tryRaiseIsSaveAsCopyAllowed(); Loading