private void ShowPrintPreview()
        {
            TextPrinter textPrinter = this._textPrinter;

            textPrinter.Title           = this.Text;
            textPrinter.ShowPageNumbers = true;
            textPrinter.TextToPrint     = this.txtMessageLog.Text;
            textPrinter.Font            = this.txtMessageLog.Font;
            textPrinter.ShowPrintPreview();
            textPrinter = null;
        }
        private void PrintReport(bool showPrintDialog)
        {
            TextPrinter textPrinter = this._textPrinter;

            textPrinter.Title           = this.Text;
            textPrinter.ShowPageNumbers = true;
            textPrinter.TextToPrint     = this.txtMessageLog.Text;
            textPrinter.Font            = this.txtMessageLog.Font;
            if (showPrintDialog)
            {
                textPrinter.ShowPrintDialog();
            }
            else
            {
                textPrinter.Print();
            }
            textPrinter = null;
        }