添加 MX-PD-盘古 项目文件
将 MX-PD-盘古 - new 目录下的所有文件添加到主仓库
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
using MainShell.Models;
|
||||
using System;
|
||||
|
||||
namespace MainShell.Process
|
||||
{
|
||||
public class DieTransferRegion
|
||||
{
|
||||
public int StartRow { get; set; }
|
||||
|
||||
public int StartCol { get; set; }
|
||||
|
||||
public int EndRow { get; set; }
|
||||
|
||||
public int EndCol { get; set; }
|
||||
|
||||
public int RowCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return EndRow - StartRow + 1;
|
||||
}
|
||||
}
|
||||
|
||||
public int ColCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return EndCol - StartCol + 1;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Contains(int row, int column)
|
||||
{
|
||||
return row >= StartRow && row <= EndRow && column >= StartCol && column <= EndCol;
|
||||
}
|
||||
|
||||
public static DieTransferRegion FromRegionModel(RegionModel regionModel)
|
||||
{
|
||||
if (regionModel == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
DieTransferRegion region = new DieTransferRegion();
|
||||
region.StartRow = regionModel.StartRow;
|
||||
region.StartCol = regionModel.StartCol;
|
||||
region.EndRow = regionModel.EndRow;
|
||||
region.EndCol = regionModel.EndCol;
|
||||
return region;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user