Inheritance: WebKit.WebView, IWebFrameLoadDelegate
Beispiel #1
0
 public ModalWindow(WebAuthenticatorWebView webView, CGRect rect) : base(rect, GetStyle(webView), NSBackingStore.Buffered, false)
 {
     webview       = new WeakReference(webView);
     webView.Frame = rect;
     ContentView   = webView;
     IsVisible     = false;
     Title         = webView.Authenticator.Title;
     this.Delegate = this;
 }
Beispiel #2
0
            static NSWindowStyle GetStyle(WebAuthenticatorWebView webView)
            {
                var baseStyle = NSWindowStyle.Titled | NSWindowStyle.Resizable;

                if (webView.Authenticator.AllowsCancel)
                {
                    baseStyle = baseStyle | NSWindowStyle.Closable;
                }
                return(baseStyle);
            }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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();
        }
Beispiel #5
0
		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 ();
		}