28 lines
628 B
C#
28 lines
628 B
C#
using System.Collections.ObjectModel;
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using GazpromApp.Models;
|
|
|
|
namespace GazpromApp.ViewModels;
|
|
|
|
public partial class PropertyViewModel : ViewModelBase
|
|
{
|
|
[ObservableProperty]
|
|
private string _name;
|
|
|
|
[ObservableProperty]
|
|
private string _value;
|
|
|
|
public ObservableCollection<PropertyViewModel> Properties { get; set; } = [];
|
|
|
|
public PropertyViewModel()
|
|
{
|
|
Name = string.Empty;
|
|
Value = string.Empty;
|
|
}
|
|
|
|
public PropertyViewModel(Property property)
|
|
{
|
|
Name = property.Name;
|
|
Value = property.Value;
|
|
}
|
|
} |