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

adding link to webapp...

parent ae5f41d7
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
@@ -23,6 +23,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "INAF.Libraries.Uwp.TelerikC
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "INAF.Libraries.Uwp.Xml", "..\..\Libraries\Uwp\INAF.Libraries.Uwp.Xml\INAF.Libraries.Uwp.Xml\INAF.Libraries.Uwp.Xml.csproj", "{D9886C08-77CA-49A7-B55C-37613771079B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "INAF.Libraries.Uwp.RemoteAuthentication", "..\..\Libraries\Uwp\INAF.Libraries.Uwp.RemoteAuthentication\INAF.Libraries.Uwp.RemoteAuthentication\INAF.Libraries.Uwp.RemoteAuthentication.csproj", "{3931DDE2-4511-4458-B7D7-9E4A723D44B3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "INAF.Libraries.NetStandard.SLabCommonModels", "..\..\Libraries\NetStandard\INAF.Libraries.NetStandard.SLabCommonModels\INAF.Libraries.NetStandard.SLabCommonModels\INAF.Libraries.NetStandard.SLabCommonModels.csproj", "{E02E4913-486E-4EFA-9057-B8936ADB2AD0}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
@@ -243,6 +247,46 @@ Global
		{D9886C08-77CA-49A7-B55C-37613771079B}.Release|x64.Build.0 = Release|x64
		{D9886C08-77CA-49A7-B55C-37613771079B}.Release|x86.ActiveCfg = Release|x86
		{D9886C08-77CA-49A7-B55C-37613771079B}.Release|x86.Build.0 = Release|x86
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Debug|ARM.ActiveCfg = Debug|ARM
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Debug|ARM.Build.0 = Debug|ARM
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Debug|ARM64.ActiveCfg = Debug|ARM64
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Debug|ARM64.Build.0 = Debug|ARM64
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Debug|x64.ActiveCfg = Debug|x64
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Debug|x64.Build.0 = Debug|x64
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Debug|x86.ActiveCfg = Debug|x86
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Debug|x86.Build.0 = Debug|x86
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Release|Any CPU.Build.0 = Release|Any CPU
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Release|ARM.ActiveCfg = Release|ARM
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Release|ARM.Build.0 = Release|ARM
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Release|ARM64.ActiveCfg = Release|ARM64
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Release|ARM64.Build.0 = Release|ARM64
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Release|x64.ActiveCfg = Release|x64
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Release|x64.Build.0 = Release|x64
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Release|x86.ActiveCfg = Release|x86
		{3931DDE2-4511-4458-B7D7-9E4A723D44B3}.Release|x86.Build.0 = Release|x86
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Debug|ARM.ActiveCfg = Debug|Any CPU
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Debug|ARM.Build.0 = Debug|Any CPU
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Debug|ARM64.ActiveCfg = Debug|Any CPU
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Debug|ARM64.Build.0 = Debug|Any CPU
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Debug|x64.ActiveCfg = Debug|Any CPU
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Debug|x64.Build.0 = Debug|Any CPU
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Debug|x86.ActiveCfg = Debug|Any CPU
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Debug|x86.Build.0 = Debug|Any CPU
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Release|Any CPU.Build.0 = Release|Any CPU
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Release|ARM.ActiveCfg = Release|Any CPU
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Release|ARM.Build.0 = Release|Any CPU
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Release|ARM64.ActiveCfg = Release|Any CPU
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Release|ARM64.Build.0 = Release|Any CPU
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Release|x64.ActiveCfg = Release|Any CPU
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Release|x64.Build.0 = Release|Any CPU
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Release|x86.ActiveCfg = Release|Any CPU
		{E02E4913-486E-4EFA-9057-B8936ADB2AD0}.Release|x86.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
+16 −1
Original line number Diff line number Diff line
@@ -2,10 +2,12 @@
using INAF.Apps.Uwp.SLabDataManager.Charts;
using INAF.Apps.Uwp.SLabDataManager.Helpers;
using INAF.Apps.Uwp.SLabDataManager.Helpers.ConfigHelpers;
using INAF.Apps.Uwp.SLabDataManager.Helpers.RemoteOperations;
using INAF.Apps.Uwp.SLabDataManager.Models;
using INAF.Apps.Uwp.SLabDataManager.Services;
using INAF.Apps.Uwp.SLabDataManager.ViewModels;
using INAF.Libraries.Uwp.Logging;
using INAF.Libraries.Uwp.RemoteAuthentication;
using INAF.Libraries.Uwp.Settings;
using INAF.Libraries.Uwp.Settings.RecentFiles;
using INAF.Libraries.Uwp.StorageItemsAccess;
@@ -65,9 +67,17 @@ namespace INAF.Apps.Uwp.SLabDataManager

        private ActivationService CreateActivationService()
        {
            var settingsHelper = Ioc.Default.GetService<SettingsHelper>();
            if (settingsHelper.contains(Constants.Constants.AUTHENTICATION_TOKEN))
            {
                AuthenticationManager authenticationManager = Ioc.Default.GetService<AuthenticationManager>();
                if (!authenticationManager.isAuthenticationExpired(Constants.Constants.AUTHENTICATION_TOKEN))
                    return new ActivationService(this, typeof(Views.MainPage), new Lazy<UIElement>(CreateShell));
            }

            return new ActivationService(this, typeof(Views.LoginPage), new Lazy<UIElement>(CreateShell));
        }

        private UIElement CreateShell()
        {
            return new Views.ShellPage();
@@ -86,6 +96,7 @@ namespace INAF.Apps.Uwp.SLabDataManager
                .AddSingleton<SpectrumChartOptionsModel>()
                .AddSingleton<Logger>(logger)
                .AddSingleton<RecentFilesHelper>()
                .AddSingleton<RemoteOperationsRepository>()
                .AddSingleton<SettingsHelper>()
                .AddSingleton<SpectraContainer>()
                .AddSingleton<StorageItemsSettingsHelper>()
@@ -94,11 +105,15 @@ namespace INAF.Apps.Uwp.SLabDataManager
                .AddSingleton<WorkingFoldersContainer>()
                .AddSingleton<WorkingItemsModel>()
                /* transient */
                .AddTransient<AuthenticationManager>()
                .AddTransient<ConfigReader>()
                .AddTransient<RemoteOperationsManager>()
                .AddTransient<RemoteOperationsXmlReader>()
                .AddTransient<SpectrumReader>()
                .AddTransient<XmlHelper>()
                /* view models */
                .AddTransient<ChartViewModel>()
                .AddTransient<LoginViewModel>()
                .AddSingleton<MainViewModel>()
                .AddSingleton<SettingsViewModel>()
                .AddSingleton<ShellViewModel>()
+8 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8" ?>
<remoteOperationsData>
	<baseUrl>http://localhost:81</baseUrl>
	<operationUrls>
		<operation type="Authentication">Account/LoginForJwt</operation>
		<operation type="SaveAlignedFile">AppActions/SaveAlignedSpectrum</operation>
	</operationUrls>
</remoteOperationsData>
 No newline at end of file
+13 −9
Original line number Diff line number Diff line
using INAF.Libraries.NetStandard.ScienceModels.Spectra;
using INAF.Apps.Uwp.SLabDataManager.Extensions;
using INAF.Apps.Uwp.SLabDataManager.Models;
using INAF.Libraries.NetStandard.ScienceModels.Extensions;
using INAF.Libraries.NetStandard.ScienceModels.Spectra;
using INAF.Libraries.Uwp.Logging;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Toolkit.Mvvm.ComponentModel;
using System;
using System.Collections.Generic;
@@ -6,11 +11,7 @@ using System.Collections.ObjectModel;
using System.Linq;
using System.Threading.Tasks;
using static INAF.Libraries.NetStandard.ScienceModels.Enums.Enums;
using INAF.Libraries.NetStandard.ScienceModels.Extensions;
using Microsoft.Extensions.DependencyInjection;
using INAF.Apps.Uwp.SLabDataManager.Extensions;
using INAF.Libraries.Uwp.Logging;
using INAF.Apps.Uwp.SLabDataManager.Models;
using static INAF.Libraries.NetStandard.SLabCommonModels.Enums.Enums;

namespace INAF.Apps.Uwp.SLabDataManager.Charts
{
@@ -184,10 +185,13 @@ namespace INAF.Apps.Uwp.SLabDataManager.Charts
            if (Spectra.Any(x => x.Type == spectrum.Type))
            {
                /* if a spectrum of same type is already present, then replace it... */
                int index = Spectra.IndexOf(spectrum);
                int index = Spectra.ToList().FindIndex(x => x.Type == spectrum.Type);
                if (index >= 0)
                {
                    Spectra[index] = spectrum;
                    await updateBoundariesAsync();
                }
            }
            else
            {
                /* ...otherwise, add it... */
+2 −0
Original line number Diff line number Diff line
@@ -33,5 +33,7 @@

        public static readonly double X_AXIS_MAJOR_STEP_0DOT1 = 0.1;
        public static readonly double X_AXIS_MAJOR_STEP_100 = 100;

        public static readonly string AUTHENTICATION_TOKEN = "authenticationtoken";
    }
}
Loading