private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Uri loginUrl;

            if (_url == "")
            {
                if (Kernel.FacebookClient != null)
                {
                    return;
                }

                var          fb          = new FacebookClient();
                const string redirectUrl = "https://www.facebook.com/connect/login_success.html";
                loginUrl = fb.GetLoginUrl(new
                {
                    client_id     = 1514638988814629,
                    redirect_uri  = redirectUrl,
                    scope         = Permissions,
                    display       = "popup",
                    response_type = "token"
                });
            }
            else
            {
                var logoutParameters = new Dictionary <string, object>
                {
                    { "next", "http://votc.bitflash.xyz" }
                };
                loginUrl = Kernel.FacebookClient.GetLogoutUrl(logoutParameters);
            }
            Webbrowser.Navigated += WebBrowserNavigated;
            Webbrowser.Navigate(loginUrl);
        }
Exemplo n.º 2
0
 public BrowserView(Uri adress, string username, byte[] encryptedPassword)
 {
     InitializeComponent();
     _username          = username;
     _encryptedPassword = encryptedPassword;
     _isLoginAttempt    = true;
     Webbrowser.Navigate(adress.AbsoluteUri);
 }
Exemplo n.º 3
0
        public TestView()
        {
            InitializeComponent();
            // Load the page
            var adress = new Uri("https://www.amazon.de/ap/signin?showRememberMe=false&openid.pape.max_auth_age=0&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&pageId=deflex&ignoreAuthState=1&openid.return_to=https%3A%2F%2Fwww.amazon.de%2F%3Fref_%3Dnav_signin&prevRID=T028TS6C1NMGVZ4Y8B9B&openid.assoc_handle=deflex&openid.mode=checkid_setup&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&prepopulatedLoginId=eyJjaXBoZXIiOiJ0d1VzTS9wRTQrcGM4WFY1NzQrdFp3PT0iLCJ2ZXJzaW9uIjoxLCJJViI6Ims3Sm9GMWJncVFjS29kaWIyQk1RK2c9PSJ9&failedSignInCount=0&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&timestamp=1579545861000");

            Webbrowser.Navigate(adress);
            _isRun = false;
        }
Exemplo n.º 4
0
 private void GoBack_Button_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         Webbrowser.GoBack();
     }
     catch (Exception ex)
     {
         Communication.InformUser("Can't go back.");
         Logger.log.Error($"Couldnt navigate page back: {ex}");
     }
 }
Exemplo n.º 5
0
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                if (Kernel.TwitterClient != null)
                {
                    return;
                }
                Kernel.TwitterClient = new TwitterService("bcPdqSrMo2zSoLRjvE20Z2B93", "2DPgdd0qqnpOxbglUMWs4okLjNL3IMgbuQezLCgwMr1XH4kYpw");

                _requestToken = Kernel.TwitterClient.GetRequestToken();
                var authUrl = Kernel.TwitterClient.GetAuthorizationUri(_requestToken).ToString();
                Webbrowser.Navigate(authUrl);
            }
            catch (Exception E)
            {
                MessageBox.Show(E.Message);
            }
        }
Exemplo n.º 6
0
        public static Webbrowser PreviewWebpage(string path)
        {
            if (web_preview != null)
            {
                web_preview.Web.Source = new Uri(path);
                web_preview.Web.Refresh();
                return(web_preview);
            }
            LayoutDocumentPane documentPane = new LayoutDocumentPane();
            LayoutDocument     document     = new LayoutDocument();

            document.Title = "WebPreview";
            Webbrowser web = new Webbrowser();

            document.Content = web;
            documentPane.Children.Add(document);
            var parent = (LayoutDocumentPaneGroup)MainWindow.instance.DockManager.Layout.Descendents().OfType <LayoutDocumentPane>().FirstOrDefault().Parent;

            parent.Children.Add(documentPane);
            web_preview = web; web_preview.Web.Source = new Uri(path);
            return(web_preview);
        }