Adding point works
This commit is contained in:
@@ -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 ?? [],
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user