mirror of
http://git.xinwangdao.com/cnnc-embedded-parts-detect/detect.git
synced 2025-06-24 21:44:12 +08:00
70 lines
1.5 KiB
C#
70 lines
1.5 KiB
C#
using System;
|
|
using System.Reactive;
|
|
using Avalonia.Collections;
|
|
using ReactiveUI;
|
|
|
|
namespace detect.gui.Models;
|
|
|
|
public class RegionModel : ReactiveObject
|
|
{
|
|
private long? _id;
|
|
|
|
public long? Id
|
|
{
|
|
get => _id;
|
|
set => this.RaiseAndSetIfChanged(ref _id, value);
|
|
}
|
|
|
|
private string? _name;
|
|
|
|
public string? Name
|
|
{
|
|
get => _name;
|
|
set => this.RaiseAndSetIfChanged(ref _name, value);
|
|
}
|
|
|
|
private string? _code;
|
|
|
|
public string? Code
|
|
{
|
|
get => _code;
|
|
set => this.RaiseAndSetIfChanged(ref _code, value);
|
|
}
|
|
|
|
private DateTime? _createTime;
|
|
|
|
public DateTime? CreateTime
|
|
{
|
|
get => _createTime;
|
|
set => this.RaiseAndSetIfChanged(ref _createTime, value);
|
|
}
|
|
|
|
private DateTime? _updateTime;
|
|
|
|
public DateTime? UpdateTime
|
|
{
|
|
get => _updateTime;
|
|
set => this.RaiseAndSetIfChanged(ref _updateTime, value);
|
|
}
|
|
|
|
private AvaloniaList<DeviceModel> _deviceList = [];
|
|
public AvaloniaList<DeviceModel> DeviceList
|
|
{
|
|
get => _deviceList;
|
|
set => this.RaiseAndSetIfChanged(ref _deviceList, value);
|
|
}
|
|
|
|
private bool _isExpand;
|
|
|
|
public bool IsExpand
|
|
{
|
|
get => _isExpand;
|
|
set => this.RaiseAndSetIfChanged(ref _isExpand, value);
|
|
}
|
|
|
|
public ReactiveCommand<Unit, bool> ExpandCommand { get; }
|
|
public RegionModel()
|
|
{
|
|
ExpandCommand = ReactiveCommand.Create(() => IsExpand = !IsExpand);
|
|
}
|
|
} |