Beispiel #1
0
 private void UpdateDropboxStatus()
 {
     if (OAuthInfo.CheckOAuth(Config.DropboxOAuthInfo) && Config.DropboxAccountInfo != null)
     {
         StringBuilder sb = new StringBuilder();
         sb.AppendLine("Login status: Successful");
         sb.AppendLine("Email: " + Config.DropboxAccountInfo.Email);
         sb.AppendLine("Name: " + Config.DropboxAccountInfo.Display_name);
         sb.AppendLine("User ID: " + Config.DropboxAccountInfo.Uid.ToString());
         string uploadPath = GetDropboxUploadPath();
         sb.AppendLine("Upload path: " + uploadPath);
         sb.AppendLine("Download path: " + Dropbox.GetDropboxURL(Config.DropboxAccountInfo.Uid, uploadPath, "{Filename}"));
         lblDropboxStatus.Text       = sb.ToString();
         btnDropboxShowFiles.Enabled = true;
     }
     else
     {
         lblDropboxStatus.Text = "Login status: Authorize required";
     }
 }