mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 10:47:02 -07:00
Added direct printing to the default printer
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1799 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
514a36751f
commit
9ed8f5e191
1 changed files with 4 additions and 1 deletions
|
@ -88,7 +88,7 @@ namespace Greenshot.Destinations {
|
|||
}
|
||||
|
||||
public override IEnumerable<IDestination> DynamicDestinations() {
|
||||
foreach (string printer in System.Drawing.Printing.PrinterSettings.InstalledPrinters) {
|
||||
foreach (string printer in PrinterSettings.InstalledPrinters) {
|
||||
yield return new PrinterDestination(printer);
|
||||
}
|
||||
}
|
||||
|
@ -98,6 +98,9 @@ namespace Greenshot.Destinations {
|
|||
using (Image image = surface.GetImageForExport()) {
|
||||
if (!string.IsNullOrEmpty(printerName)) {
|
||||
printerSettings = new PrintHelper(image, captureDetails).PrintTo(printerName);
|
||||
} else if (!manuallyInitiated) {
|
||||
PrinterSettings settings = new PrinterSettings();
|
||||
printerSettings = new PrintHelper(image, captureDetails).PrintTo(settings.PrinterName);
|
||||
} else {
|
||||
printerSettings = new PrintHelper(image, captureDetails).PrintWithDialog();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue