示例#1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");
                // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
                app.UseHsts();
            }

            app.UseHttpsRedirection();
            app.UseStaticFiles();

            app.UseRouting();

            app.UseAuthentication();
            app.UseAuthorization();

            app.UseSession();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllerRoute(
                    "default",
                    "{controller=Home}/{action=Index}/");
            });
            BorderContext.CreateAdminUser(app.ApplicationServices).Wait();
        }
示例#2
0
 public void WriteTableCellEnd(int cellIndex, BorderContext borderContext, bool emptyLayoutCell)
 {
     if (this._state == State.InCell)
     {
         this.CurrentCell.WriteCloseTag(emptyLayoutCell);
         this._currentCell = this.CurrentCell.ContainingCell;
         this._state       = State.InRow;
     }
     else
     {
         WordOpenXmlUtils.FailCodingError();
     }
 }
 public void SetTableContext(BorderContext borderContext)
 {
     if (borderContext.Top)
     {
         this.SetBorderStyle(this._document.TableContext.CurrentTable.TableProperties, RPLFormat.BorderStyles.None, TableData.Positions.Top);
     }
     if (borderContext.Bottom)
     {
         this.SetBorderStyle(this._document.TableContext.CurrentTable.TableProperties, RPLFormat.BorderStyles.None, TableData.Positions.Bottom);
     }
     if (borderContext.Left)
     {
         this.SetBorderStyle(this._document.TableContext.CurrentTable.TableProperties, RPLFormat.BorderStyles.None, TableData.Positions.Left);
     }
     if (borderContext.Right)
     {
         this.SetBorderStyle(this._document.TableContext.CurrentTable.TableProperties, RPLFormat.BorderStyles.None, TableData.Positions.Right);
     }
 }
        public void ApplyCellBorderContext(BorderContext borderContext)
        {
            OpenXmlTableCellModel currentCell = this._document.TableContext.CurrentCell;

            if (borderContext.Top)
            {
                currentCell.UseTopTableBorder();
            }
            if (borderContext.Bottom)
            {
                currentCell.UseBottomTableBorder();
            }
            if (borderContext.Left)
            {
                currentCell.UseLeftTableBorder();
            }
            if (borderContext.Right)
            {
                currentCell.UseRightTableBorder();
            }
        }
        protected override void RenderTextBox(RPLTextBox textBox, RPLItemMeasurement measurement, int cellIndex, float left, BorderContext borderContext, bool inTablix, bool hasBorder)
        {
            RPLTextBoxPropsDef textBoxPropsDef;
            bool            isSimple;
            string          textBoxValue;
            bool            notCanGrow;
            bool            needsTable;
            RPLElementStyle style;
            int             oldCellIndex;
            RPLTextBoxProps textBoxProperties = GetTextBoxProperties(textBox, out textBoxPropsDef, out isSimple, out textBoxValue, inTablix, out notCanGrow, hasBorder, cellIndex, out needsTable, out style, out oldCellIndex);

            RenderTextBoxProperties(inTablix, cellIndex, needsTable, style);
            RenderTextBox(textBox, inTablix, cellIndex, needsTable, style, measurement, notCanGrow, textBoxPropsDef, textBoxProperties, isSimple, textBoxValue, borderContext, oldCellIndex);
        }
        protected override void RenderTablixCell(RPLTablix tablix, float left, float[] widths, TablixGhostCell[] ghostCells, BorderContext borderContext, int nextCell, RPLTablixCell cell, List <RPLTablixMemberCell> .Enumerator omittedCells, bool lastCell)
        {
            RPLItemMeasurement tablixCellMeasurement = GetTablixCellMeasurement(cell, nextCell, widths, ghostCells, omittedCells, lastCell, tablix);

            ClearTablixCellBorders(cell);
            m_writer.ApplyCellBorderContext(borderContext);
            RenderTablixCellItem(cell, widths, tablixCellMeasurement, left, borderContext);
            FinishRenderingTablixCell(cell, widths, ghostCells, borderContext);
        }
 protected override void RenderRPLContainer(RPLElement element, bool inTablix, RPLItemMeasurement measurement, int cellIndex, BorderContext borderContext, bool hasBorder)
 {
     RenderRPLContainerProperties(element, inTablix, cellIndex);
     RenderRPLContainerContents(element, measurement, borderContext, inTablix, hasBorder);
 }
 protected override bool RenderRectangleItemAndLines(RPLContainer rectangle, BorderContext borderContext, int y, PageTableCell cell, string linkToChildId, float runningLeft, bool rowUsed)
 {
     RenderLines(y, cell, borderContext);
     rowUsed = RenderRectangleItem(y, cell, borderContext, linkToChildId, rectangle, runningLeft, rowUsed);
     return(rowUsed);
 }
 public BorderContextWrapper()
 {
     context = new BorderContext(BuildConnectionString());
 }
 public BorderContext(BorderContext borderContext)
 {
     this.m_borderContext = borderContext.m_borderContext;
 }
 public void WriteTableCellEnd(int cellIndex, BorderContext borderContext, bool emptyLayoutCell)
 {
     this.EndAndWriteCurrentParagraph(false);
     this._document.TableContext.WriteTableCellEnd(cellIndex, borderContext, emptyLayoutCell || this._forceEmptyLayoutCell);
     this._forceEmptyLayoutCell = false;
 }
示例#12
0
 internal BorderContext(BorderContext borderContext)
 {
     m_borderContext = borderContext.m_borderContext;
 }