Misc small changes for code quality.

This commit is contained in:
Robin 2016-08-31 22:30:00 +02:00
parent ada50c429a
commit 4dd67df1dd
8 changed files with 17 additions and 17 deletions

View file

@ -37,7 +37,7 @@ namespace GreenshotConfluencePlugin {
Regex pageIdRegex = new Regex(@"pageId=(\d+)");
Regex spacePageRegex = new Regex(@"\/display\/([^\/]+)\/([^#]+)");
foreach(string browserurl in GetBrowserUrls()) {
string url = null;
string url;
try {
url = Uri.UnescapeDataString(browserurl).Replace("+", " ");
} catch {

View file

@ -66,10 +66,11 @@ namespace GreenshotConfluencePlugin {
string displayKey = GetDisplayKeyValue(a);
object enumValue = field.GetValue(null);
string displayString = null;
string displayString;
if (displayKey != null && Language.hasKey(displayKey)) {
displayString = Language.GetString(displayKey);
} if (displayKey != null) {
}
if (displayKey != null) {
displayString = displayKey;
} else {
displayString = enumValue.ToString();

View file

@ -54,13 +54,13 @@ namespace GreenshotDropboxPlugin {
public override ExportInformation ExportCapture(bool manually, ISurface surface, ICaptureDetails captureDetails) {
ExportInformation exportInformation = new ExportInformation(Designation, Description);
string uploadURL = null;
bool uploaded = plugin.Upload(captureDetails, surface, out uploadURL);
string uploadUrl;
bool uploaded = plugin.Upload(captureDetails, surface, out uploadUrl);
if (uploaded) {
exportInformation.Uri = uploadURL;
exportInformation.Uri = uploadUrl;
exportInformation.ExportMade = true;
if (config.AfterUploadLinkToClipBoard) {
ClipboardHelper.SetClipboardData(uploadURL);
ClipboardHelper.SetClipboardData(uploadUrl);
}
}
ProcessExport(exportInformation, surface);

View file

@ -71,7 +71,7 @@ namespace ExternalCommand {
listView1.SmallImageList = imageList;
int imageNr = 0;
foreach(string commando in config.Commands) {
ListViewItem item = null;
ListViewItem item;
Image iconForExe = IconCache.IconForCommand(commando);
if(iconForExe != null) {
imageList.Images.Add(iconForExe);

View file

@ -58,9 +58,9 @@ namespace GreenshotImgurPlugin {
public override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) {
ExportInformation exportInformation = new ExportInformation(Designation, Description);
string uploadURL = null;
exportInformation.ExportMade = plugin.Upload(captureDetails, surface, out uploadURL);
exportInformation.Uri = uploadURL;
string uploadUrl;
exportInformation.ExportMade = plugin.Upload(captureDetails, surface, out uploadUrl);
exportInformation.Uri = uploadUrl;
ProcessExport(exportInformation, surface);
return exportInformation;
}

View file

@ -54,11 +54,11 @@ namespace GreenshotPicasaPlugin {
public override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) {
ExportInformation exportInformation = new ExportInformation(Designation, Description);
string uploadURL = null;
bool uploaded = plugin.Upload(captureDetails, surface, out uploadURL);
string uploadUrl;
bool uploaded = plugin.Upload(captureDetails, surface, out uploadUrl);
if (uploaded) {
exportInformation.ExportMade = true;
exportInformation.Uri = uploadURL;
exportInformation.Uri = uploadUrl;
}
ProcessExport(exportInformation, surface);
return exportInformation;

View file

@ -62,7 +62,7 @@ namespace GreenshotPlugin.Core {
private readonly IAccessible accessible;
private Accessible[] Children {
get {
int num = 0;
int num;
object[] res = GetAccessibleChildren(accessible, out num);
if (res == null) {
return new Accessible[0];

View file

@ -62,9 +62,8 @@ namespace GreenshotPlugin.Core {
int index = 0;
IDictionary<string, object> value = ParseValue(charArray, ref index, ref success) as IDictionary<string, object>;
return value;
} else {
return null;
}
return null;
}
protected static IDictionary<string, object> ParseObject(char[] json, ref int index, ref bool success) {