Commit 6af7a2c3 authored by Francesco Carraro's avatar Francesco Carraro
Browse files

added SLabCommonHelpers project to host helpers for spectra processing

parent 4298831b
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -25,6 +25,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "INAF.Libraries.NetStandard.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "INAF.Libraries.NetStandard.Math", "..\..\Libraries\NetStandard\INAF.Libraries.NetStandard.Math\INAF.Libraries.NetStandard.Math\INAF.Libraries.NetStandard.Math.csproj", "{B3B6C5D4-35FF-46D2-A56C-829E10569601}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "INAF.Libraries.NetStandard.SLabCommonHelpers", "..\..\Libraries\NetStandard\INAF.Libraries.NetStandard.SLabCommonHelpers\INAF.Libraries.NetStandard.SLabCommonHelpers\INAF.Libraries.NetStandard.SLabCommonHelpers.csproj", "{9483EB56-F7C9-44B4-BB49-9400E8D9953B}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
@@ -265,6 +267,26 @@ Global
		{B3B6C5D4-35FF-46D2-A56C-829E10569601}.Release|x64.Build.0 = Release|Any CPU
		{B3B6C5D4-35FF-46D2-A56C-829E10569601}.Release|x86.ActiveCfg = Release|Any CPU
		{B3B6C5D4-35FF-46D2-A56C-829E10569601}.Release|x86.Build.0 = Release|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Debug|ARM.ActiveCfg = Debug|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Debug|ARM.Build.0 = Debug|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Debug|ARM64.ActiveCfg = Debug|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Debug|ARM64.Build.0 = Debug|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Debug|x64.ActiveCfg = Debug|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Debug|x64.Build.0 = Debug|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Debug|x86.ActiveCfg = Debug|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Debug|x86.Build.0 = Debug|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Release|Any CPU.Build.0 = Release|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Release|ARM.ActiveCfg = Release|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Release|ARM.Build.0 = Release|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Release|ARM64.ActiveCfg = Release|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Release|ARM64.Build.0 = Release|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Release|x64.ActiveCfg = Release|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Release|x64.Build.0 = Release|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Release|x86.ActiveCfg = Release|Any CPU
		{9483EB56-F7C9-44B4-BB49-9400E8D9953B}.Release|x86.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
+3 −2
Original line number Diff line number Diff line
@@ -17,10 +17,10 @@ using INAF.Apps.Uwp.SLabDataManager.ViewModels.UserControlViewModels;
using INAF.Libraries.NetStandard.Math.Alignment;
using INAF.Libraries.NetStandard.Math.Fit.Linear;
using INAF.Libraries.NetStandard.Math.Fit.Spline;
using INAF.Libraries.NetStandard.Math.Helpers;
using INAF.Libraries.NetStandard.Math.Models;
using INAF.Libraries.NetStandard.Math.Helpers.ProcessingHelpers;
using INAF.Libraries.NetStandard.Math.Smoothing;
using INAF.Libraries.NetStandard.SLabCommonHelpers;
using INAF.Libraries.NetStandard.SLabCommonHelpers.ProcessingHelpers;
using INAF.Libraries.Uwp.Logging;
using INAF.Libraries.Uwp.Settings;
using INAF.Libraries.Uwp.Settings.RecentStorageItems;
@@ -165,6 +165,7 @@ namespace INAF.Apps.Uwp.SLabDataManager
                .AddTransient<RemoteOperationsManager>()
                .AddTransient<RemoteOperationsXmlReader>()
                .AddTransient<SavitzkyGolayHelper>()
                .AddTransient<SmoothingHelper>()
                .AddTransient<SpectraFactory>()
                .AddTransient<SplineFitHelper>()
                .AddTransient<SplineProcessingHelper>()
+3 −1
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
using INAF.Apps.Uwp.SLabDataManager.Models.Chart;
using INAF.Apps.Uwp.SLabDataManager.Models.Containers;
using INAF.Apps.Uwp.SLabDataManager.ViewModels.UserControlViewModels;
using INAF.Libraries.NetStandard.SLabCommonHelpers;
using INAF.Libraries.NetStandard.SLabCommonModels.Extensions;
using System;
using System.Collections.Generic;
@@ -159,7 +160,8 @@ namespace INAF.Apps.Uwp.SLabDataManager.Converters

                var spectraContainer = Ioc.Default.GetService<SpectraContainer>();

                var destSpectrumType = smoothingViewModel.getDestSpectrumType(smoothingType, smoothingViewModel.SelectedSpectrumType);
                var smoothingHelper = Ioc.Default.GetRequiredService<SmoothingHelper>();
                var destSpectrumType = smoothingHelper.getDestSpectrumType(smoothingType, smoothingViewModel.SelectedSpectrumType);

                return spectraContainer.isAnySpectrumOfType(destSpectrumType);
            }
+3 −1
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ using INAF.Apps.Uwp.SLabDataManager.Models;
using INAF.Apps.Uwp.SLabDataManager.Models.Chart;
using INAF.Apps.Uwp.SLabDataManager.Models.Containers;
using INAF.Apps.Uwp.SLabDataManager.ViewModels.UserControlViewModels;
using INAF.Libraries.NetStandard.SLabCommonHelpers;
using INAF.Libraries.NetStandard.SLabCommonModels.Extensions;
using INAF.Libraries.NetStandard.SLabCommonModels.Models.SampleData;
using System;
@@ -164,8 +165,9 @@ namespace INAF.Apps.Uwp.SLabDataManager.Helpers.UI
        /* bool isUserControlShown is used only to re-run this method when its values changes */
        public static Visibility GetSpectrumTypeSmoothingTypeSavedOnCloudVisibility(bool isUserControlShown, SpectrumType selectedSpectrumType, string smoothingType)
        {
            var smoothingHelper = Ioc.Default.GetRequiredService<SmoothingHelper>();
            var smoothingViewModel = Ioc.Default.GetRequiredService<SmoothingViewModel>();
            SpectrumType destSpectrumType = smoothingViewModel.getDestSpectrumType(smoothingType.ToSmoothingType(), selectedSpectrumType);
            SpectrumType destSpectrumType = smoothingHelper.getDestSpectrumType(smoothingType.ToSmoothingType(), selectedSpectrumType);
            if (smoothingViewModel.IsSpectrumTypeSavedOnCloud(destSpectrumType, smoothingType.ToSmoothingType()))
                return Visibility.Visible;
            else
+4 −0
Original line number Diff line number Diff line
@@ -619,6 +619,10 @@
      <Project>{e45f24b3-c15d-45a9-8f46-1a6281e2e457}</Project>
      <Name>INAF.Libraries.NetStandard.ScienceModels</Name>
    </ProjectReference>
    <ProjectReference Include="..\..\..\Libraries\NetStandard\INAF.Libraries.NetStandard.SLabCommonHelpers\INAF.Libraries.NetStandard.SLabCommonHelpers\INAF.Libraries.NetStandard.SLabCommonHelpers.csproj">
      <Project>{9483eb56-f7c9-44b4-bb49-9400e8d9953b}</Project>
      <Name>INAF.Libraries.NetStandard.SLabCommonHelpers</Name>
    </ProjectReference>
    <ProjectReference Include="..\..\..\Libraries\NetStandard\INAF.Libraries.NetStandard.SLabCommonModels\INAF.Libraries.NetStandard.SLabCommonModels\INAF.Libraries.NetStandard.SLabCommonModels.csproj">
      <Project>{e02e4913-486e-4efa-9057-b8936adb2ad0}</Project>
      <Name>INAF.Libraries.NetStandard.SLabCommonModels</Name>
Loading