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

fixed handling of spectra color change by user

parent 054a35b7
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ using Microsoft.AppCenter.Crashes;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Toolkit.Mvvm.DependencyInjection;
using System;
using System.Collections.Generic;
using Windows.ApplicationModel.Activation;
using Windows.UI.Xaml;

@@ -29,6 +30,8 @@ namespace INAF.Apps.Uwp.SLabDataManager
    {
        private Lazy<ActivationService> _activationService;

        public static Dictionary<string, object> AppDictionary;

        private ActivationService ActivationService
        {
            get { return _activationService.Value; }
@@ -69,7 +72,7 @@ namespace INAF.Apps.Uwp.SLabDataManager

        private ActivationService CreateActivationService()
        {
#if DEBUG
#if DEBUG2
            return new ActivationService(this, typeof(Views.MainPage), new Lazy<UIElement>(CreateShell));
#else
            /* hide left navigation pane to avoid navigation to main page if user is not allowed */
@@ -94,6 +97,10 @@ namespace INAF.Apps.Uwp.SLabDataManager

        private void initServices()
        {
            /* create app dictionary shared across all app */
            AppDictionary = new Dictionary<string, object>();

            /* init logger */
            Logger logger = new Logger();
            logger.Init("Inaf.Apps.Uwp.SLabDataManager.log");

+3 −0
Original line number Diff line number Diff line
@@ -31,5 +31,8 @@
        public static readonly double X_AXIS_MAJOR_STEP_100 = 100;

        public static readonly string AUTHENTICATION_TOKEN = "authenticationtoken";

        public static readonly string CURRENT_PAGE = "currentpage";
        public static readonly string LAST_PAGE = "lastpage";
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
    <WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
    <PackageCertificateKeyFile>
    </PackageCertificateKeyFile>
    <PackageCertificateThumbprint>BDC6A1C268EA3DB14621D7F394F41FECE9E28E72</PackageCertificateThumbprint>
    <PackageCertificateThumbprint>722552882744F15508C43E22D2BCA8CA5D65112F</PackageCertificateThumbprint>
    <AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
@@ -383,8 +383,8 @@
  </ItemGroup>
  <ItemGroup>
    <None Include=".editorconfig" />
    <None Include="inaf-iaps.pfx" />
    <None Include="INAF.Apps.Uwp.SLabDataManager_TemporaryKey.pfx" />
    <None Include="inaf_inaps_test.pfx" />
  </ItemGroup>
  <ItemGroup>
    <ApplicationDefinition Include="App.xaml">
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ namespace INAF.Apps.Uwp.SLabDataManager.Models.Spectrum
    {
        public SpectrumColorModel(SpectrumType type, string displayName, string colorKey, SolidColorBrush color)
        {
            Type = type;
            DisplayName = displayName;
            ColorKey = colorKey;
            Color = color;
+7 −1
Original line number Diff line number Diff line
@@ -54,8 +54,14 @@ namespace INAF.Apps.Uwp.SLabDataManager.Models.Spectrum
            IsSavedOnCloud = await remoteOperationsManager.isSavedOnCloudAsync(requestModel);
        }

        public void setColor()
        public void setColor(SolidColorBrush color = null)
        {
            if (color != null)
            {
                Color = color;
                return;
            }

            string colorkey = Type.ToColorKey();
            if (settingsHelper.contains(colorkey))
                Color = settingsHelper.get(colorkey).ToSolidColorBrush();
Loading