本文整理汇总了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 ();
}