Print(プリンタ)を実装する方法を示すMonoMacのサンプルを知っている人はいますか?私は1つを見つけることができませんでした。MonoMacのサンプルを印刷
1
A
答えて
1
私は1つのか分からないが、Appleからの概念的なドキュメントが関連している、そしてそのサンプルスニペットは、C#にポートに簡単です:https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Printing/Printing.html
0
私は少し、このようなのPrintDocumentクラスを作成しました: (
public class PrintDocument:NSView {
NSPrintOperation MyPrinter = null;
static IntPtr selCurrentContext = Selector.GetHandle ("currentContext");
static IntPtr classNSGraphicsContext = Class.GetHandle ("NSGraphicsContext");
public PrintDocument()
{
MyPrinter=NSPrintOperation.FromView(this);
this.SetFrameSize(new SizeF(600,800));
}
public void Print()
{
MyPrinter.RunOperation()
}
public override void DrawRect (RectangleF dirtyRect)
{
var context = new NSGraphicsContext (Messaging.IntPtr_objc_msgSend (classNSGraphicsContext, selCurrentContext));
//NSPrintOperation.CurrentOperation
}
}
関連する問題
- 1. Pandasのデータフレームからサンプルの列セットを印刷しますか?
- 2. 印刷したい印刷
- 3. wpf印刷/印刷プレビューusercontrol
- 4. UWP印刷:FontFamily、印刷の問題
- 5. Excelの印刷プレビュー - >印刷
- 6. MonoMacのアプリケーションシャットダウン
- 7. 印刷、変更、印刷Bash変数
- 8. Clojure印刷機能:pr対印刷
- 9. 同期PDF印刷と標準印刷
- 10. 印刷
- 11. 印刷
- 12. 印刷
- 13. 印刷
- 14. アスキーチャートを印刷
- 15. *パターンを印刷
- 16. 印刷アウトバイナリツリーを
- 17. 印刷Pythonの
- 18. RadGridの印刷
- 19. マルチセレクトオプションの印刷
- 20. DataGridviewの印刷
- 21. TDBGridの印刷
- 22. フリーモナドの印刷
- 23. ファイルタイプの印刷
- 24. Mechanizeの印刷
- 25. C#の印刷
- 26. グラフィックスオブジェクトの印刷
- 27. DOMの印刷
- 28. getOrgChartの印刷
- 29. ハッシュテーブルの印刷
- 30. チェッカーボードの印刷
はい、私は多種多様なCocoa印刷ドキュメントを読み、いくつかのObjective-C OS Xの書籍を印刷しています。よく現在のMonoMacにはNSViewの印刷を妨げるものがありません。 – djunod
欠けているものは何ですか?私はあなたにバグを提出することをお勧めします... –
Printing&Paginationメソッドについては、NSViewのリファレンスを参照してください。 MonoMacのバグはどこにありますか? – djunod