Add ViewModelBase
This commit is contained in:
Родитель
644d9fa07f
Коммит
9088e02950
|
@ -11,8 +11,7 @@ using TraceGui.Services;
|
|||
|
||||
namespace TraceGui.ViewModels;
|
||||
|
||||
[ObservableObject]
|
||||
public partial class MainWindowViewModel
|
||||
public partial class MainWindowViewModel : ViewModelBase
|
||||
{
|
||||
[ObservableProperty] private OptionsViewModel _options;
|
||||
[ObservableProperty] private TraceResultViewModel? _traceResult;
|
||||
|
|
|
@ -6,8 +6,7 @@ using ReactiveMarbles.PropertyChanged;
|
|||
|
||||
namespace TraceGui.ViewModels;
|
||||
|
||||
[ObservableObject]
|
||||
public partial class OptionsViewModel
|
||||
public partial class OptionsViewModel : ViewModelBase
|
||||
{
|
||||
[ObservableProperty] private int _turdSize = 2;
|
||||
[ObservableProperty] private int _turnPolicy = 4;
|
||||
|
|
|
@ -5,8 +5,7 @@ using SixLabors.ImageSharp.PixelFormats;
|
|||
|
||||
namespace TraceGui.ViewModels;
|
||||
|
||||
[ObservableObject]
|
||||
public partial class SourceImageViewModel : IDisposable
|
||||
public partial class SourceImageViewModel : ViewModelBase, IDisposable
|
||||
{
|
||||
[ObservableProperty] private Avalonia.Media.Imaging.Bitmap? _bitmap;
|
||||
|
||||
|
|
|
@ -18,8 +18,7 @@ using Microsoft.CodeAnalysis.Scripting;
|
|||
|
||||
namespace TraceGui.ViewModels;
|
||||
|
||||
[ObservableObject]
|
||||
public partial class TraceResultViewModel : IDisposable
|
||||
public partial class TraceResultViewModel : ViewModelBase, IDisposable
|
||||
{
|
||||
private readonly SixLabors.ImageSharp.Image<Rgba32>? _source;
|
||||
[ObservableProperty] private string? _fileName;
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace TraceGui.ViewModels;
|
||||
|
||||
[ObservableObject]
|
||||
public partial class ViewModelBase
|
||||
{
|
||||
}
|
Загрузка…
Ссылка в новой задаче