private void PrintButton_Click(object sender, EventArgs e)
        {
            WorkoutPrintDocument printDocument = new WorkoutPrintDocument(m_WorkoutsToPrint,
                                                                          InkFriendlyCheckBox.Checked,
                                                                          UnrollRepeatsCheckBox.Checked);
            PrintDialog printDialog = new PrintDialog();

            printDocument.DefaultPageSettings = m_DocumentPageSettings;
            printDialog.Document = printDocument;

            if (printDialog.ShowDialog() == DialogResult.OK)
            {
                printDocument.Print();
                Close();

                if (m_PrintPreviewDialog != null)
                {
                    m_PrintPreviewDialog.Close();
                    m_PrintPreviewDialog = null;
                }
            }
        }
        private void PrintPreviewButton_Click(object sender, EventArgs e)
        {
            m_WorkoutDocument = new WorkoutPrintDocument(m_WorkoutsToPrint,
                                                         InkFriendlyCheckBox.Checked,
                                                         UnrollRepeatsCheckBox.Checked);
            m_PrintPreviewDialog = new PrintPreviewDialog();
            ToolStrip previewStrip = m_PrintPreviewDialog.Controls["ToolStrip1"] as ToolStrip;

            if (previewStrip != null)
            {
                m_PrintPreviewToolStripButton = previewStrip.Items["PrintToolStripButton"] as ToolStripButton;

                if (m_PrintPreviewToolStripButton != null)
                {
                    m_PrintPreviewToolStripButton.MouseDown += new MouseEventHandler(printButton_MouseDown);
                    m_PrintPreviewToolStripButton.MouseUp += new MouseEventHandler(PrintButton_Click);
                }
            }

            m_WorkoutDocument.DefaultPageSettings = m_DocumentPageSettings;

            m_PrintPreviewDialog.Document = m_WorkoutDocument;

            if (m_DocumentPageSettings.Landscape)
            {
                m_PrintPreviewDialog.MinimumSize = new Size(600, 400);
            }
            else
            {
                m_PrintPreviewDialog.MinimumSize = new Size(400, 600);
            }

            m_PrintPreviewDialog.ShowDialog();
        }