Пример #1
0
            public Box AddCell(string text, Font font, Brush brush)
            {
                var box = new StringBox {
                    Text = text, Font = font, Brush = brush
                };

                Cells.Add(box);
                return(box);
            }
Пример #2
0
            public Box AddCell(string text)
            {
                var box = new StringBox {
                    Text = text
                };

                Cells.Add(box);
                return(box);
            }
Пример #3
0
        public virtual Box GetEntityBox(DiagramTableItem item, Dictionary <int, Box> colNameBoxes)
        {
            var panel = new PanelBox {
                Orientation = Orientation.Vertical
            };

            panel.BorderAllBrush = Brushes.Black;
            var header = new StringBox {
                Text = item.Table.Name, Font = GetHeaderFont(), Brush = Brushes.Black
            };

            panel.Boxes.Add(header);
            var table = new TableBox();

            table.HAlign = BoxModelAlignement.Fill;
            FillColumnsTable(item, colNameBoxes, table);
            panel.Boxes.Add(table);
            header.BorderBottom = 1;
            header.PadLeft      = header.PadRight = 3;
            FillHeader(header);
            panel.BorderAll       = 1;
            panel.BorderAllBrush  = Brushes.Black;
            panel.BackgroundBrush = Brushes.White;
            var es = item.GetCurrentEntityStyle();

            if (es.IsDefinedHeader)
            {
                header.Gradient = es.HeaderBg;
                table.Gradient  = es.BodyBg;
            }
            else
            {
                panel.Gradient = es.BodyBg;
            }

            return(panel);
        }
Пример #4
0
 protected override void FillHeader(StringBox header)
 {
     header.PadTop = header.PadBottom = 3;
 }
Пример #5
0
 protected override void FillHeader(StringBox header)
 {
     header.BorderBottom      = 2;
     header.HAlign            = BoxModelAlignement.Center;
     header.BorderBottomBrush = Brushes.Gray;
 }
Пример #6
0
 protected virtual void FillHeader(StringBox header)
 {
 }