예제 #1
0
 public void DisplayRectangle1(string name, double row1, double col1, double row2, double col2, bool bAddList = false, string color = "green", int lineWidth = 1)
 {
     try
     {
         ContentBase rectangle1 = new Rectangle1Content(name, Window, row1, col1, row2, col2, color, lineWidth);
         if (bAddList)
         {
             displayItemsDic.Add(rectangle1.ContentName, rectangle1);
         }
         rectangle1.Display();
     }
     catch (Exception ex)
     {
         WriteErrorLog(ex.ToString());
     }
 }
예제 #2
0
        public override void DrawROIComplete()
        {
            string drawingObjectParams = drawingObj.GetDrawingObjectParams("type");

            if (drawingObjectParams == "rectangle1")
            {
                try
                {
                    this.Content1 = drawingObj.GetDrawingObjectParams("row1").D;
                    this.Content2 = drawingObj.GetDrawingObjectParams("column1").D;
                    this.Content3 = drawingObj.GetDrawingObjectParams("row2").D;
                    this.Content4 = drawingObj.GetDrawingObjectParams("column2").D;
                    base.RaiseProcessROIParameter(this.Content1, this.Content2, this.Content3, this.Content4, null);
                    base.DrawROIComplete();
                    Window.DetachDrawingObjectFromWindow(this.drawingObj);
                    Rectangle1Content rectangle1 = new Rectangle1Content("", Window, Row1, Col1, Row2, Col2);
                    rectangle1.Display();
                }
                catch (Exception ex)
                {
                    WriteErrorLog(ex.ToString());
                }
            }
        }