當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。