public bool Print(bool showPrintDialog)
{
if (showPrintDialog)
{
var pd = new PrintDialog
{
Document = this._printDocument,
UseEXDialog = true,
AllowCurrentPage = true,
AllowSelection = true,
AllowSomePages = true,
PrinterSettings = this.PageSettings.PrinterSettings
};
if (pd.ShowDialog(Scintilla) == DialogResult.OK)
{
this._printDocument.PrinterSettings = pd.PrinterSettings;
this._printDocument.Print();
return true;
}
return false;
}
this._printDocument.Print();
return true;
}