Files
GSS2Rework/GSS2/ViewModels/AmineContentViewModel.cs
T
amkovkov 3cc4d21947 feat: massive rework
1) GSS2.Core:
- strip prefixes in GSS2.Core.Analysis.AmineContent namespace class names
- add IEnumerable<double>.Variance extension
- remake analysis + update database so not needed to store all every file, calibration data also stored in database, also currently capturing images stored in system temporary directory and rewriting every time
2) GSS.UI.Core: AsyncImageRecordViewModel make zoom and pans public
3) GSS:
- remove image-storage-clear command
- remove ResultsView and ResultsViewModel, results presented in analysis
- rework calibration views
- add analysis views
- add text and number fields editors view
- add confirmation view on danger buttons
2026-05-13 12:56:32 +03:00

50 lines
1.7 KiB
C#

using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using GSS2.UI.Core.Services;
using GSS2.ViewModels.Common;
using GSS2.ViewModels.AmineContent;
using ViewModelBase = GSS2.UI.Core.ViewModels.ViewModelBase;
namespace GSS2.ViewModels;
public partial class AmineContentViewModel : ViewModelBase
{
private readonly NavigationService _navigationService;
[ObservableProperty] public partial AnalysisViewModel Analysis { get; set; }
[ObservableProperty] public partial SampleCalibrationViewModel SampleCalibration { get; set; }
[ObservableProperty] public partial SeparatorCalibrationViewModel SeparatorCalibration { get; set; }
[ObservableProperty] public partial CameraViewModel Camera { get; set; }
[ObservableProperty] public partial SystemViewModel System { get; set; }
[ObservableProperty] public partial int CurrentIndex { get; set; }
[ObservableProperty] public partial bool IsScrolling { get; set; }
public AmineContentViewModel(
NavigationService navigationService,
AnalysisViewModel analysis,
SampleCalibrationViewModel sampleCalibration,
SeparatorCalibrationViewModel separatorCalibration,
CameraViewModel camera,
SystemViewModel system
)
{
_navigationService = navigationService;
Analysis = analysis;
SampleCalibration = sampleCalibration;
SeparatorCalibration = separatorCalibration;
Camera = camera;
System = system;
}
[RelayCommand]
void ChangeSection(string sectionNumberStr)
{
if (!int.TryParse(sectionNumberStr, out var sectionNumber))
return;
CurrentIndex = sectionNumber;
}
}