Scaffolding to support Print with PrintHandlers... eventually

This commit is contained in:
Michael Becker 2019-08-02 14:24:56 -04:00
parent 11250d21eb
commit 64f36a9f1f
3 changed files with 16 additions and 0 deletions

View File

@ -266,6 +266,10 @@ namespace UniversalEditor.UserInterface
{
LastWindow.CloseProject();
});
Application.AttachCommandEventHandler("FilePrint", delegate(object sender, EventArgs e)
{
LastWindow.PrintDocument();
});
Application.AttachCommandEventHandler("FileRestart", delegate(object sender, EventArgs e)
{
RestartApplication();

View File

@ -37,6 +37,8 @@ namespace UniversalEditor.UserInterface
void CloseFile();
void CloseProject();
void CloseWindow();
void PrintDocument();
Editor GetCurrentEditor();

View File

@ -611,6 +611,16 @@ namespace UniversalEditor.UserInterface
throw new NotImplementedException();
}
public void PrintDocument()
{
Editor editor = GetCurrentEditor ();
if (editor != null) {
PrintDialog dlg = new PrintDialog ();
if (dlg.ShowDialog () == DialogResult.OK) {
}
}
}
public Editor GetCurrentEditor()
{
Pages.EditorPage page = GetCurrentEditorPage ();