Loading INAF.Apps.Uwp.SLabDataManager/ViewModels/ChartViewModel.cs +1 −2 Original line number Diff line number Diff line Loading @@ -551,7 +551,6 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels if (ActionQuestionViewModel != null) { ActionQuestionViewModel.IsControlVisible = false; //ActionQuestionViewModel.Dispose(); } } #endregion Loading Loading @@ -617,7 +616,7 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels #region generic for DeleteDialog private RelayCommand commandCancelAction; public RelayCommand CommandCancelAction => commandCancelAction ?? (commandCancelAction = new RelayCommand(() => ActionQuestionViewModel.IsControlVisible = false)); public RelayCommand CommandCancelAction => commandCancelAction ?? (commandCancelAction = new RelayCommand(() => tryRemoveActionUserControl())); public RelayCommand CommandGenericAction { get; private set; } #endregion Loading INAF.Apps.Uwp.SLabDataManager/ViewModels/ChartViewModelSmoothing.cs +20 −8 Original line number Diff line number Diff line Loading @@ -103,8 +103,15 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels { /* if dest spectrumType is already present, then ask whether ovewrite it... */ SelectedActionCommand = CommandOverwriteExistingSmoothedSpectrumBySegments; /* bind the right command to the user-control */ raiseIsActionCommandBindingRequired(); /* init actionusercontrol viewmodel */ initActionQuestionViewModel(question: "SmoothingAskOverwriteExistingDestSpectrumType".GetText(), optionalQuestion: "OptionalActionDeleteOnCloudQuestion".GetText(), isOptionalActionChecked: false, isOptionalActionVisible: false); } else /* ...otherwise apply smoothing */ Loading Loading @@ -144,14 +151,16 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels private async Task overwriteExistingSmoothedSpectrumBySegmentsAsync() { if (WorkingItems.SpectraContainer.isAnySpectrumOfType(SpectrumType.AlignedSmoothedBySegments)) await WorkingItems.SpectraContainer.tryRemoveSpectrumOfTypeAsync(SpectrumType.AlignedSmoothedBySegments); /* hide action-question user control */ tryRemoveActionUserControl(); SpectrumType smoothedSpectrumType = getSrcSpectrumTypeForSmoothingToSpectrum(); /* retrieve spectrumType for smoothed spectrum */ SpectrumType destSpectrumType = SmoothingViewModel.getDestSpectrumType(SmoothingViewModel.SelectedSpectrumType); SpectrumType destSpectrumType = SmoothingViewModel.getDestSpectrumType(smoothedSpectrumType); /* hide dialog question */ //IsActionQuestionVisible = false; if (WorkingItems.SpectraContainer.isAnySpectrumOfType(SpectrumType.AlignedSmoothedBySegments)) await WorkingItems.SpectraContainer.tryRemoveSpectrumOfTypeAsync(SpectrumType.AlignedSmoothedBySegments); /* apply smoothing */ await applySmoothingBySegmentsPart2Async(destSpectrumType); Loading Loading @@ -236,17 +245,20 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels private async Task overwriteExistingSmoothedSpectrumAsync() { SpectrumType smoothedBySegmentsSpectrumType = getSrcSpectrumTypeForSmoothingToSpectrum(); /* hide action-question user control */ tryRemoveActionUserControl(); SpectrumType smoothedSpectrumType = getSrcSpectrumTypeForSmoothingToSpectrum(); /* retrieve spectrumType for smoothed spectrum */ SpectrumType destSpectrumType = SmoothingViewModel.getDestSpectrumType(smoothedBySegmentsSpectrumType); SpectrumType destSpectrumType = SmoothingViewModel.getDestSpectrumType(smoothedSpectrumType); /* remove spectrum to be overwritten */ if (WorkingItems.SpectraContainer.isAnySpectrumOfType(destSpectrumType)) await WorkingItems.SpectraContainer.tryRemoveSpectrumOfTypeAsync(destSpectrumType); /* apply smoothing */ await applySmoothingToSpectrumPart2Async(smoothedBySegmentsSpectrumType, destSpectrumType); await applySmoothingToSpectrumPart2Async(smoothedSpectrumType, destSpectrumType); } #endregion Loading Loading
INAF.Apps.Uwp.SLabDataManager/ViewModels/ChartViewModel.cs +1 −2 Original line number Diff line number Diff line Loading @@ -551,7 +551,6 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels if (ActionQuestionViewModel != null) { ActionQuestionViewModel.IsControlVisible = false; //ActionQuestionViewModel.Dispose(); } } #endregion Loading Loading @@ -617,7 +616,7 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels #region generic for DeleteDialog private RelayCommand commandCancelAction; public RelayCommand CommandCancelAction => commandCancelAction ?? (commandCancelAction = new RelayCommand(() => ActionQuestionViewModel.IsControlVisible = false)); public RelayCommand CommandCancelAction => commandCancelAction ?? (commandCancelAction = new RelayCommand(() => tryRemoveActionUserControl())); public RelayCommand CommandGenericAction { get; private set; } #endregion Loading
INAF.Apps.Uwp.SLabDataManager/ViewModels/ChartViewModelSmoothing.cs +20 −8 Original line number Diff line number Diff line Loading @@ -103,8 +103,15 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels { /* if dest spectrumType is already present, then ask whether ovewrite it... */ SelectedActionCommand = CommandOverwriteExistingSmoothedSpectrumBySegments; /* bind the right command to the user-control */ raiseIsActionCommandBindingRequired(); /* init actionusercontrol viewmodel */ initActionQuestionViewModel(question: "SmoothingAskOverwriteExistingDestSpectrumType".GetText(), optionalQuestion: "OptionalActionDeleteOnCloudQuestion".GetText(), isOptionalActionChecked: false, isOptionalActionVisible: false); } else /* ...otherwise apply smoothing */ Loading Loading @@ -144,14 +151,16 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels private async Task overwriteExistingSmoothedSpectrumBySegmentsAsync() { if (WorkingItems.SpectraContainer.isAnySpectrumOfType(SpectrumType.AlignedSmoothedBySegments)) await WorkingItems.SpectraContainer.tryRemoveSpectrumOfTypeAsync(SpectrumType.AlignedSmoothedBySegments); /* hide action-question user control */ tryRemoveActionUserControl(); SpectrumType smoothedSpectrumType = getSrcSpectrumTypeForSmoothingToSpectrum(); /* retrieve spectrumType for smoothed spectrum */ SpectrumType destSpectrumType = SmoothingViewModel.getDestSpectrumType(SmoothingViewModel.SelectedSpectrumType); SpectrumType destSpectrumType = SmoothingViewModel.getDestSpectrumType(smoothedSpectrumType); /* hide dialog question */ //IsActionQuestionVisible = false; if (WorkingItems.SpectraContainer.isAnySpectrumOfType(SpectrumType.AlignedSmoothedBySegments)) await WorkingItems.SpectraContainer.tryRemoveSpectrumOfTypeAsync(SpectrumType.AlignedSmoothedBySegments); /* apply smoothing */ await applySmoothingBySegmentsPart2Async(destSpectrumType); Loading Loading @@ -236,17 +245,20 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels private async Task overwriteExistingSmoothedSpectrumAsync() { SpectrumType smoothedBySegmentsSpectrumType = getSrcSpectrumTypeForSmoothingToSpectrum(); /* hide action-question user control */ tryRemoveActionUserControl(); SpectrumType smoothedSpectrumType = getSrcSpectrumTypeForSmoothingToSpectrum(); /* retrieve spectrumType for smoothed spectrum */ SpectrumType destSpectrumType = SmoothingViewModel.getDestSpectrumType(smoothedBySegmentsSpectrumType); SpectrumType destSpectrumType = SmoothingViewModel.getDestSpectrumType(smoothedSpectrumType); /* remove spectrum to be overwritten */ if (WorkingItems.SpectraContainer.isAnySpectrumOfType(destSpectrumType)) await WorkingItems.SpectraContainer.tryRemoveSpectrumOfTypeAsync(destSpectrumType); /* apply smoothing */ await applySmoothingToSpectrumPart2Async(smoothedBySegmentsSpectrumType, destSpectrumType); await applySmoothingToSpectrumPart2Async(smoothedSpectrumType, destSpectrumType); } #endregion Loading