using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

using Microsoft.AspNetCore.Mvc.Rendering;

namespace PdfPrintDemo.Models
{
    public class PrintersListItem
    {
        string m_name;

        public PrintersListItem(string name)
        {
            m_name = name;
        }

        public string Name
        {
            get
            {
                return m_name;
            }
            set
            {
                m_name = value;
            }
        }
    }

    public class PdfPrintModel
    {
        private List<SelectListItem> m_printerNamesList, m_paperOrientationsList
            , m_paperSizeNamesList, m_colorsSpacesList;

        private string m_selectedPrinterName;
        private string m_selectedPaperSizeName;
        private string m_selectedPaperOrientation;
        private string m_selectedColorSpace;
        private string m_leftMargin = "0", m_rightMargin = "0",
            m_topMargin = "0", m_bottomMargin = "0";
        private string m_startPage = "1", m_endPage = "";
        private bool m_enableColorPrinting = true;
        private string m_printResolution = "300";
        private bool m_useHardMargins = true;
        private string m_pdfPrintMessage = "";
        private bool m_showStatusDialog = false;
        private string m_submitAction = "printPdf";

        public string SubmitAction
        {
            get
            {
                return m_submitAction;
            }
            set
            {
                m_submitAction = value;
            }
        }

        public bool ShowStatusDialog
        {
            get
            {
                return m_showStatusDialog;
            }
            set
            {
                m_showStatusDialog = value;
            }
        }

        public string PdfPrintMessage
        {
            get
            {
                return m_pdfPrintMessage;
            }
            set
            {
                m_pdfPrintMessage = value;
            }
        }

        public bool UseHardMargins
        {
            get
            {
                return m_useHardMargins;
            }
            set
            {
                m_useHardMargins = value;
            }
        }

        public string StartPage
        {
            get
            {
                return m_startPage;
            }
            set
            {
                m_startPage = value;
            }
        }

        public string EndPage
        {
            get
            {
                return m_endPage;
            }
            set
            {
                m_endPage = value;
            }
        }

        public string PrintResolution
        {
            get
            {
                return m_printResolution;
            }
            set
            {
                m_printResolution = value;
            }
        }

        public bool EnableColorPrinting
        {
            get
            {
                return m_enableColorPrinting;
            }
            set
            {
                m_enableColorPrinting = value;
            }
        }

        public string LeftMargin
        {
            get
            {
                return m_leftMargin;
            }
            set
            {
                m_leftMargin = value;
            }
        }

        public string RightMargin
        {
            get
            {
                return m_rightMargin;
            }
            set
            {
                m_rightMargin = value;
            }
        }

        public string TopMargin
        {
            get
            {
                return m_topMargin;
            }
            set
            {
                m_topMargin = value;
            }
        }

        public string BottomMargin
        {
            get
            {
                return m_bottomMargin;
            }
            set
            {
                m_bottomMargin = value;
            }
        }

        public string SelectedPrinterName
        {
            get
            {
                return m_selectedPrinterName;
            }
            set
            {
                m_selectedPrinterName = value;
            }
        }

        public string SelectedPaperSizeName
        {
            get
            {
                return m_selectedPaperSizeName;
            }
            set
            {
                m_selectedPaperSizeName = value;
            }
        }

        public string SelectedPaperOrientation
        {
            get
            {
                return m_selectedPaperOrientation;
            }
            set
            {
                m_selectedPaperOrientation = value;
            }
        }

        public string SelectedColorSpace
        {
            get
            {
                return m_selectedColorSpace;
            }
            set
            {
                m_selectedColorSpace = value;
            }
        }

        public List<SelectListItem> PrinterNamesList
        {
            get
            {
                return m_printerNamesList;
            }
            set
            {
                m_printerNamesList = value;
            }
        }

        public List<SelectListItem> PaperOrientationsList
        {
            get
            {
                return m_paperOrientationsList;
            }
            set
            {
                m_paperOrientationsList = value;
            }
        }

        public List<SelectListItem> PaperSizeNamesList
        {
            get
            {
                return m_paperSizeNamesList;
            }
            set
            {
                m_paperSizeNamesList = value;
            }
        }

        public List<SelectListItem> ColorSpacesList
        {
            get
            {
                return m_colorsSpacesList;
            }
            set
            {
                m_colorsSpacesList = value;
            }
        }
    }
}
