forked from amkovkov/GranuSightSoftware2
comprehensive update
1) remove unused components: camera view (due it causes segmentation faults), compute resources and all related, illuminator controller (due in useless without camera view), image storage service, temperature and humidity service 2) database schema - reduce tables references, features storing in records themselves in compressed form, add records creation and editing date and time, add separator comment column 3) analysis - rework of pipeline and ui, now database storing only raw data and all display values calculated from it 4) lights service - add reconnection if disconnected 5) add width and height command line arguments 6) fix some typos and other issues
This commit is contained in:
@@ -4,22 +4,24 @@ using Avalonia.Threading;
|
||||
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
|
||||
namespace GSS2.UI.Core.ViewModels;
|
||||
|
||||
public partial class AsyncImageRecordViewModel : ViewModelBase
|
||||
{
|
||||
private static readonly SemaphoreSlim _semaphore = new(1, 1);
|
||||
|
||||
[ObservableProperty] public partial string? Data { get; set; }
|
||||
[ObservableProperty] public partial string Data { get; set; }
|
||||
[ObservableProperty] public partial IImage? Image { get; set; }
|
||||
[ObservableProperty] public partial bool IsLoading { get; set; } = false;
|
||||
|
||||
public AsyncImageRecordViewModel(string? data = null)
|
||||
public AsyncImageRecordViewModel(string data = "")
|
||||
{
|
||||
Data = data;
|
||||
}
|
||||
|
||||
partial void OnDataChanged(string? value) => _ = LoadAsync();
|
||||
partial void OnDataChanged(string value) => _ = LoadAsync();
|
||||
|
||||
private async Task LoadAsync()
|
||||
{
|
||||
@@ -27,7 +29,7 @@ public partial class AsyncImageRecordViewModel : ViewModelBase
|
||||
|
||||
try
|
||||
{
|
||||
if (Data is not null)
|
||||
if (!string.IsNullOrEmpty(Data))
|
||||
{
|
||||
IsLoading = true;
|
||||
byte[] imageBytes = Convert.FromBase64String(Data);
|
||||
|
||||
Reference in New Issue
Block a user