| | |
| | | Config.MeasurementUnitCollection.Add(mUnitDown); |
| | | } |
| | | break; |
| | | case "BlindExist": |
| | | case "BlindNotExist": |
| | | { |
| | | for (int i = startIndex; i <= endIndex; i++) |
| | | { |
| | | curKey = Config.KeyLocationCollection.FirstOrDefault(u => u.Key == Config.KeyNameCollection[i]); |
| | | if (curKey == null) |
| | | { |
| | | curKey = Config.KeyLocationCollection.FirstOrDefault(u => u.IsDefault); |
| | | } |
| | | int lableX = (int)((curKeyRect.X + curKeyRect.X + curKey.KeySize.Width - measureType.DisplayRect.Width) / 2.0); |
| | | //int lable_Up_Y = (int)(startRect.KeyPosition.Y + (startRect.KeySize.Height - measureType.DisplayRect.Height) / 2.0); |
| | | int lable_Up_Y = (int)(startRect.KeyPosition.Y + startRect.KeySize.Height - (measureType.DisplayRect.Height )); |
| | | |
| | | MeasurementUnit mUnitUp = new MeasurementUnit(); |
| | | mUnitUp.MeasureType = measureType.Code; |
| | | mUnitUp.KeyUnitCollection.Add(new KeyUnitBind() { Key = Config.KeyNameCollection[i], KeyResultId = "B1" }); |
| | | mUnitUp.KeyUnitCollection.Add(new KeyUnitBind() { Key = Config.KeyNameCollection[i], KeyResultId = "B2" }); |
| | | mUnitUp.DisplayLocation = new Rectangle(lableX, lable_Up_Y, measureType.DisplayRect.Width, measureType.DisplayRect.Height); |
| | | Config.MeasurementUnitCollection.Add(mUnitUp); |
| | | |
| | | curKeyRect.Offset(curKey.KeySize.Width + curKey.IntervalSize.Width, 0); |
| | | } |
| | | } |
| | | |
| | | break; |
| | | } |
| | | |
| | | return "已批量生成检测项,请到配置界面查看和保存"; |