本文整理匯總了C#中MonoDevelop.Ide.Gui.Content.PrintingSettings類的典型用法代碼示例。如果您正苦於以下問題:C# PrintingSettings類的具體用法?C# PrintingSettings怎麽用?C# PrintingSettings使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
PrintingSettings類屬於MonoDevelop.Ide.Gui.Content命名空間,在下文中一共展示了PrintingSettings類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: RunPrintOperation
void RunPrintOperation (PrintOperationAction action, PrintingSettings settings)
{
var op = new SourceEditorPrintOperation (TextEditor.Document, Name);
if (settings.PrintSettings != null)
op.PrintSettings = settings.PrintSettings;
if (settings.PageSetup != null)
op.DefaultPageSetup = settings.PageSetup;
//FIXME: implement in-place preview
//op.Preview += HandleOpPreview;
//FIXME: implement async on platforms that support it
var result = op.Run (action, IdeApp.Workbench.RootWindow);
if (result == PrintOperationResult.Apply)
settings.PrintSettings = op.PrintSettings;
else if (result == PrintOperationResult.Error)
//FIXME: can't show more details, GTK# GetError binding is bad
MessageService.ShowError (GettextCatalog.GetString ("Print operation failed."));
}
示例2: PrintDocument
public void PrintDocument (PrintingSettings settings)
{
RunPrintOperation (PrintOperationAction.PrintDialog, settings);
}
示例3: PrintPreviewDocument
public void PrintPreviewDocument (PrintingSettings settings)
{
RunPrintOperation (PrintOperationAction.Preview, settings);
}
示例4: PrintPreviewDocument
public void PrintPreviewDocument(PrintingSettings settings)
{
throw new NotImplementedException ();
}