Adding point works

This commit is contained in:
retr0volkov
2025-06-30 20:13:36 +03:00 Unverified
parent e5f8982c44
commit 7beee75d14
39 changed files with 4138 additions and 38 deletions
+38
View File
@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices.JavaScript;
using Avalonia.Media.Imaging;
using CommunityToolkit.Mvvm.ComponentModel;
using GazpromApp.Models;
namespace GazpromApp.ViewModels;
public partial class ImageViewModel : ViewModelBase
{
[ObservableProperty]
private byte[]? _bytes;
// EF stuff
[ObservableProperty]
private List<Point>? _points;
[ObservableProperty]
private List<Equipment>? _equipment;
[ObservableProperty]
private Bitmap? _fileName;
public ImageViewModel(Image image)
{
Bytes = image.Bytes;
Equipment = image.Equipment;
Points = image.Points;
}
public Image GetImage()
{
return new Image()
{
Bytes = Bytes ?? [],
Equipment = Equipment ?? [],
Points = Points ?? [],
};
}
}