forked from amkovkov/GranuSightSoftware2
51 lines
1.7 KiB
C#
51 lines
1.7 KiB
C#
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using CommunityToolkit.Mvvm.Input;
|
|
|
|
using GSS2.UI.Core.Services;
|
|
using GSS2.UI.Core.ViewModels;
|
|
using GSS2.ViewModels.Common;
|
|
using GSS2.ViewModels.AmineContent;
|
|
|
|
namespace GSS2.ViewModels;
|
|
|
|
public partial class AmineContentViewModel : ViewModelBase
|
|
{
|
|
private readonly NavigationService _navigationService;
|
|
|
|
[ObservableProperty] public partial StartViewModel Start { get; set; }
|
|
[ObservableProperty] public partial AnalysisViewModel Analysis { get; set; }
|
|
[ObservableProperty] public partial ResultsViewModel Results { get; set; }
|
|
[ObservableProperty] public partial SampleCalibrationViewModel SampleCalibration { get; set; }
|
|
[ObservableProperty] public partial SeparatorCalibrationViewModel SeparatorCalibration { get; set; }
|
|
[ObservableProperty] public partial SystemViewModel System { get; set; }
|
|
|
|
[ObservableProperty] public partial int CurrentIndex { get; set; }
|
|
|
|
public AmineContentViewModel(
|
|
NavigationService navigationService,
|
|
StartViewModel start,
|
|
AnalysisViewModel analysis,
|
|
ResultsViewModel results,
|
|
SampleCalibrationViewModel sampleCalibration,
|
|
SeparatorCalibrationViewModel separatorCalibration,
|
|
SystemViewModel system
|
|
)
|
|
{
|
|
_navigationService = navigationService;
|
|
Start = start;
|
|
Analysis = analysis;
|
|
Results = results;
|
|
SampleCalibration = sampleCalibration;
|
|
SeparatorCalibration = separatorCalibration;
|
|
System = system;
|
|
}
|
|
|
|
[RelayCommand]
|
|
void ChangeSection(string sectionNumberStr)
|
|
{
|
|
if (!int.TryParse(sectionNumberStr, out var sectionNumber))
|
|
return;
|
|
CurrentIndex = sectionNumber;
|
|
}
|
|
}
|