mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Misc small changes for code quality.
This commit is contained in:
parent
ada50c429a
commit
4dd67df1dd
8 changed files with 17 additions and 17 deletions
|
@ -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 {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue