Loading INAF.Apps.Uwp.SLabDataManager/Charts/SpectraContainer.cs +9 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,8 @@ namespace INAF.Apps.Uwp.SLabDataManager.Charts Spectra = new ObservableCollection<SpectrumModel>(); Summaries = new ObservableCollection<SpectrumSummaryModel>(); IsAnySpectrumLoaded = false; IsSpectrumAligned = false; XAxisMajorStepValues = new List<double>(2); Loading @@ -54,6 +56,13 @@ namespace INAF.Apps.Uwp.SLabDataManager.Charts set { SetProperty(ref isAnySummaryUpdated, value); } } private bool isAnySpectrumLoaded; public bool IsAnySpectrumLoaded { get { return isAnySpectrumLoaded; } set { SetProperty(ref isAnySpectrumLoaded, value); } } public bool IsSpectrumAligned { get; set; } public SelectedRefBand SelectedRefBand { get; private set; } Loading INAF.Apps.Uwp.SLabDataManager/ViewModels/ChartViewModel.cs +1 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels /* add listener for being warned of work in progress in WorkingItems */ WorkingItems.PropertyChanged += WorkingItems_PropertyChanged; /* if user pinned flyout during the last app session, then pin the flyout */ if (WorkingItems.AlignmentConfig.isPinnedPending) { WorkingItems.AlignmentConfig.IsPinRequested = true; Loading INAF.Apps.Uwp.SLabDataManager/ViewModels/MainViewModel.cs +3 −0 Original line number Diff line number Diff line Loading @@ -211,6 +211,9 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels default: break; } /* enable navigation to chart page */ WorkingItems.SpectraContainer.IsAnySpectrumLoaded = true; } private new async Task selectFileAsync(SpectrumType spectrumType, List<FileExt> fileExts) Loading INAF.Apps.Uwp.SLabDataManager/ViewModels/ShellViewModel.cs +17 −2 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows.Input; using INAF.Apps.Uwp.SLabDataManager.Charts; using INAF.Apps.Uwp.SLabDataManager.Helpers; using INAF.Apps.Uwp.SLabDataManager.Services; using INAF.Apps.Uwp.SLabDataManager.Views; Loading @@ -25,19 +25,34 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels private readonly KeyboardAccelerator _altLeftKeyboardAccelerator = BuildKeyboardAccelerator(VirtualKey.Left, VirtualKeyModifiers.Menu); private readonly KeyboardAccelerator _backKeyboardAccelerator = BuildKeyboardAccelerator(VirtualKey.GoBack); private bool _isBackEnabled; private bool _isBackEnabled, _isNavigationToChartEnabled; private IList<KeyboardAccelerator> _keyboardAccelerators; private WinUI.NavigationView _navigationView; private WinUI.NavigationViewItem _selected; private ICommand _loadedCommand; private ICommand _itemInvokedCommand; public ShellViewModel(SpectraContainer spectraContainer) { spectraContainer.PropertyChanged += (s, e) => { if (e.PropertyName.Equals(nameof(SpectraContainer.IsAnySpectrumLoaded)) && spectraContainer.IsAnySpectrumLoaded) IsNavigationToChartEnabled = true; }; } public bool IsBackEnabled { get { return _isBackEnabled; } set { SetProperty(ref _isBackEnabled, value); } } public bool IsNavigationToChartEnabled { get { return _isNavigationToChartEnabled; } set { SetProperty(ref _isNavigationToChartEnabled, value); } } public WinUI.NavigationViewItem Selected { get { return _selected; } Loading INAF.Apps.Uwp.SLabDataManager/Views/ShellPage.xaml +3 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,8 @@ <winui:NavigationView x:Name="navigationView" IsBackButtonVisible="Visible" IsBackEnabled="{x:Bind ViewModel.IsBackEnabled, Mode=OneWay}" SelectedItem="{x:Bind ViewModel.Selected, Mode=OneWay}" IsSettingsVisible="True" PaneDisplayMode="LeftCompact" Background="{ThemeResource SystemControlBackgroundAltHighBrush}"> Loading @@ -38,6 +40,7 @@ </winui:NavigationViewItem.Icon> </winui:NavigationViewItem> <winui:NavigationViewItem x:Uid="Shell_Chart" IsEnabled="{x:Bind ViewModel.IsNavigationToChartEnabled, Mode=OneWay}" helpers:NavHelper.NavigateTo="views:ChartPage" > <winui:NavigationViewItem.Icon> <FontIcon FontFamily="Segoe MDL2 Assets" Glyph=""/> Loading Loading
INAF.Apps.Uwp.SLabDataManager/Charts/SpectraContainer.cs +9 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,8 @@ namespace INAF.Apps.Uwp.SLabDataManager.Charts Spectra = new ObservableCollection<SpectrumModel>(); Summaries = new ObservableCollection<SpectrumSummaryModel>(); IsAnySpectrumLoaded = false; IsSpectrumAligned = false; XAxisMajorStepValues = new List<double>(2); Loading @@ -54,6 +56,13 @@ namespace INAF.Apps.Uwp.SLabDataManager.Charts set { SetProperty(ref isAnySummaryUpdated, value); } } private bool isAnySpectrumLoaded; public bool IsAnySpectrumLoaded { get { return isAnySpectrumLoaded; } set { SetProperty(ref isAnySpectrumLoaded, value); } } public bool IsSpectrumAligned { get; set; } public SelectedRefBand SelectedRefBand { get; private set; } Loading
INAF.Apps.Uwp.SLabDataManager/ViewModels/ChartViewModel.cs +1 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels /* add listener for being warned of work in progress in WorkingItems */ WorkingItems.PropertyChanged += WorkingItems_PropertyChanged; /* if user pinned flyout during the last app session, then pin the flyout */ if (WorkingItems.AlignmentConfig.isPinnedPending) { WorkingItems.AlignmentConfig.IsPinRequested = true; Loading
INAF.Apps.Uwp.SLabDataManager/ViewModels/MainViewModel.cs +3 −0 Original line number Diff line number Diff line Loading @@ -211,6 +211,9 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels default: break; } /* enable navigation to chart page */ WorkingItems.SpectraContainer.IsAnySpectrumLoaded = true; } private new async Task selectFileAsync(SpectrumType spectrumType, List<FileExt> fileExts) Loading
INAF.Apps.Uwp.SLabDataManager/ViewModels/ShellViewModel.cs +17 −2 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows.Input; using INAF.Apps.Uwp.SLabDataManager.Charts; using INAF.Apps.Uwp.SLabDataManager.Helpers; using INAF.Apps.Uwp.SLabDataManager.Services; using INAF.Apps.Uwp.SLabDataManager.Views; Loading @@ -25,19 +25,34 @@ namespace INAF.Apps.Uwp.SLabDataManager.ViewModels private readonly KeyboardAccelerator _altLeftKeyboardAccelerator = BuildKeyboardAccelerator(VirtualKey.Left, VirtualKeyModifiers.Menu); private readonly KeyboardAccelerator _backKeyboardAccelerator = BuildKeyboardAccelerator(VirtualKey.GoBack); private bool _isBackEnabled; private bool _isBackEnabled, _isNavigationToChartEnabled; private IList<KeyboardAccelerator> _keyboardAccelerators; private WinUI.NavigationView _navigationView; private WinUI.NavigationViewItem _selected; private ICommand _loadedCommand; private ICommand _itemInvokedCommand; public ShellViewModel(SpectraContainer spectraContainer) { spectraContainer.PropertyChanged += (s, e) => { if (e.PropertyName.Equals(nameof(SpectraContainer.IsAnySpectrumLoaded)) && spectraContainer.IsAnySpectrumLoaded) IsNavigationToChartEnabled = true; }; } public bool IsBackEnabled { get { return _isBackEnabled; } set { SetProperty(ref _isBackEnabled, value); } } public bool IsNavigationToChartEnabled { get { return _isNavigationToChartEnabled; } set { SetProperty(ref _isNavigationToChartEnabled, value); } } public WinUI.NavigationViewItem Selected { get { return _selected; } Loading
INAF.Apps.Uwp.SLabDataManager/Views/ShellPage.xaml +3 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,8 @@ <winui:NavigationView x:Name="navigationView" IsBackButtonVisible="Visible" IsBackEnabled="{x:Bind ViewModel.IsBackEnabled, Mode=OneWay}" SelectedItem="{x:Bind ViewModel.Selected, Mode=OneWay}" IsSettingsVisible="True" PaneDisplayMode="LeftCompact" Background="{ThemeResource SystemControlBackgroundAltHighBrush}"> Loading @@ -38,6 +40,7 @@ </winui:NavigationViewItem.Icon> </winui:NavigationViewItem> <winui:NavigationViewItem x:Uid="Shell_Chart" IsEnabled="{x:Bind ViewModel.IsNavigationToChartEnabled, Mode=OneWay}" helpers:NavHelper.NavigateTo="views:ChartPage" > <winui:NavigationViewItem.Icon> <FontIcon FontFamily="Segoe MDL2 Assets" Glyph=""/> Loading