public Bitmap RevokeOper()
 {
     if (editShouldPadInfoList.Count >= 2)
     {
         editShouldPadInfoList.RemoveAt(editShouldPadInfoList.Count - 1);
         if (userOperTypeList.Count >= 2)
         {
             userOperTypeList.RemoveAt(userOperTypeList.Count - 1);
             UserOperType = userOperTypeList[0];
         }
         EditShouldPadInfo editShouldPadInfo = editShouldPadInfoList[editShouldPadInfoList.Count - 1];
         shouldPadShapeInfo = editShouldPadInfo.ShouldPadShapeInfo;
         if (editShouldPadInfo.ShapeParams != null)
         {
             if (ParamList.Count != 0)
             {
                 for (int i = 0; i < editShouldPadInfo.ShapeParams.Length; i++)
                 {
                     ParamList[i].Content = editShouldPadInfo.ShapeParams[i].ToString();
                 }
                 Edit_SaveAllParam();
             }
         }
         originalMappingRatio = editShouldPadInfo.OriginalMappingRatio;
         shapeOperManager.SetShouldPadShapeInfo(shouldPadShapeInfo);
     }
     return(shapeOperManager.GetShapeBitmap());
 }
 public Bitmap SetShouldPadPoints(Point[] shapePoints)
 {
     shouldPadShapeInfo = new ShouldPadShapeInfo(shapePoints, shouldPadShapeInfo.ClothClamps);
     shapeOperManager.SetShouldPadShapeInfo(shouldPadShapeInfo);
     AddEditOperParams();
     SetUserOperType(UserOperType.ModifyOper);
     return(shapeOperManager.GetShapeBitmap());
 }
 public Bitmap  RecountClampCloth()
 {
     ClothClamp[] clothClamps = LoadClothClamps();
     shouldPadShapeInfo = new ShouldPadShapeInfo(shouldPadShapeInfo.ShapePoints, clothClamps);
     shapeOperManager.SetShouldPadShapeInfo(shouldPadShapeInfo);
     AddEditOperParams();
     return(shapeOperManager.GetShapeBitmap());
 }
        private void LoadShouldPadInfo()
        {
            ShouldPadInfoManager shouldPadImfoManager = new ShouldPadInfoManager();
            ClothClampManager    clothClampManager    = new ClothClampManager();

            Point[] shapePoints = shouldPadImfoManager.GetShouldPadPoints();
            shouldPadShapeInfo = new ShouldPadShapeInfo(shapePoints, clothClampManager.LoadClothClamps());
        }
 public Bitmap SetShouldPadPoints(ShouldPadShapeInfo shapeInfos)
 {
     editShouldPadInfoList.Clear();
     userOperTypeList.Clear();
     shouldPadShapeInfo = shapeInfos;
     shapeOperManager.SetShouldPadShapeInfo(shapeInfos);
     originalMappingRatio = MappingSize.MappingSizeEx.MappingRatio;
     return(shapeOperManager.GetShapeBitmap());
 }
 public void SetShouldPadShapeInfo(ShouldPadShapeInfo shouldPadShapeInfo, bool savePoints)
 {
     this.shouldPadShapeInfo = shouldPadShapeInfo;
     if (savePoints)
     {
         ShouldPadInfoManager shouldPadInfoManager = new ShouldPadInfoManager();
         shouldPadInfoManager.SetShouldPadPoints(shouldPadShapeInfo.ShapePoints);
     }
 }
 public void  SetShouldPadShapeInfo(ShouldPadShapeInfo shouldPadShapeInfo)
 {
     if (shouldPadShapeInfo != null)
     {
         if (shapePointCollect != null)
         {
             shapePointCollect.Clear();
         }
         clothClamps = shouldPadShapeInfo.ClothClamps;
         SetShapePoints(shouldPadShapeInfo.ShapePoints);
         SelectPointIndex     = 0;
         moveSelectPointIndex = 0;
     }
 }
        private Bitmap GetBitMapVal(PointF[] PointFs)
        {
            //将坐标点转化为屏幕上的点
            Point[] shapePoints = ChangToScreenPoints(PointFs);

            //将花型坐标和夹布器坐标存入ShapeInfo中
            ClothClamp[] clothClamps = LoadClothClamps();
            shouldPadShapeInfo = new ShouldPadShapeInfo(shapePoints, clothClamps);

            //保存图像比例
            originalMappingRatio = MappingSize.MappingSizeEx.MappingRatio;

            //将花型参数 点和夹布器坐标 比例 存入一个元素项中
            AddEditOperParams();

            shapeOperManager.SetShouldPadShapeInfo(shouldPadShapeInfo);
            SetUserOperType(UserOperType.CalculationOper);
            return(shapeOperManager.GetShapeBitmap());
        }