Ejemplo n.º 1
0
 public WebAuthenticatorWebView(WebAuthenticator authenticator)
 {
     this.Authenticator = authenticator;
     MonitorAuthenticator();
     this.FrameLoadDelegate = this;
     if (!string.IsNullOrEmpty(UserAgent))
     {
         this.ApplicationNameForUserAgent = UserAgent;
         this.CustomUserAgent             = UserAgent;
     }
 }
Ejemplo n.º 2
0
        public static async void ShowWebivew(WebAuthenticator 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();
        }
Ejemplo n.º 3
0
 public WebAuthenticatorWebView(WebAuthenticator authenticator)
 {
     this.Authenticator = authenticator;
     MonitorAuthenticator();
     this.FrameLoadDelegate = this;
 }
Ejemplo n.º 4
0
		public static void ShowWebivew(WebAuthenticator 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;

			app.BeginSheet(window,app.MainWindow);
			webview.BeginLoadingInitialUrl();
		}
Ejemplo n.º 5
0
		public WebAuthenticatorWebView(WebAuthenticator authenticator)
		{
			this.Authenticator = authenticator;
			MonitorAuthenticator ();
			this.FrameLoadDelegate = this;
		}