using Consulenza.ReportWriter.Business;
using Consulenza.ReportWriter.Business.OBJ_PDF;
using Consulenza.ReportWriter.Manager.Integration;

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

        public S7(EnvironmentFacade environmentFacade, int idChapter, bool repeatoneachpage, IntegrationLayout integrationlayout)
            : base(environmentFacade, idChapter)
        {
            RepeatOnEachPage = repeatoneachpage;
            IntegrationLayout = integrationlayout;
            Draw();
        }

        /// <summary>
        /// Disegno il capitolo S7
        /// </summary>
        protected override sealed void Draw()
        {
            //// Integrazione Layout
            //var integrationlayout = ((DuplicazioneIdImmobileCatasto)base.IntegrationLayout);

            // Aggiungo la pagina
            AddElement(new PagePDF(PagePDF.PagePDFType.Generic));

            // Aggiungo gli elementi
            AddElement(new ImagePDF(EnvironmentFacade.RendererFacade.XLeftLimit, 0.20F, "Focus.png") { AutoIncrementYWritable = false });// Icona
            AddElement(new FormattedTextAreaPDF("Scheda di stima parametrica del valore", EnvironmentFacade.RendererFacade.XLeftLimit + 30) { FontSize = 16, FontColor = ColorPDF.Immobiliare_Grigio_TitoloGrande, AutoIncrementYWritable = true, FontBold = true }); // Intestazione          
        }
    }
}
