public override void DrawROIComplete() { string drawingObjectParams = drawingObj.GetDrawingObjectParams("type"); if (drawingObjectParams == "rectangle1") { try { this.Content1 = drawingObj.GetDrawingObjectParams("row").D; this.Content2 = drawingObj.GetDrawingObjectParams("column").D; this.Content3 = drawingObj.GetDrawingObjectParams("angle").D; this.Content4 = drawingObj.GetDrawingObjectParams("length1").D; this.Content5 = drawingObj.GetDrawingObjectParams("length2").D; base.RaiseProcessROIParameter(Content1, Content2, Content3, Content4, Content5); base.DrawROIComplete(); Window.DetachDrawingObjectFromWindow(this.drawingObj); Rectangle2Content rectangle2 = new Rectangle2Content("", Window, CenterRow, CenterCol, Angle, Length1, Length2); rectangle2.Display(); } catch (Exception ex) { WriteErrorLog(ex.ToString()); } } }
public void DisplayRectangle2(string name, double row, double col, double phi, double length1, double length2, bool bAddList = false, string color = "green", int lineWidth = 1) { try { ContentBase retangle2 = new Rectangle2Content(name, Window, row, col, phi, length1, length2, color, lineWidth); if (bAddList) { if (!displayItemsDic.ContainsKey(name)) { displayItemsDic.Add(retangle2.ContentName, retangle2); } } retangle2.Display(); } catch (Exception ex) { WriteErrorLog(ex.ToString()); } }