Exemplo n.º 1
0
        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));
            });
        }
Exemplo n.º 2
0
 public Task <IDocument> OpenDocument(AbsoluteFilePath path, bool giveFocus = false)
 {
     return(ObservableNSDocument.Open(path, giveFocus));
 }