private static decimal FindMaxHalfWidth(LableCode lc) { var lenOfUpperFloor = lc.Floor > 1 ? LableCode.GetFloorHalfAvgLength(lc.PanelNo, lc.Floor) : 0; if (lenOfUpperFloor > 0) { return(Math.Min(lenOfUpperFloor, clsSetting.SplintLength / 2)); } else { // 默认最大宽度 return(clsSetting.SplintLength / 2); } }