首次提交:添加src文件夹代码
This commit is contained in:
25
Cowain.Bake.Main/Models/MainRowDefinition.cs
Normal file
25
Cowain.Bake.Main/Models/MainRowDefinition.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Cowain.Bake.BLL;
|
||||
using System.Linq;
|
||||
using Unity;
|
||||
|
||||
|
||||
namespace Cowain.Bake.Main.Models
|
||||
{
|
||||
public class MainRowDefinition
|
||||
{
|
||||
public static float UpperSpacing = 6;
|
||||
public static float UpperHeight = 0;
|
||||
public static float MidHeight = 3;
|
||||
public static float LowerHeight = 0;
|
||||
public static float LowerSpacing = 1.5f;
|
||||
public static float TotalHeight = 0;
|
||||
|
||||
public MainRowDefinition(IUnityContainer unityContainer)
|
||||
{
|
||||
var memory = unityContainer.Resolve<MemoryDataProvider>();
|
||||
UpperHeight = memory.AllStation.Where(x => x.PosX == 1).Max(x => x.Layers)+1;
|
||||
LowerHeight = memory.AllStation.Where(x => x.PosX == 3).Max(x => x.Layers)+1; //1:就是抬头
|
||||
TotalHeight = UpperSpacing + LowerSpacing + UpperHeight + LowerHeight + MidHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user