Exemplo n.º 1
0
        private static TableCell buildCell(EwfTableCell ewfCell, RowSetup rowSetup, ColumnSetup columnSetup, bool tableIsColumnPrimary)
        {
            var colSpan = tableIsColumnPrimary ? ewfCell.Setup.ItemSpan : ewfCell.Setup.FieldSpan;
            var rowSpan = tableIsColumnPrimary ? ewfCell.Setup.FieldSpan : ewfCell.Setup.ItemSpan;

            var underlyingCell = rowSetup.IsHeader || columnSetup.IsHeader ? new TableHeaderCell() : new TableCell();

            underlyingCell.AddControlsReturnThis((ewfCell.Content ?? Enumerable.Empty <FlowComponent>()).GetControls());
            if (colSpan == 1)
            {
                underlyingCell.Width = columnSetup.Width;
            }
            underlyingCell.CssClass = StringTools.ConcatenateWithDelimiter(
                " ",
                TableCssElementCreator.AllCellAlignmentsClass.ClassName,
                columnSetup.CssClassOnAllCells,
                StringTools.ConcatenateWithDelimiter(" ", ewfCell.Setup.Classes.ToArray()));
            if (ewfCell.Setup.ActivationBehavior != null)
            {
                ewfCell.Setup.ActivationBehavior.SetUpClickableControl(underlyingCell);
            }

            if (colSpan != 1)
            {
                underlyingCell.ColumnSpan = colSpan;
            }
            if (rowSpan != 1)
            {
                underlyingCell.RowSpan = rowSpan;
            }

            ewfCell.Setup.EtherealContent.AddEtherealControls(underlyingCell);

            return(underlyingCell);
        }
Exemplo n.º 2
0
        public void DoSetup()
        {
            database = new ScenarioSetup.TestDatabase("MagiQL-Tests", "MagiQL");

            var thisAssembly = typeof(TestSetup).Assembly;

            var schemaSetup = new SchemaSetup(thisAssembly);

            schemaSetup.BuildSchema();

            var dataSetup = new DataSetup(thisAssembly);

            dataSetup.SeedData();

            var columnSetup = new ColumnSetup(thisAssembly);

            columnSetup.CreateColumns();

            website = new WebApiSetup();
            website.Start();
        }