Scaffolding to support Print with PrintHandlers... eventually
This commit is contained in:
parent
11250d21eb
commit
64f36a9f1f
@ -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();
|
||||
|
||||
@ -37,6 +37,8 @@ namespace UniversalEditor.UserInterface
|
||||
void CloseFile();
|
||||
void CloseProject();
|
||||
void CloseWindow();
|
||||
|
||||
void PrintDocument();
|
||||
|
||||
Editor GetCurrentEditor();
|
||||
|
||||
|
||||
@ -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 ();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user