Exemplo n.º 1
0
        public void UpdateMethodRectangle(RectangleWithText rectangleProperty)
        {
            int yMethod = rectangleProperty.Height + rectangleProperty.Y;
            RectangleWithText rectangleWithText = (listDrawingObjects[2] as RectangleWithText);

            rectangleWithText.UpdateYMembers(yMethod);
        }
Exemplo n.º 2
0
        public void AddMethodText(string value)
        {
            RectangleWithText rectangleWithText = (listDrawingObjects[2] as RectangleWithText);

            rectangleWithText.AddText(value);
            syncWidthText(value, rectangleWithText);
        }
Exemplo n.º 3
0
        public void AddPropertyText(string value)
        {
            RectangleWithText rectangleWithText = (listDrawingObjects[1] as RectangleWithText);

            rectangleWithText.AddText(value);
            syncWidthText(value, rectangleWithText);

            UpdateMethodRectangle(rectangleWithText);
        }
Exemplo n.º 4
0
        public void syncWidthText(string value, RectangleWithText rectangleWithText)
        {
            SizeF size = getSizeOfTextString(value);

            if (rectangleWithText.Width < size.Width)
            {
                updateWidthMembers(size.Width);
            }
            updateClassCenterText();
        }
Exemplo n.º 5
0
        public void updateClassCenterText()
        {
            RectangleWithText rectangleWithText = (listDrawingObjects[0] as RectangleWithText);
            Text   text  = (rectangleWithText.drawingObjects[0] as Text);
            string value = (rectangleWithText.drawingObjects[0] as Text).Value;
            SizeF  size  = getSizeOfTextString(value);
            float  xText = (rectangleWithText.Width / 2) - (size.Width / 2) + rectangleWithText.X;
            float  yText = (rectangleWithText.Height / 2) - (size.Height / 2) + rectangleWithText.Y;

            text.X = (int)xText;
            text.Y = (int)yText;
        }
Exemplo n.º 6
0
        public ClassDiagram(int initX, int initY) : base()
        {
            RectangleWithText obj1 = new RectangleWithText(initX, initY);

            listDrawingObjects.Add(obj1);
            RectangleWithText obj2 = new RectangleWithText(initX, initY);

            listDrawingObjects.Add(obj2);
            RectangleWithText obj3 = new RectangleWithText(initX, initY);

            listDrawingObjects.Add(obj3);
        }