forked from amkovkov/GranuSightSoftware2
feat: AmineContent View and ViewModel base
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
using GSS2.UI.Core.ViewModels;
|
||||
|
||||
namespace GSS2.ViewModels.AmineContent;
|
||||
|
||||
public partial class AnalysisViewModel : ViewModelBase
|
||||
{
|
||||
public AnalysisViewModel()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using GSS2.UI.Core.ViewModels;
|
||||
|
||||
namespace GSS2.ViewModels.AmineContent;
|
||||
|
||||
public partial class ResultsViewModel : ViewModelBase
|
||||
{
|
||||
public ResultsViewModel()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using GSS2.UI.Core.ViewModels;
|
||||
|
||||
namespace GSS2.ViewModels.AmineContent;
|
||||
|
||||
public partial class SampleCalibrationViewModel : ViewModelBase
|
||||
{
|
||||
public SampleCalibrationViewModel()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using GSS2.UI.Core.ViewModels;
|
||||
|
||||
namespace GSS2.ViewModels.AmineContent;
|
||||
|
||||
public partial class SeparatorCalibrationViewModel : ViewModelBase
|
||||
{
|
||||
public SeparatorCalibrationViewModel()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using GSS2.UI.Core.ViewModels;
|
||||
|
||||
namespace GSS2.ViewModels.AmineContent;
|
||||
|
||||
public partial class StartViewModel : ViewModelBase
|
||||
{
|
||||
public StartViewModel()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using GSS2.UI.Core.ViewModels;
|
||||
|
||||
namespace GSS2.ViewModels.Common;
|
||||
|
||||
public partial class SystemViewModel : ViewModelBase
|
||||
{
|
||||
public SystemViewModel()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user