public static void ShowDocumentWindow(ObservableNSDocument document, Func <IDialog <object>, Window> window) { Fusion.Application.MainThread.Schedule(() => { var childWindow = new MacDialog <object>(); var handle = WindowImplementation.Create(window(childWindow), Optional.Some(document)); childWindow._parent = handle; childWindow._onClose = () => Fusion.Application.MainThread.Schedule(document.Close); document.AddWindowController(new DocumentWindowController(handle)); }); }
public Task <IDocument> OpenDocument(AbsoluteFilePath path, bool giveFocus = false) { return(ObservableNSDocument.Open(path, giveFocus)); }