Exemplo n.º 1
0
        Label AddLabel(string labelText)
        {
            var label = new Label();

            label.Initialize();
            container.AddDrawBox(label);
            label.Text = labelText;

            if (lastField.Count != 0)
            {
                label.Y = Push.GetBottomSide(lastField.ToArray()) + VerticalMargin + extraVerticalMargin;
            }
            extraVerticalMargin = 0;

            bool up   = true;
            bool down = false;

            if (!AlignTop && AlignBottom)
            {
                up   = false;
                down = true;
            }

            alignments.Add(label, new DrawBoxAlignment(up, down, true, false));

            return(label);
        }
Exemplo n.º 2
0
        public void AddDrawBoxAsField(DrawBox drawBox, DrawBoxAlignment drawBoxAlignment)
        {
            container.AddDrawBox(drawBox);

            if (lastField.Count != 0)
            {
                drawBox.Y = Push.GetBottomSide(lastField.ToArray()) + VerticalMargin + extraVerticalMargin;
            }

            alignments.Add(drawBox, drawBoxAlignment);

            AddNewFieldList();
            lastField.Add(drawBox);
        }