forked from amkovkov/GranuSightSoftware2
feat: SeparatorCalibration View and ViewModel
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Media.Imaging;
|
||||
using Avalonia.Threading;
|
||||
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
using GSS2.Core.Analysis.AmineContent.Database.Calibration;
|
||||
|
||||
namespace GSS2.UI.Core.ViewModels;
|
||||
@@ -14,14 +14,14 @@ public partial class AsyncImageRecordViewModel : ViewModelBase
|
||||
|
||||
private readonly string _path;
|
||||
|
||||
[ObservableProperty] private ImageRecord _imageRecord;
|
||||
[ObservableProperty] private IImage? _image;
|
||||
[ObservableProperty] private bool _isLoading = true;
|
||||
[ObservableProperty] public partial ImageRecord ImageRecord { get; set; }
|
||||
[ObservableProperty] public partial IImage? Image { get; set; }
|
||||
[ObservableProperty] public partial bool IsLoading { get; set; } = true;
|
||||
|
||||
public AsyncImageRecordViewModel(string path, ImageRecord imageRecord)
|
||||
{
|
||||
_path = path;
|
||||
_imageRecord = imageRecord;
|
||||
ImageRecord = imageRecord;
|
||||
_ = LoadAsync();
|
||||
}
|
||||
|
||||
@@ -48,4 +48,4 @@ public partial class AsyncImageRecordViewModel : ViewModelBase
|
||||
_semaphore.Release();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace GSS2.UI.Core.ViewModels;
|
||||
public partial class CameraViewModel : ViewModelBase, IDisposable
|
||||
{
|
||||
private bool _disposedValue;
|
||||
|
||||
|
||||
private readonly ILogger<CameraViewModel> _logger;
|
||||
private readonly CameraService _cameraService;
|
||||
private readonly System.Timers.Timer _renderTimer;
|
||||
@@ -71,4 +71,4 @@ public partial class CameraViewModel : ViewModelBase, IDisposable
|
||||
Dispose(disposing: true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
Orientation="Horizontal"
|
||||
Spacing="20">
|
||||
|
||||
<Slider Classes="horizontal" Value="{Binding WhiteIntensity}" />
|
||||
<Slider Classes="horizontal" Value="{Binding WhiteIntensity}" Maximum="0.03" />
|
||||
<Slider Classes="horizontal" Value="{Binding Uv365Intensity}" />
|
||||
<Slider Classes="horizontal" Value="{Binding Uv254Intensity}" />
|
||||
|
||||
@@ -53,8 +53,9 @@
|
||||
Margin="0,10,0,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Center"
|
||||
Content="Включить"
|
||||
IsChecked="{Binding Enabled}" />
|
||||
IsChecked="{Binding Enabled}">
|
||||
<TextBlock Text="Включить" FontSize="18"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -71,7 +72,7 @@
|
||||
Orientation="Vertical"
|
||||
Spacing="20">
|
||||
|
||||
<Slider Classes="vertical" Value="{Binding WhiteIntensity}" />
|
||||
<Slider Classes="vertical" Value="{Binding WhiteIntensity}" Maximum="0.03" />
|
||||
<Slider Classes="vertical" Value="{Binding Uv365Intensity}" />
|
||||
<Slider Classes="vertical" Value="{Binding Uv254Intensity}" />
|
||||
|
||||
@@ -82,8 +83,9 @@
|
||||
Margin="0,0,10,0"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Center"
|
||||
Content="Включить"
|
||||
IsChecked="{Binding Enabled}" />
|
||||
IsChecked="{Binding Enabled}">
|
||||
<TextBlock Text="Включить" FontSize="18"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user