Skip to content

Commit

Permalink
add pageSetup method
Browse files Browse the repository at this point in the history
  • Loading branch information
sn31 committed Nov 28, 2018
1 parent 4b71819 commit d6cbceb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions TextEditor/AppDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,6 @@ public override bool OpenFile(NSApplication sender, string filename)
}
}


}
}
1 change: 1 addition & 0 deletions TextEditor/Classes/EditorWindowDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,6 @@ public override bool WindowShouldClose(Foundation.NSObject sender){
}
return true;
}

}
}
22 changes: 22 additions & 0 deletions TextEditor/WindowController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,28 @@ public void SaveDocumentAs(NSObject sender)
}
SaveDocument();
}

public NSPrintInfo PrintInfo { get; set; } = new NSPrintInfo();
[Action("runPageLayout:")]
public void RunPageLayout(NSObject sender)
{

// Define objects
var dlg = new NSPageLayout();

// Display dialog
dlg.BeginSheet(PrintInfo, Window, () => {
// Handle layout change
});

}

//[Action("print:")]
//public void PrintDocument(NSObject sender)
//{
// var EditorViewController = AppDelegate.FindViewController(Window.ContentViewController) as ViewController;
// EditorViewController.PrintDocument(PrintInfo);
//}
}
}

0 comments on commit d6cbceb

Please sign in to comment.