public static async void ShowWebivew(WebAuthenticatorWebView webview) { var app = NSApplication.SharedApplication; var rect = new CoreGraphics.CGRect(0, 0, 400, 600); window = new ModalWindow(webview, rect); while (shownInWindow == null) { shownInWindow = app.MainWindow; if (shownInWindow == null) { await Task.Delay(1000); } } webview.BeginLoadingInitialUrl(); app.RunModalForWindow(window); //app.BeginSheet (window, shownInWindow); }
public static async void ShowWebivew(WebAuthenticatorWebView webview) { var app = NSApplication.SharedApplication; var rect = new CoreGraphics.CGRect(0, 0, 400, 600); webview.Frame = rect; window = new NSWindow(rect, NSWindowStyle.Closable | NSWindowStyle.Titled, NSBackingStore.Buffered, false); window.ContentView = webview; window.IsVisible = false; window.Title = webview.Authenticator.Title; while (shownInWindow == null) { shownInWindow = app.MainWindow; if (shownInWindow == null) { await Task.Delay(1000); } } app.BeginSheet(window, shownInWindow); webview.BeginLoadingInitialUrl(); }
public static async void ShowWebivew(WebAuthenticatorWebView webview) { var app = NSApplication.SharedApplication; var rect = new CoreGraphics.CGRect (0, 0, 400, 600); webview.Frame = rect; window = new NSWindow (rect, NSWindowStyle.Closable | NSWindowStyle.Titled, NSBackingStore.Buffered, false); window.ContentView = webview; window.IsVisible = false; window.Title = webview.Authenticator.Title; while (shownInWindow == null) { shownInWindow = app.MainWindow; if (shownInWindow == null) await Task.Delay (1000); } app.BeginSheet (window, shownInWindow); webview.BeginLoadingInitialUrl (); }