using Consulenza.ReportWriter.Business;
using Consulenza.ReportWriter.Business.OBJ_PDF;

namespace Consulenza.ReportWriter.Manager.Chapter.Immobiliare.MappaturaPreliminare
{
    public class S9 : Entity.Chapter
    {
        public S9(EnvironmentFacade environmentFacade, int idChapter)
            : base(environmentFacade, idChapter)
        {
            Draw();
        }

        public S9(EnvironmentFacade environmentFacade, int idChapter, bool repeatoneachpage)
            : this(environmentFacade, idChapter)
        {
            RepeatOnEachPage = repeatoneachpage;
        }

        protected override sealed void Draw()
        {
            // Aggiungo la pagina
            AddElement(new PagePDF(PagePDF.PagePDFType.Generic));
            var icona = new ImagePDF(EnvironmentFacade.RendererFacade.XLeftLimit, 0.23F, "Cointestatarin.png") { DeltaY = -8, AutoIncrementYWritable = false };
            // Intestazione
            var intestazione2 = new FormattedTextAreaPDF("Dettaglio cointestatari", EnvironmentFacade.RendererFacade.XLeftLimit + 30) { FontSize = 16, FontColor = ColorPDF.Immobiliare_Grigio_TitoloGrande, AutoIncrementYWritable = false, FontBold = true };
            AddElement(icona);
            // Aggiungo gli elementi
            AddElement(intestazione2);
        }
    }
}
