using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SelectPdf.Samples
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            foreach (Control control in this.Controls)
            {
                if (control is MdiClient)
                {
                    control.BackColor = menuStrip.BackColor;
                    break;
                }
            }
        }

        private void ExitToolsStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void CascadeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LayoutMdi(MdiLayout.Cascade);
        }

        private void TileVerticalToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LayoutMdi(MdiLayout.TileVertical);
        }

        private void TileHorizontalToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LayoutMdi(MdiLayout.TileHorizontal);
        }

        private void ArrangeIconsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LayoutMdi(MdiLayout.ArrangeIcons);
        }

        private void CloseAllToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (Form childForm in MdiChildren)
            {
                childForm.Close();
            }
        }

        private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("http://selectpdf.com/pdf-library-for-net/");
        }

        private void visitSelectPdf_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("http://selectpdf.com");
        }

        private void gettingStartedToolStripMenuItem_Click(object sender, EventArgs e)
        {
            GettingStarted form = new GettingStarted();
            form.MdiParent = this;
            form.Show();
        }

        private void documentPropertiesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DocumentProperties form = new DocumentProperties();
            form.MdiParent = this;
            form.Show();
        }

        private void gettingStartedToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            HtmlToPdfConverter form = new HtmlToPdfConverter();
            form.MdiParent = this;
            form.Show();
        }

        private void convertUrlToPdfToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ConvertUrlToPdf form = new ConvertUrlToPdf();
            form.MdiParent = this;
            form.Show();
        }

        private void convertHtmlCodeToPdfToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ConvertHtmlCodeToPdf form = new ConvertHtmlCodeToPdf();
            form.MdiParent = this;
            form.Show();
        }

        private void pdfViewerPreferencesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PdfViewerPreferences form = new PdfViewerPreferences();
            form.MdiParent = this;
            form.Show();
        }

        private void pdfPageSettingsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PageSettings form = new PageSettings();
            form.MdiParent = this;
            form.Show();
        }

        private void pdfSecuritySettingsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PdfSecurity form = new PdfSecurity();
            form.MdiParent = this;
            form.Show();
        }

        private void pdfElementsRenderingPositionsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PdfElementsPositions form = new PdfElementsPositions();
            form.MdiParent = this;
            form.Show();
        }

        private void pdfTextElementPropertiesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PdfTextElementForm form = new PdfTextElementForm();
            form.MdiParent = this;
            form.Show();
        }

        private void pdfImageElementPropertiesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PdfImageElementForm form = new PdfImageElementForm();
            form.MdiParent = this;
            form.Show();
        }

        private void pdfGraphicElementsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            GraphicElements form = new GraphicElements();
            form.MdiParent = this;
            form.Show();
        }

        private void pdfLinksToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PdfLinks form = new PdfLinks();
            form.MdiParent = this;
            form.Show();
        }

        private void pdfBookmarksToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PdfBookmarks form = new PdfBookmarks();
            form.MdiParent = this;
            form.Show();
        }

        private void pdfTemplatesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PdfTemplates form = new PdfTemplates();
            form.MdiParent = this;
            form.Show();
        }

        private void headersAndFootersToolStripMenuItem_Click(object sender, EventArgs e)
        {
            HeadersAndFooters form = new HeadersAndFooters();
            form.MdiParent = this;
            form.Show();
        }

        private void pdfStampsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PdfStamps form = new PdfStamps();
            form.MdiParent = this;
            form.Show();
        }

        private void pdfWatermarksToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PdfWatermarks form = new PdfWatermarks();
            form.MdiParent = this;
            form.Show();
        }

        private void pageNumberingToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PageNumbering form = new PageNumbering();
            form.MdiParent = this;
            form.Show();
        }

        private void pdfMergeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PdfMerge form = new PdfMerge();
            form.MdiParent = this;
            form.Show();
        }

        private void pdfSplitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PdfSplit form = new PdfSplit();
            form.MdiParent = this;
            form.Show();
        }

        private void pdfDocumentPropertiesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PdfConverterProperties form = new PdfConverterProperties();
            form.MdiParent = this;
            form.Show();
        }

        private void pdfViewerPreferencesToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            PdfConverterViewerPreferences form = new PdfConverterViewerPreferences();
            form.MdiParent = this;
            form.Show();
        }

        private void pdfSecuritySettingsToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            PdfConverterSecurity form = new PdfConverterSecurity();
            form.MdiParent = this;
            form.Show();
        }

        private void multipleUrlsToOnePdfDocumentToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ConvertMultipleUrlsToPdf form = new ConvertMultipleUrlsToPdf();
            form.MdiParent = this;
            form.Show();
        }

        private void conversionDelayToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ConversionDelay form = new ConversionDelay();
            form.MdiParent = this;
            form.Show();
        }

        private void headersAndFootersToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            HtmlToPdfHeadersAndFooters form = new HtmlToPdfHeadersAndFooters();
            form.MdiParent = this;
            form.Show();
        }

        private void pageBreaksToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PageBreaks form = new PageBreaks();
            form.MdiParent = this;
            form.Show();
        }

        private void automaticBookmarksToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AutomaticBookmarks form = new AutomaticBookmarks();
            form.MdiParent = this;
            form.Show();
        }

        private void hTTPHeadersToolStripMenuItem_Click(object sender, EventArgs e)
        {
            HttpHeaders form = new HttpHeaders();
            form.MdiParent = this;
            form.Show();
        }

        private void hTTPCookiesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            HttpCookies form = new HttpCookies();
            form.MdiParent = this;
            form.Show();
        }

        private void startConversionFromJavascriptToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ConvertFromJs form = new ConvertFromJs();
            form.MdiParent = this;
            form.Show();
        }

        private void mediaTypesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MediaTypes form = new MediaTypes();
            form.MdiParent = this;
            form.Show();
        }

        private void internalAndExternalLinksToolStripMenuItem_Click(object sender, EventArgs e)
        {
            HtmlToPdfConverterLinks form = new HtmlToPdfConverterLinks();
            form.MdiParent = this;
            form.Show();
        }

        private void partialPageConversionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PartialConversion form = new PartialConversion();
            form.MdiParent = this;
            form.Show();
        }

        private void excludeElementsFromConversionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ExcludeFromConversion form = new ExcludeFromConversion();
            form.MdiParent = this;
            form.Show();
        }

        private void contentsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("http://selectpdf.com/docs/");
        }
    }
}
