Esempio n. 1
0
        async private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(_accessToken))
            {
                OrganizationsList.Visibility = Visibility.Collapsed;
                AuthBrowser.Visibility       = Visibility.Visible;

                var url =
                    Common.FormatAuthUrl(
                        AuthorizationEndpointUrl,
                        ResponseTypes.Token,
                        ConsumerKey,
                        CallbackUrl,
                        DisplayTypes.Touch);

                AuthBrowser.Navigate(new Uri(url));

                return;
            }

            var client   = new ForceClient(_instanceUrl, _accessToken, ApiVersion);
            var accounts = await client.QueryAsync <Account>("SELECT id, name, description FROM Account");

            OrganizationsList.ItemsSource = accounts.records;

            OrganizationsList.Visibility = Visibility.Visible;
            AuthBrowser.Visibility       = Visibility.Collapsed;
        }
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            Uri targetUri = new Uri(@"https://instagram.com/accounts/logout/");

            ProgressBar.IsIndeterminate = true;
            ProgressBar.Visibility      = Visibility.Visible;
            //AuthBrowser.Navigate(targetUri);
            AuthBrowser.Navigate(targetUri2);
        }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (hashval.Text != " " || hashval.Text != null)
     {
         hashvalue                   = hashval.Text;
         Title.Text                  = "#" + hashval.Text;
         BackgroundTb.Text           = "#" + hashval.Text;
         ProgressBar.IsIndeterminate = true;
         ProgressBar.Visibility      = Visibility.Visible;
         AuthBrowser.Navigate(targetUri2);
     }
 }
Esempio n. 4
0
 public AuthotizationPage()
 {
     InitializeComponent();
     AuthBrowser.Navigate(new Uri(VkHelper.AuthorizationUrl));
 }
Esempio n. 5
0
 public AuthWindow()
 {
     InitializeComponent();
     AuthBrowser.Navigate(string.Format("https://oauth.vk.com/authorize?client_id={0}&display=page&redirect_uri=https://oauth.vk.com/blank.html&scope={1}&response_type=token&v=5.45&revoke=1", Repository.client_id, Repository.scope));
 }
Esempio n. 6
0
 public AuthWindow(string url)
 {
     InitializeComponent();
     HideScriptErrors(AuthBrowser, true);
     AuthBrowser.Navigate(url);
 }
Esempio n. 7
0
 public AuthWindow()
 {
     InitializeComponent();
     HideScriptErrors(AuthBrowser, true);
     AuthBrowser.Navigate(VKSession.Instance.GetAuthURL());
 }
Esempio n. 8
0
 private void button1_Click(object sender, EventArgs e)
 {
     AuthBrowser.Navigate("https://m.vk.com/");
 }
Esempio n. 9
0
 private void Auth_Load(object sender, EventArgs e)
 {
     AuthBrowser.Navigate("https://m.vk.com/feed");
 }