Commit a9dac9ca authored by Francesco Carraro's avatar Francesco Carraro
Browse files

adding multiple selection spectrum processing....

parent c514e297
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ using INAF.Apps.Uwp.SLabDataManager.Models.Containers;
using INAF.Apps.Uwp.SLabDataManager.Services;
using INAF.Apps.Uwp.SLabDataManager.ViewModels;
using INAF.Apps.Uwp.SLabDataManager.ViewModels.ContentDialogsViewModel;
using INAF.Apps.Uwp.SLabDataManager.ViewModels.Other;
using INAF.Apps.Uwp.SLabDataManager.ViewModels.UserControlViewModels;
using INAF.Libraries.NetStandard.Math.Fit.Linear;
using INAF.Libraries.NetStandard.Math.Fit.Spline;
@@ -76,7 +77,6 @@ namespace INAF.Apps.Uwp.SLabDataManager
            await ActivationService.ActivateAsync(args);
        }
       
       
        private void OnAppUnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e)
        {
            // TODO WTS: Please log and handle the exception as appropriate to your scenario
@@ -147,6 +147,7 @@ namespace INAF.Apps.Uwp.SLabDataManager
                /* scoped */
                .AddScoped<ActionQuestionViewModel>()
                .AddScoped<LegendItemsHelper>()
                .AddScoped<MultipleSelectionViewModel>()
                .AddScoped<ProcessedSpectraContainer>()
                .AddScoped<StorageItemsHelper>()
                /* transient */
+7 −0
Original line number Diff line number Diff line
@@ -53,5 +53,12 @@ namespace INAF.Apps.Uwp.SLabDataManager.Constants
            SingleItem,
            MultipleItems
        }

        public enum RecentItemsReadingType
        {
            None = 0,
            Single,
            All,
        }
    }
}
+24 −0
Original line number Diff line number Diff line
@@ -245,6 +245,30 @@ namespace INAF.Apps.Uwp.SLabDataManager.Converters
        }
    }

    public sealed class SelectedFilesNumVisibilityConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            try
            {
                int selectedFilesNum = (int)value;
                if (selectedFilesNum > 0)
                    return Visibility.Visible;
                else
                    return Visibility.Collapsed;
            }
            catch (Exception)
            {
                return Visibility.Collapsed;
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, string language)
        {
            throw new NotImplementedException();
        }
    }

    public sealed class ShortFilepathConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, string language)
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders
            this.logger = logger;
        }

        public Task<(IChartSpectrumModel spectrum, string exMsg)> readFileAsync(string fileKey)
        public virtual Task<(IChartSpectrumModel spectrum, string exMsg)> readFileAsync(string fileKey)
        {
            throw new NotImplementedException();
        }
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.FileReaders
            this.xmlHelper = xmlHelper;
        }

        public async Task<(IChartSpectrumModel spectrum, string exMsg)> readFileAsync(string fileKey)
        public new async Task<(IChartSpectrumModel spectrum, string exMsg)> readFileAsync(string fileKey)
        {
            IChartSpectrumModel chartSpectrumModel = null;
            string exMsg = string.Empty;
Loading