Files
test_demo/MX-PD-盘古 - new/PanGu.DieBonderApp/MainShell/Models/RegionModel.cs
Shi.Ji e31d3560bb 添加 MX-PD-盘古 项目文件
将 MX-PD-盘古 - new 目录下的所有文件添加到主仓库
2026-05-18 11:43:09 +08:00

52 lines
1.4 KiB
C#

using MwFramework.ManagerService;
using Stylet;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MainShell.Models
{
public class RegionModel : PropertyChangedBase , IParameterItem
{
private int _startRow = 1;
private int _startCol = 1;
private int _endRow = 1;
private int _endCol = 1;
public int StartRow
{
get => _startRow;
set { if (SetAndNotify(ref _startRow, value)) OnPropertyChanged(nameof(RowCount)); }
}
public int StartCol
{
get => _startCol;
set { if (SetAndNotify(ref _startCol, value)) OnPropertyChanged(nameof(ColCount)); }
}
public int EndRow
{
get => _endRow;
set { if (SetAndNotify(ref _endRow, Math.Max(_startRow, value))) OnPropertyChanged(nameof(RowCount)); }
}
public int EndCol
{
get => _endCol;
set { if (SetAndNotify(ref _endCol, Math.Max(_startCol, value))) OnPropertyChanged(nameof(ColCount)); }
}
// 只读属性,方便 UI 显示占用规模
public int RowCount => EndRow - StartRow + 1;
public int ColCount => EndCol - StartCol + 1;
public IParameterItem Clone()
{
return MemberwiseClone() as IParameterItem;
}
}
}