private void UpdateAccountInfoBlockHandler(Dropbox.Api.Users.FullAccount user)
        {
            if (user == null)
            {
                return;
            }

            //insert user info
            FULLNAME.Text = String.Format("Name : {0}", user.Name.DisplayName);
            EMAIL.Text    = String.Format("Email : {0}", user.Email);

            //Create image
            Image img    = new Image();
            Uri   imgUri = new Uri(user.ProfilePhotoUrl);

            img.Source = new BitmapImage(imgUri);
            PIC.Child  = img;
            PIC.UpdateLayout();
            this.Activate();
        }
示例#2
0
        /// <summary>
        /// Get the current account then set the label once retrieved.
        /// </summary>
        private async void SetAccountLabel()
        {
            FullAccount fullAccount = await this.dropboxTool.GetCurrentAccount();

            this.Label_Authenticated.Content = fullAccount.Name.DisplayName + " - " + fullAccount.Email;
        }
示例#3
0
        /// <summary>
        /// Async aux method to get a full account object used on other methods to retrieve info from the user
        /// </summary>
        /// <returns>Full account object</returns>
        private static async Task <Dropbox.Api.Users.FullAccount> getAccount(DropboxClient dbx)
        {
            Dropbox.Api.Users.FullAccount cuenta = await dbx.Users.GetCurrentAccountAsync();

            return(cuenta);
        }