Пример #1
0
 public WebAuthenticatorWebView(WebAuthenticator authenticator)
 {
     this.Authenticator = authenticator;
     MonitorAuthenticator();
     this.FrameLoadDelegate = this;
     if (!string.IsNullOrEmpty(UserAgent))
     {
         this.ApplicationNameForUserAgent = UserAgent;
         this.CustomUserAgent             = UserAgent;
     }
 }
Пример #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();
        }
Пример #3
0
 public WebAuthenticatorWebView(WebAuthenticator authenticator)
 {
     this.Authenticator = authenticator;
     MonitorAuthenticator();
     this.FrameLoadDelegate = this;
 }
Пример #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();
		}
Пример #5
0
		public WebAuthenticatorWebView(WebAuthenticator authenticator)
		{
			this.Authenticator = authenticator;
			MonitorAuthenticator ();
			this.FrameLoadDelegate = this;
		}