当前位置: 首页>>代码示例>>C#>>正文


C# Content.PrintingSettings类代码示例

本文整理汇总了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."));
		}
开发者ID:nocache,项目名称:monodevelop,代码行数:21,代码来源:SourceEditorView.cs

示例2: PrintDocument

		public void PrintDocument (PrintingSettings settings)
		{
			RunPrintOperation (PrintOperationAction.PrintDialog, settings);
		}
开发者ID:nocache,项目名称:monodevelop,代码行数:4,代码来源:SourceEditorView.cs

示例3: PrintPreviewDocument

		public void PrintPreviewDocument (PrintingSettings settings)
		{
			RunPrintOperation (PrintOperationAction.Preview, settings);
		}
开发者ID:nocache,项目名称:monodevelop,代码行数:4,代码来源:SourceEditorView.cs

示例4: PrintPreviewDocument

 public void PrintPreviewDocument(PrintingSettings settings)
 {
     throw new NotImplementedException ();
 }
开发者ID:erbriones,项目名称:monodevelop-classdesigner,代码行数:4,代码来源:AbstractDesigner.cs


注:本文中的MonoDevelop.Ide.Gui.Content.PrintingSettings类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。