public MsalAuthenticationAgentUIViewController(string url, string callback, ReturnCodeCallback callbackMethod)
 {
     this.url            = url;
     this.callback       = callback;
     this.callbackMethod = callbackMethod;
     NSUrlProtocol.RegisterClass(new ObjCRuntime.Class(typeof(CoreCustomUrlProtocol)));
 }
 public AuthenticationAgentUIViewController(string url, string callback, ReturnCodeCallback callbackMethod)
 {
     this._url = url;
     this._callback = callback;
     this.callbackMethod = callbackMethod;
     NSUrlProtocol.RegisterClass(new ObjCRuntime.Class(typeof(MsalCustomUrlProtocol)));
 }
        public AuthenticationAgentGtkWindowController(string url, string callback, ReturnCodeCallback callbackMethod)
        {
            this.url            = url;
            this.callback       = callback;
            this.callbackMethod = callbackMethod;


            Height               = DEFAULT_WINDOW_HEIGHT;
            Width                = DEFAULT_WINDOW_WIDTH;
            Resizable            = false;
            Padding              = 0;
            this.InitialLocation = WindowLocation.CenterParent;

            // UA is:
            // Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/538.15 (KHTML, like Gecko) Version/8.0 Safari/538.15

            webView                = new WebView(this.url);
            progressIndicator      = new ProgressBar();
            webView.NavigateToUrl += WebView_NavigateToUrl;
            webView.Loaded        += (sender, e) => { Application.Invoke(delegate { progressIndicator.Indeterminate = false; progressIndicator.Fraction = 0; }); };
            webView.Loading       += (sender, e) => { Application.Invoke(delegate { progressIndicator.Indeterminate = true; }); };
            var scrollHolder = new ScrollView(webView);
            var vbox1        = new VBox();

            vbox1.Margin = 0;
            vbox1.PackStart(scrollHolder, true, true);
            vbox1.PackStart(progressIndicator, false, false);
            Content = vbox1;
        }
예제 #4
0
 public AuthenticationAgentNSWindowController(string url, string callback, ReturnCodeCallback callbackMethod)
     : base("PlaceholderNibNameToForceWindowLoad")
 {
     _url            = url;
     _callback       = callback;
     _callbackMethod = callbackMethod;
     NSUrlProtocol.RegisterClass(new ObjCRuntime.Class(typeof(CoreCustomUrlProtocol)));
 }
 public AuthenticationAgentUIViewController(string url, string callback, ReturnCodeCallback callbackMethod)
 {
     this.url            = url;
     this.callback       = callback;
     this.callbackMethod = callbackMethod;
 }
 public AuthenticationAgentUIViewController(string url, string callback, ReturnCodeCallback callbackMethod)
 {
     this.url = url;
     this.callback = callback;
     this.callbackMethod = callbackMethod;
 }