forked from amkovkov/GranuSightSoftware2
fix: SectionPanel scrolling
This commit is contained in:
@@ -33,7 +33,9 @@ public partial class AmineContentSeparatorCalibrationViewModel : ViewModelBase
|
||||
[ObservableProperty] private bool _isNewRecord = false;
|
||||
|
||||
[ObservableProperty] private int _mainSectionsCurrentIndex = 0;
|
||||
[ObservableProperty] private string _switchMainSectionButtonText = "К изображениям";
|
||||
[ObservableProperty] private bool _mainSectionCanScrollBackward = false;
|
||||
[ObservableProperty] private bool _mainSectionCanScrollForward = true;
|
||||
[ObservableProperty] private bool _mainSectionIsScrolling = true;
|
||||
|
||||
[ObservableProperty] private Task? _captureImagesTask = null;
|
||||
|
||||
@@ -43,6 +45,7 @@ public partial class AmineContentSeparatorCalibrationViewModel : ViewModelBase
|
||||
[ObservableProperty] private int _imagesSectionCurrentIndex = 0;
|
||||
[ObservableProperty] private bool _imagesSectionCanScrollForward = false;
|
||||
[ObservableProperty] private bool _imagesSectionCanScrollBackward = false;
|
||||
[ObservableProperty] private bool _imagesSectionIsScrolling = true;
|
||||
|
||||
public AmineContentSeparatorCalibrationViewModel(ILogger<AmineContentSeparatorCalibrationViewModel> logger, AmineContentCalibrationContext context, IlluminatorService illuminatorService, CameraService cameraService, ImageStorageService imageStorageService)
|
||||
{
|
||||
@@ -121,7 +124,7 @@ public partial class AmineContentSeparatorCalibrationViewModel : ViewModelBase
|
||||
var deletedIsNewRecord = IsNewRecord;
|
||||
IsNewRecord = true;
|
||||
CreateRecord();
|
||||
|
||||
|
||||
if (!deletedIsNewRecord)
|
||||
{
|
||||
Records.Remove(deletedRecord);
|
||||
@@ -155,14 +158,7 @@ public partial class AmineContentSeparatorCalibrationViewModel : ViewModelBase
|
||||
IsNewRecord = false;
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void SwitchMainSection()
|
||||
{
|
||||
MainSectionsCurrentIndex = MainSectionsCurrentIndex == 0 ? 1 : 0;
|
||||
SwitchMainSectionButtonText = MainSectionsCurrentIndex == 0 ?
|
||||
"К изображениям" :
|
||||
"К информации";
|
||||
}
|
||||
[RelayCommand] private void SwitchMainSection() => MainSectionsCurrentIndex = MainSectionsCurrentIndex == 0 ? 1 : 0;
|
||||
|
||||
[RelayCommand]
|
||||
private void CaptureImage()
|
||||
|
||||
Reference in New Issue
Block a user