private void CalcDsc(int id) { RectangleF rectFRoiRecord; PointF[] rectFRoiPoints; Size rectRoiSize; RectangleF rectFBlkRecord; Rectangle rectBlkRecord; PointF[] rectFBlkPoints; Size rectBlkSize; string fileName = Path.Combine(fileDir + "-", Convert.ToString(id));; rectFRoiRecord = RectConverter.ConvertFromDrawRect(roi[id], slide[id], id); rectFRoiPoints = RectConverter.GetAllPointsByRectangleF(rectFRoiRecord, amp); rectRoiSize = RectConverter.GetStepsByRectangleF(rectFRoiRecord, amp); rectBlkRecord = rectsBLK[id]; rectFBlkRecord = RectConverter.ConvertFromDrawRect(rectsBLK[id], slide[id], id); // Cal two Points. rectFBlkPoints = new PointF[2]; rectFBlkPoints[0] = new PointF(rectFBlkRecord.Left - rectFBlkRecord.Width / 3, rectFBlkRecord.Top + rectFBlkRecord.Height / 2); rectFBlkPoints[1] = new PointF(rectFBlkRecord.Left - rectFBlkRecord.Width * 2 / 3, rectFBlkRecord.Top + rectFBlkRecord.Height / 2); rectBlkSize = RectConverter.GetStepsByRectangleF(rectFBlkRecord, amp); roi[id] = RectConverter.ConvertToDrawRect(roi[id], slide[id], id); GenerateTaskDesc(fileName, roi[id], rectFRoiRecord, rectFRoiPoints, rectRoiSize, rectBlkRecord, rectFBlkRecord, rectFBlkPoints, rectBlkSize, id); }