Added a copy of the .pdb when in debug modus, this allows us to debug plugins.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2053 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-09-18 19:48:19 +00:00
commit e40db9ef28
6 changed files with 20 additions and 6 deletions

View file

@ -102,6 +102,7 @@
<PreBuildEvent>"$(SolutionDir)\tools\TortoiseSVN\SubWCRev.exe" "$(ProjectDir)\" "$(ProjectDir)\Properties\AssemblyInfo.cs.template" "$(ProjectDir)\Properties\AssemblyInfo.cs"</PreBuildEvent>
<PostBuildEvent>mkdir "$(SolutionDir)bin\$(Configuration)\Plugins\$(ProjectName)"
copy "$(ProjectDir)bin\$(Configuration)\$(TargetFileName)" "$(SolutionDir)bin\$(Configuration)\Plugins\$(ProjectName)\*.gsp"
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)bin\$(Configuration)\Plugins\$(ProjectName)\"
mkdir "$(SolutionDir)bin\$(Configuration)\Languages\Plugins\$(ProjectName)"
copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)bin\$(Configuration)\Languages\Plugins\$(ProjectName)\"</PostBuildEvent>
</PropertyGroup>

View file

@ -63,24 +63,33 @@ namespace GreenshotPhotobucketPlugin {
oAuth.BrowserHeight = 400;
oAuth.CheckVerifier = false;
oAuth.LoginTitle = "Photobucket authorization";
oAuth.Token = config.PhotobucketToken;
oAuth.TokenSecret = config.PhotobucketTokenSecret;
Dictionary<string ,string> parameters = new Dictionary<string, string>();
// add album
parameters.Add("identifier", "greenshot");
//parameters.Add("identifier", "Apex75/greenshot");
// add type
parameters.Add("type", "base64");
// Add image
parameters.Add("uploadfile", System.Convert.ToBase64String(imageData, 0, dataLength));
// add title
if (title != null) {
parameters.Add("title", title);
//parameters.Add("title", title);
}
// add filename
if (filename != null) {
parameters.Add("filename", filename);
//parameters.Add("filename", filename);
}
try {
responseString = oAuth.oAuthWebRequest(HTTPMethod.POST, "http://api.photobucket.com/album/greenshot/upload.xml", parameters, null, null);
} finally {
if (!string.IsNullOrEmpty(oAuth.Token)) {
config.PhotobucketToken = oAuth.Token;
}
if (!string.IsNullOrEmpty(oAuth.TokenSecret)) {
config.PhotobucketTokenSecret = oAuth.TokenSecret;
}
}
responseString = oAuth.oAuthWebRequest(HTTPMethod.POST, "http://api.photobucket.com/album/greenshot/upload", parameters, null, null);
oAuth.Token = config.PhotobucketToken;
oAuth.TokenSecret = config.PhotobucketTokenSecret;
LOG.Info(responseString);
PhotobucketInfo PhotobucketInfo = PhotobucketInfo.ParseResponse(responseString);
LOG.Debug("Upload to Photobucket was finished");