mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
Replace all string.Empty with ""
This commit is contained in:
parent
add923d914
commit
cb7a621b73
60 changed files with 141 additions and 142 deletions
|
@ -153,7 +153,7 @@ public bool IsValidImage
|
||||||
public MyPictureBox()
|
public MyPictureBox()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Text = string.Empty;
|
Text = "";
|
||||||
pbMain.BackColor = SystemColors.Control;
|
pbMain.BackColor = SystemColors.Control;
|
||||||
pbMain.InitialImage = Resources.Loading;
|
pbMain.InitialImage = Resources.Loading;
|
||||||
pbMain.ErrorImage = Resources.cross;
|
pbMain.ErrorImage = Resources.cross;
|
||||||
|
|
|
@ -70,7 +70,7 @@ private void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
|
||||||
|
|
||||||
if (FileCheckCompleted != null)
|
if (FileCheckCompleted != null)
|
||||||
{
|
{
|
||||||
string result = string.Empty;
|
string result = "";
|
||||||
|
|
||||||
if (!e.Cancelled)
|
if (!e.Cancelled)
|
||||||
{
|
{
|
||||||
|
|
|
@ -134,7 +134,7 @@ public static string ToBase(this int value, int radix, string digits)
|
||||||
throw new ArgumentOutOfRangeException("radix", radix, string.Format("Radix has to be > 2 and < {0}", digits.Length));
|
throw new ArgumentOutOfRangeException("radix", radix, string.Format("Radix has to be > 2 and < {0}", digits.Length));
|
||||||
}
|
}
|
||||||
|
|
||||||
string result = string.Empty;
|
string result = "";
|
||||||
int quotient = Math.Abs(value);
|
int quotient = Math.Abs(value);
|
||||||
while (0 < quotient)
|
while (0 < quotient)
|
||||||
{
|
{
|
||||||
|
|
|
@ -38,28 +38,28 @@ public static bool Contains(this string str, string value, StringComparison comp
|
||||||
|
|
||||||
public static string Left(this string str, int length)
|
public static string Left(this string str, int length)
|
||||||
{
|
{
|
||||||
if (length < 1) return string.Empty;
|
if (length < 1) return "";
|
||||||
if (length < str.Length) return str.Substring(0, length);
|
if (length < str.Length) return str.Substring(0, length);
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string Right(this string str, int length)
|
public static string Right(this string str, int length)
|
||||||
{
|
{
|
||||||
if (length < 1) return string.Empty;
|
if (length < 1) return "";
|
||||||
if (length < str.Length) return str.Substring(str.Length - length);
|
if (length < str.Length) return str.Substring(str.Length - length);
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string RemoveLeft(this string str, int length)
|
public static string RemoveLeft(this string str, int length)
|
||||||
{
|
{
|
||||||
if (length < 1) return string.Empty;
|
if (length < 1) return "";
|
||||||
if (length < str.Length) return str.Remove(0, length);
|
if (length < str.Length) return str.Remove(0, length);
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string RemoveRight(this string str, int length)
|
public static string RemoveRight(this string str, int length)
|
||||||
{
|
{
|
||||||
if (length < 1) return string.Empty;
|
if (length < 1) return "";
|
||||||
if (length < str.Length) return str.Remove(str.Length - length);
|
if (length < str.Length) return str.Remove(str.Length - length);
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,7 +155,7 @@ public static string GetElementValue(this XElement xe, XName name)
|
||||||
if (xeItem != null) return xeItem.Value;
|
if (xeItem != null) return xeItem.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetAttributeValue(this XElement xe, string name)
|
public static string GetAttributeValue(this XElement xe, string name)
|
||||||
|
@ -166,7 +166,7 @@ public static string GetAttributeValue(this XElement xe, string name)
|
||||||
if (xaItem != null) return xaItem.Value;
|
if (xaItem != null) return xaItem.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetAttributeFirstValue(this XElement xe, params string[] names)
|
public static string GetAttributeFirstValue(this XElement xe, params string[] names)
|
||||||
|
@ -181,7 +181,7 @@ public static string GetAttributeFirstValue(this XElement xe, params string[] na
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static XmlNode AppendElement(this XmlNode parent, string tagName)
|
public static XmlNode AppendElement(this XmlNode parent, string tagName)
|
||||||
|
|
|
@ -70,7 +70,7 @@ private void btnStartHashCheck_Click(object sender, EventArgs e)
|
||||||
if (hashCheck.Start(txtFilePath.Text, hashType))
|
if (hashCheck.Start(txtFilePath.Text, hashType))
|
||||||
{
|
{
|
||||||
btnStartHashCheck.Text = Resources.Stop;
|
btnStartHashCheck.Text = Resources.Stop;
|
||||||
txtResult.Text = string.Empty;
|
txtResult.Text = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,7 +151,7 @@ public static void PinUnpinTaskBar(string filePath, bool pin)
|
||||||
for (int i = 0; i < verbs.Count; i++)
|
for (int i = 0; i < verbs.Count; i++)
|
||||||
{
|
{
|
||||||
FolderItemVerb verb = verbs.Item(i);
|
FolderItemVerb verb = verbs.Item(i);
|
||||||
string verbName = verb.Name.Replace(@"&", string.Empty);
|
string verbName = verb.Name.Replace(@"&", "");
|
||||||
|
|
||||||
if ((pin && verbName.Equals("pin to taskbar", StringComparison.InvariantCultureIgnoreCase)) ||
|
if ((pin && verbName.Equals("pin to taskbar", StringComparison.InvariantCultureIgnoreCase)) ||
|
||||||
(!pin && verbName.Equals("unpin from taskbar", StringComparison.InvariantCultureIgnoreCase)))
|
(!pin && verbName.Equals("unpin from taskbar", StringComparison.InvariantCultureIgnoreCase)))
|
||||||
|
|
|
@ -142,7 +142,7 @@ public static string CombineURL(string url1, string url2)
|
||||||
|
|
||||||
if (url1Empty && url2Empty)
|
if (url1Empty && url2Empty)
|
||||||
{
|
{
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (url1Empty)
|
if (url1Empty)
|
||||||
|
@ -296,7 +296,7 @@ public static string GetDirectoryPath(string path)
|
||||||
public static List<string> GetPaths(string path)
|
public static List<string> GetPaths(string path)
|
||||||
{
|
{
|
||||||
List<string> result = new List<string>();
|
List<string> result = new List<string>();
|
||||||
string temp = string.Empty;
|
string temp = "";
|
||||||
string[] dirs = path.Split('/');
|
string[] dirs = path.Split('/');
|
||||||
foreach (string dir in dirs)
|
foreach (string dir in dirs)
|
||||||
{
|
{
|
||||||
|
|
|
@ -116,7 +116,7 @@ public string Parse(string pattern)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(pattern))
|
if (string.IsNullOrEmpty(pattern))
|
||||||
{
|
{
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder(pattern);
|
StringBuilder sb = new StringBuilder(pattern);
|
||||||
|
@ -136,7 +136,7 @@ public string Parse(string pattern)
|
||||||
sb.Replace(ReplCodeMenuEntry.pn.ToPrefixString(), ProcessName);
|
sb.Replace(ReplCodeMenuEntry.pn.ToPrefixString(), ProcessName);
|
||||||
}
|
}
|
||||||
|
|
||||||
string width = string.Empty, height = string.Empty;
|
string width = "", height = "";
|
||||||
|
|
||||||
if (ImageWidth > 0)
|
if (ImageWidth > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -165,7 +165,7 @@ public string ParseString(string text)
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CheckIdentifier(Token token)
|
private void CheckIdentifier(Token token)
|
||||||
|
|
|
@ -31,14 +31,14 @@ public static class HtmlHelper
|
||||||
{
|
{
|
||||||
public static string StartTag(string tag, string style = "", string otherFields = "")
|
public static string StartTag(string tag, string style = "", string otherFields = "")
|
||||||
{
|
{
|
||||||
string css = string.Empty;
|
string css = "";
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(style))
|
if (!string.IsNullOrEmpty(style))
|
||||||
{
|
{
|
||||||
css = string.Format(" style=\"{0}\"", style);
|
css = string.Format(" style=\"{0}\"", style);
|
||||||
}
|
}
|
||||||
|
|
||||||
string fields = string.Empty;
|
string fields = "";
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(otherFields))
|
if (!string.IsNullOrEmpty(otherFields))
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,7 +46,7 @@ public VideoThumbnailerForm(string ffmpegPath, VideoThumbnailOptions options)
|
||||||
Options = options;
|
Options = options;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Icon = ShareXResources.Icon;
|
Icon = ShareXResources.Icon;
|
||||||
txtMediaPath.Text = Options.LastVideoPath ?? string.Empty;
|
txtMediaPath.Text = Options.LastVideoPath ?? "";
|
||||||
pgOptions.SelectedObject = Options;
|
pgOptions.SelectedObject = Options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -584,7 +584,7 @@ private void DrawMagnifier(Graphics g)
|
||||||
Rectangle currentScreenRect0Based = CaptureHelpers.GetActiveScreenBounds0Based();
|
Rectangle currentScreenRect0Based = CaptureHelpers.GetActiveScreenBounds0Based();
|
||||||
int offsetX = 10, offsetY = 10, infoTextOffset = 0, infoTextPadding = 3;
|
int offsetX = 10, offsetY = 10, infoTextOffset = 0, infoTextPadding = 3;
|
||||||
Rectangle infoTextRect = Rectangle.Empty;
|
Rectangle infoTextRect = Rectangle.Empty;
|
||||||
string infoText = string.Empty;
|
string infoText = "";
|
||||||
|
|
||||||
if (Config.ShowInfo)
|
if (Config.ShowInfo)
|
||||||
{
|
{
|
||||||
|
|
|
@ -129,7 +129,7 @@ private void SelectHandle()
|
||||||
if (simpleWindowInfo != null)
|
if (simpleWindowInfo != null)
|
||||||
{
|
{
|
||||||
selectedWindow = new WindowInfo(simpleWindowInfo.Handle);
|
selectedWindow = new WindowInfo(simpleWindowInfo.Handle);
|
||||||
lblControlText.Text = selectedWindow.ClassName ?? string.Empty;
|
lblControlText.Text = selectedWindow.ClassName ?? "";
|
||||||
selectedRectangle = simpleWindowInfo.Rectangle;
|
selectedRectangle = simpleWindowInfo.Rectangle;
|
||||||
lblSelectedRectangle.Text = selectedRectangle.ToString();
|
lblSelectedRectangle.Text = selectedRectangle.ToString();
|
||||||
btnSelectRectangle.Enabled = btnCapture.Enabled = true;
|
btnSelectRectangle.Enabled = btnCapture.Enabled = true;
|
||||||
|
|
|
@ -98,7 +98,7 @@ public string ToErrorString()
|
||||||
return string.Join(Environment.NewLine, Errors);
|
return string.Join(Environment.NewLine, Errors);
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void StopUpload()
|
public virtual void StopUpload()
|
||||||
|
@ -588,7 +588,7 @@ protected string CreateQuery(Dictionary<string, string> args)
|
||||||
return string.Join("&", args.Select(x => x.Key + "=" + HttpUtility.UrlEncode(x.Value)).ToArray());
|
return string.Join("&", args.Select(x => x.Key + "=" + HttpUtility.UrlEncode(x.Value)).ToArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected string CreateQuery(string url, Dictionary<string, string> args)
|
protected string CreateQuery(string url, Dictionary<string, string> args)
|
||||||
|
@ -612,7 +612,7 @@ protected string CreateQuery(NameValueCollection args)
|
||||||
foreach (string key in args.AllKeys)
|
foreach (string key in args.AllKeys)
|
||||||
{
|
{
|
||||||
string[] values = args.GetValues(key);
|
string[] values = args.GetValues(key);
|
||||||
string isArray = values.Length > 1 ? "[]" : string.Empty;
|
string isArray = values.Length > 1 ? "[]" : "";
|
||||||
|
|
||||||
commands.AddRange(values.Select(value => key + isArray + "=" + HttpUtility.UrlEncode(value)));
|
commands.AddRange(values.Select(value => key + isArray + "=" + HttpUtility.UrlEncode(value)));
|
||||||
}
|
}
|
||||||
|
@ -620,7 +620,7 @@ protected string CreateQuery(NameValueCollection args)
|
||||||
return string.Join("&", commands.ToArray());
|
return string.Join("&", commands.ToArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected string CreateQuery(string url, NameValueCollection args)
|
protected string CreateQuery(string url, NameValueCollection args)
|
||||||
|
|
|
@ -51,7 +51,7 @@ public FTPClientForm(FTPAccount account)
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Icon = ShareXResources.Icon;
|
Icon = ShareXResources.Icon;
|
||||||
|
|
||||||
lblStatus.Text = string.Empty;
|
lblStatus.Text = "";
|
||||||
lvFTPList.SubItemEndEditing += lvFTPList_SubItemEndEditing;
|
lvFTPList.SubItemEndEditing += lvFTPList_SubItemEndEditing;
|
||||||
|
|
||||||
FtpTrace.AddListener(new TextBoxTraceListener(txtDebug));
|
FtpTrace.AddListener(new TextBoxTraceListener(txtDebug));
|
||||||
|
@ -139,7 +139,7 @@ private void LoadDirectory(string path)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lvi.SubItems.Add(string.Empty);
|
lvi.SubItems.Add("");
|
||||||
}
|
}
|
||||||
|
|
||||||
lvi.SubItems.Add(IconReader.GetDisplayName(file.Name, file.Type == FtpFileSystemObjectType.Directory));
|
lvi.SubItems.Add(IconReader.GetDisplayName(file.Name, file.Type == FtpFileSystemObjectType.Directory));
|
||||||
|
@ -215,7 +215,7 @@ private void CheckFiles(bool selected)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
string isSelected = selected ? "Selected " : string.Empty;
|
string isSelected = selected ? "Selected " : "";
|
||||||
int filesCount = items.Count(x => x.Type == FtpFileSystemObjectType.File);
|
int filesCount = items.Count(x => x.Type == FtpFileSystemObjectType.File);
|
||||||
string file = filesCount > 1 ? "files" : "file";
|
string file = filesCount > 1 ? "files" : "file";
|
||||||
int directoriesCount = items.Count(x => x.Type == FtpFileSystemObjectType.Directory);
|
int directoriesCount = items.Count(x => x.Type == FtpFileSystemObjectType.Directory);
|
||||||
|
@ -436,7 +436,7 @@ private void lvFTPList_DragDrop(object sender, DragEventArgs e)
|
||||||
if (file.Name != filename)
|
if (file.Name != filename)
|
||||||
{
|
{
|
||||||
string path = URLHelpers.CombineURL(currentDirectory, filename);
|
string path = URLHelpers.CombineURL(currentDirectory, filename);
|
||||||
string movePath = string.Empty;
|
string movePath = "";
|
||||||
if (file.Type == FtpFileSystemObjectType.Link)
|
if (file.Type == FtpFileSystemObjectType.Link)
|
||||||
{
|
{
|
||||||
if (file.Name == ".")
|
if (file.Name == ".")
|
||||||
|
|
|
@ -462,7 +462,7 @@ public ListViewItem Item
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SubItemEndEditingEventArgs : SubItemEventArgs
|
public class SubItemEndEditingEventArgs : SubItemEventArgs
|
||||||
{
|
{
|
||||||
private string _text = string.Empty;
|
private string _text = "";
|
||||||
private bool _cancel = true;
|
private bool _cancel = true;
|
||||||
|
|
||||||
public SubItemEndEditingEventArgs(ListViewItem item, int subItem, string display, bool cancel) :
|
public SubItemEndEditingEventArgs(ListViewItem item, int subItem, string display, bool cancel) :
|
||||||
|
|
|
@ -230,7 +230,7 @@ public string CreatePublicURL(string path, CopyURLType urlType = CopyURLType.Def
|
||||||
return GetLinkURL(link, path, urlType);
|
return GetLinkURL(link, path, urlType);
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetPublicURL(string path, CopyURLType urlType = CopyURLType.Default)
|
public string GetPublicURL(string path, CopyURLType urlType = CopyURLType.Default)
|
||||||
|
@ -246,7 +246,7 @@ public string GetPublicURL(string path, CopyURLType urlType = CopyURLType.Defaul
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string TidyUploadPath(string uploadPath)
|
public static string TidyUploadPath(string uploadPath)
|
||||||
|
@ -256,7 +256,7 @@ public static string TidyUploadPath(string uploadPath)
|
||||||
return uploadPath.Trim().Replace('\\', '/').Trim('/') + "/";
|
return uploadPath.Trim().Replace('\\', '/').Trim('/') + "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ public DropIO(string apiKey)
|
||||||
public override UploadResult Upload(Stream stream, string fileName)
|
public override UploadResult Upload(Stream stream, string fileName)
|
||||||
{
|
{
|
||||||
DropName = "ShareX_" + Helpers.GetRandomAlphanumeric(10);
|
DropName = "ShareX_" + Helpers.GetRandomAlphanumeric(10);
|
||||||
DropDescription = string.Empty;
|
DropDescription = "";
|
||||||
Drop drop = CreateDrop(DropName, DropDescription, false, false, false);
|
Drop drop = CreateDrop(DropName, DropDescription, false, false, false);
|
||||||
|
|
||||||
Dictionary<string, string> args = new Dictionary<string, string>();
|
Dictionary<string, string> args = new Dictionary<string, string>();
|
||||||
|
|
|
@ -427,7 +427,7 @@ public static string TidyUploadPath(string uploadPath)
|
||||||
return uploadPath.Trim().Replace('\\', '/').Trim('/') + "/";
|
return uploadPath.Trim().Replace('\\', '/').Trim('/') + "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ public override bool CheckConfig(UploadersConfig config)
|
||||||
|
|
||||||
public override GenericUploader CreateUploader(UploadersConfig config, TaskReferenceHelper taskInfo)
|
public override GenericUploader CreateUploader(UploadersConfig config, TaskReferenceHelper taskInfo)
|
||||||
{
|
{
|
||||||
using (EmailForm emailForm = new EmailForm(config.EmailRememberLastTo ? config.EmailLastTo : string.Empty,
|
using (EmailForm emailForm = new EmailForm(config.EmailRememberLastTo ? config.EmailLastTo : "",
|
||||||
config.EmailDefaultSubject, config.EmailDefaultBody))
|
config.EmailDefaultSubject, config.EmailDefaultBody))
|
||||||
{
|
{
|
||||||
if (emailForm.ShowDialog() == DialogResult.OK)
|
if (emailForm.ShowDialog() == DialogResult.OK)
|
||||||
|
|
|
@ -76,7 +76,7 @@ public string FTPAddress
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(Host))
|
if (string.IsNullOrEmpty(Host))
|
||||||
{
|
{
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
string serverProtocol;
|
string serverProtocol;
|
||||||
|
@ -139,14 +139,14 @@ public FTPAccount()
|
||||||
Name = "New account";
|
Name = "New account";
|
||||||
Host = "host";
|
Host = "host";
|
||||||
Port = 21;
|
Port = 21;
|
||||||
SubFolderPath = string.Empty;
|
SubFolderPath = "";
|
||||||
BrowserProtocol = BrowserProtocol.http;
|
BrowserProtocol = BrowserProtocol.http;
|
||||||
HttpHomePath = string.Empty;
|
HttpHomePath = "";
|
||||||
HttpHomePathAutoAddSubFolderPath = true;
|
HttpHomePathAutoAddSubFolderPath = true;
|
||||||
HttpHomePathNoExtension = false;
|
HttpHomePathNoExtension = false;
|
||||||
IsActive = false;
|
IsActive = false;
|
||||||
FTPSEncryption = FTPSEncryption.Explicit;
|
FTPSEncryption = FTPSEncryption.Explicit;
|
||||||
FTPSCertificateLocation = string.Empty;
|
FTPSCertificateLocation = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetSubFolderPath(string filename = null, NameParserType nameParserType = NameParserType.URL)
|
public string GetSubFolderPath(string filename = null, NameParserType nameParserType = NameParserType.URL)
|
||||||
|
@ -171,7 +171,7 @@ public string GetUriPath(string filename, string subFolderPath = null)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(Host))
|
if (string.IsNullOrEmpty(Host))
|
||||||
{
|
{
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HttpHomePathNoExtension)
|
if (HttpHomePathNoExtension)
|
||||||
|
@ -249,7 +249,7 @@ public string GetFtpPath(string filemame)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(FTPAddress))
|
if (string.IsNullOrEmpty(FTPAddress))
|
||||||
{
|
{
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
return URLHelpers.CombineURL(FTPAddress, GetSubFolderPath(filemame, NameParserType.FolderPath));
|
return URLHelpers.CombineURL(FTPAddress, GetSubFolderPath(filemame, NameParserType.FolderPath));
|
||||||
|
|
|
@ -494,7 +494,7 @@ public void SetSize(string size)
|
||||||
|
|
||||||
public void SetDateTime(string year, string month, string day)
|
public void SetDateTime(string year, string month, string day)
|
||||||
{
|
{
|
||||||
string time = string.Empty;
|
string time = "";
|
||||||
|
|
||||||
if (year.Contains(":"))
|
if (year.Contains(":"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,7 +87,7 @@ static Jira()
|
||||||
{
|
{
|
||||||
byte[] pfx = new byte[stream.Length];
|
byte[] pfx = new byte[stream.Length];
|
||||||
stream.Read(pfx, 0, pfx.Length);
|
stream.Read(pfx, 0, pfx.Length);
|
||||||
_jiraCertificate = new X509Certificate2(pfx, string.Empty, X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.Exportable);
|
_jiraCertificate = new X509Certificate2(pfx, "", X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.Exportable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ internal class LambdaFile
|
||||||
|
|
||||||
public class LambdaSettings
|
public class LambdaSettings
|
||||||
{
|
{
|
||||||
public string UserAPIKey = string.Empty;
|
public string UserAPIKey = "";
|
||||||
public string UploadURL = "https://λ.pw/";
|
public string UploadURL = "https://λ.pw/";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -60,7 +60,7 @@ public Lithiio(LithiioSettings config)
|
||||||
|
|
||||||
private const string uploadUrl = "http://api.lithi.io/upload.php";
|
private const string uploadUrl = "http://api.lithi.io/upload.php";
|
||||||
|
|
||||||
public static string[] UploadURLs = new string[] { "https://i.lithi.io/", "https://lithi.io/i/", "https://i.mugi.io/", "https://mugi.io/i/"};
|
public static string[] UploadURLs = new string[] { "https://i.lithi.io/", "https://lithi.io/i/", "https://i.mugi.io/", "https://mugi.io/i/" };
|
||||||
|
|
||||||
public override UploadResult Upload(Stream stream, string fileName)
|
public override UploadResult Upload(Stream stream, string fileName)
|
||||||
{
|
{
|
||||||
|
@ -96,7 +96,7 @@ internal class LithiioFile
|
||||||
|
|
||||||
public class LithiioSettings
|
public class LithiioSettings
|
||||||
{
|
{
|
||||||
public string UserAPIKey { get; set; } = string.Empty;
|
public string UserAPIKey { get; set; } = "";
|
||||||
public string UploadURL { get; set; } = "https://i.lithi.io/";
|
public string UploadURL { get; set; } = "https://i.lithi.io/";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -71,7 +71,7 @@ public string LocalUri
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(LocalhostRoot))
|
if (string.IsNullOrEmpty(LocalhostRoot))
|
||||||
{
|
{
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Uri(Helpers.ExpandFolderVariables(LocalhostRoot)).AbsoluteUri;
|
return new Uri(Helpers.ExpandFolderVariables(LocalhostRoot)).AbsoluteUri;
|
||||||
|
@ -101,10 +101,10 @@ public string PreviewRemotePath
|
||||||
public LocalhostAccount()
|
public LocalhostAccount()
|
||||||
{
|
{
|
||||||
Name = "New account";
|
Name = "New account";
|
||||||
LocalhostRoot = string.Empty;
|
LocalhostRoot = "";
|
||||||
Port = 80;
|
Port = 80;
|
||||||
SubFolderPath = string.Empty;
|
SubFolderPath = "";
|
||||||
HttpHomePath = string.Empty;
|
HttpHomePath = "";
|
||||||
HttpHomePathAutoAddSubFolderPath = true;
|
HttpHomePathAutoAddSubFolderPath = true;
|
||||||
HttpHomePathNoExtension = false;
|
HttpHomePathNoExtension = false;
|
||||||
RemoteProtocol = BrowserProtocol.file;
|
RemoteProtocol = BrowserProtocol.file;
|
||||||
|
@ -133,7 +133,7 @@ public string GetUriPath(string filename)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(LocalhostRoot))
|
if (string.IsNullOrEmpty(LocalhostRoot))
|
||||||
{
|
{
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HttpHomePathNoExtension)
|
if (HttpHomePathNoExtension)
|
||||||
|
@ -186,7 +186,7 @@ public string GetLocalhostPath(string fileName)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(LocalhostRoot))
|
if (string.IsNullOrEmpty(LocalhostRoot))
|
||||||
{
|
{
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
return Path.Combine(Path.Combine(Helpers.ExpandFolderVariables(LocalhostRoot), GetSubFolderPath()), fileName);
|
return Path.Combine(Path.Combine(Helpers.ExpandFolderVariables(LocalhostRoot), GetSubFolderPath()), fileName);
|
||||||
}
|
}
|
||||||
|
@ -197,7 +197,7 @@ public string GetLocalhostUri(string fileName)
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(localhostAddress))
|
if (string.IsNullOrEmpty(localhostAddress))
|
||||||
{
|
{
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
return URLHelpers.CombineURL(localhostAddress, GetSubFolderPath(), fileName);
|
return URLHelpers.CombineURL(localhostAddress, GetSubFolderPath(), fileName);
|
||||||
|
|
|
@ -236,7 +236,7 @@ public class PushbulletDevice
|
||||||
|
|
||||||
public class PushbulletSettings
|
public class PushbulletSettings
|
||||||
{
|
{
|
||||||
public string UserAPIKey = string.Empty;
|
public string UserAPIKey = "";
|
||||||
public List<PushbulletDevice> DeviceList = new List<PushbulletDevice>();
|
public List<PushbulletDevice> DeviceList = new List<PushbulletDevice>();
|
||||||
public int SelectedDevice = 0;
|
public int SelectedDevice = 0;
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ private string NextUploadServer()
|
||||||
return string.Format(rapidshareUploadURL, response);
|
return string.Format(rapidshareUploadURL, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public RapidShareFolderInfo GetRootFolderWithChilds()
|
public RapidShareFolderInfo GetRootFolderWithChilds()
|
||||||
|
|
|
@ -103,7 +103,7 @@ public string GetAuthToken(string username, string password)
|
||||||
return AuthResult.token;
|
return AuthResult.token;
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SeafileAuthResponse
|
public class SeafileAuthResponse
|
||||||
|
|
|
@ -2788,7 +2788,7 @@ private void btnCustomUploaderRegexpAdd_Click(object sender, EventArgs e)
|
||||||
if (!string.IsNullOrEmpty(regexp))
|
if (!string.IsNullOrEmpty(regexp))
|
||||||
{
|
{
|
||||||
lvCustomUploaderRegexps.Items.Add(regexp);
|
lvCustomUploaderRegexps.Items.Add(regexp);
|
||||||
txtCustomUploaderRegexp.Text = string.Empty;
|
txtCustomUploaderRegexp.Text = "";
|
||||||
txtCustomUploaderRegexp.Focus();
|
txtCustomUploaderRegexp.Focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2818,7 +2818,7 @@ private void btnCustomUploaderRegexHelp_Click(object sender, EventArgs e)
|
||||||
|
|
||||||
private void lvCustomUploaderRegexps_SelectedIndexChanged(object sender, EventArgs e)
|
private void lvCustomUploaderRegexps_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string regex = string.Empty;
|
string regex = "";
|
||||||
|
|
||||||
if (lvCustomUploaderRegexps.SelectedItems.Count > 0)
|
if (lvCustomUploaderRegexps.SelectedItems.Count > 0)
|
||||||
{
|
{
|
||||||
|
@ -2954,8 +2954,8 @@ private void btnCustomUploaderArgAdd_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string value = txtCustomUploaderArgValue.Text;
|
string value = txtCustomUploaderArgValue.Text;
|
||||||
lvCustomUploaderArguments.Items.Add(name).SubItems.Add(value);
|
lvCustomUploaderArguments.Items.Add(name).SubItems.Add(value);
|
||||||
txtCustomUploaderArgName.Text = string.Empty;
|
txtCustomUploaderArgName.Text = "";
|
||||||
txtCustomUploaderArgValue.Text = string.Empty;
|
txtCustomUploaderArgValue.Text = "";
|
||||||
txtCustomUploaderArgName.Focus();
|
txtCustomUploaderArgName.Focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2985,8 +2985,8 @@ private void btnCustomUploaderArgUpdate_Click(object sender, EventArgs e)
|
||||||
|
|
||||||
private void lvCustomUploaderArguments_SelectedIndexChanged(object sender, EventArgs e)
|
private void lvCustomUploaderArguments_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string name = string.Empty;
|
string name = "";
|
||||||
string value = string.Empty;
|
string value = "";
|
||||||
|
|
||||||
if (lvCustomUploaderArguments.SelectedItems.Count > 0)
|
if (lvCustomUploaderArguments.SelectedItems.Count > 0)
|
||||||
{
|
{
|
||||||
|
@ -3006,8 +3006,8 @@ private void btnCustomUploaderHeaderAdd_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string value = txtCustomUploaderHeaderValue.Text;
|
string value = txtCustomUploaderHeaderValue.Text;
|
||||||
lvCustomUploaderHeaders.Items.Add(name).SubItems.Add(value);
|
lvCustomUploaderHeaders.Items.Add(name).SubItems.Add(value);
|
||||||
txtCustomUploaderHeaderName.Text = string.Empty;
|
txtCustomUploaderHeaderName.Text = "";
|
||||||
txtCustomUploaderHeaderValue.Text = string.Empty;
|
txtCustomUploaderHeaderValue.Text = "";
|
||||||
txtCustomUploaderHeaderName.Focus();
|
txtCustomUploaderHeaderName.Focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3037,8 +3037,8 @@ private void btnCustomUploaderHeaderUpdate_Click(object sender, EventArgs e)
|
||||||
|
|
||||||
private void lvCustomUploaderHeaders_SelectedIndexChanged(object sender, EventArgs e)
|
private void lvCustomUploaderHeaders_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string name = string.Empty;
|
string name = "";
|
||||||
string value = string.Empty;
|
string value = "";
|
||||||
|
|
||||||
if (lvCustomUploaderHeaders.SelectedItems.Count > 0)
|
if (lvCustomUploaderHeaders.SelectedItems.Count > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -533,7 +533,7 @@ private void UpdateDropboxStatus()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lblDropboxStatus.Text = string.Empty;
|
lblDropboxStatus.Text = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1066,7 +1066,7 @@ private void FTPOpenClient()
|
||||||
|
|
||||||
public static void TestFTPAccount(FTPAccount account)
|
public static void TestFTPAccount(FTPAccount account)
|
||||||
{
|
{
|
||||||
string msg = string.Empty;
|
string msg = "";
|
||||||
string remotePath = account.GetSubFolderPath();
|
string remotePath = account.GetSubFolderPath();
|
||||||
List<string> directories = new List<string>();
|
List<string> directories = new List<string>();
|
||||||
|
|
||||||
|
@ -1283,7 +1283,7 @@ private bool TwitterUpdateSelected()
|
||||||
}
|
}
|
||||||
|
|
||||||
txtTwitterDescription.Enabled = false;
|
txtTwitterDescription.Enabled = false;
|
||||||
txtTwitterDescription.Text = string.Empty;
|
txtTwitterDescription.Text = "";
|
||||||
oauthTwitter.Enabled = false;
|
oauthTwitter.Enabled = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1331,7 +1331,7 @@ private void TwitterAuthComplete(string code)
|
||||||
|
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
oauth.AuthVerifier = string.Empty;
|
oauth.AuthVerifier = "";
|
||||||
oauthTwitter.Status = OAuthLoginStatus.LoginSuccessful;
|
oauthTwitter.Status = OAuthLoginStatus.LoginSuccessful;
|
||||||
MessageBox.Show(Resources.UploadersConfigForm_Login_successful, "ShareX", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MessageBox.Show(Resources.UploadersConfigForm_Login_successful, "ShareX", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,7 +190,7 @@ private string ParseURL(string url)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(url))
|
if (string.IsNullOrEmpty(url))
|
||||||
{
|
{
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder result = new StringBuilder();
|
StringBuilder result = new StringBuilder();
|
||||||
|
|
|
@ -53,7 +53,7 @@ public string AddImage(string key)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,7 @@ private static byte[] GenerateSignature(string signatureBase, string consumerSec
|
||||||
using (HMACSHA1 hmacsha1 = new HMACSHA1())
|
using (HMACSHA1 hmacsha1 = new HMACSHA1())
|
||||||
{
|
{
|
||||||
string key = string.Format("{0}&{1}", Uri.EscapeDataString(consumerSecret),
|
string key = string.Format("{0}&{1}", Uri.EscapeDataString(consumerSecret),
|
||||||
string.IsNullOrEmpty(userSecret) ? string.Empty : Uri.EscapeDataString(userSecret));
|
string.IsNullOrEmpty(userSecret) ? "" : Uri.EscapeDataString(userSecret));
|
||||||
|
|
||||||
hmacsha1.Key = Encoding.ASCII.GetBytes(key);
|
hmacsha1.Key = Encoding.ASCII.GetBytes(key);
|
||||||
|
|
||||||
|
@ -236,7 +236,7 @@ private static string NormalizeUrl(string url)
|
||||||
|
|
||||||
if (Uri.TryCreate(url, UriKind.Absolute, out uri))
|
if (Uri.TryCreate(url, UriKind.Absolute, out uri))
|
||||||
{
|
{
|
||||||
string port = string.Empty;
|
string port = "";
|
||||||
|
|
||||||
if (uri.Scheme == "http" && uri.Port != 80 ||
|
if (uri.Scheme == "http" && uri.Port != 80 ||
|
||||||
uri.Scheme == "https" && uri.Port != 443 ||
|
uri.Scheme == "https" && uri.Port != 443 ||
|
||||||
|
|
|
@ -40,7 +40,7 @@ public override UploadResult Upload(Stream stream, string fileName)
|
||||||
arguments.Add("description", "test");
|
arguments.Add("description", "test");
|
||||||
arguments.Add("adult", "t");
|
arguments.Add("adult", "t");
|
||||||
arguments.Add("sfile", "Upload");
|
arguments.Add("sfile", "Upload");
|
||||||
arguments.Add("url", string.Empty);
|
arguments.Add("url", "");
|
||||||
|
|
||||||
UploadResult result = UploadData(stream, "http://imagebin.ca/upload.php", fileName, "f", arguments);
|
UploadResult result = UploadData(stream, "http://imagebin.ca/upload.php", fileName, "f", arguments);
|
||||||
|
|
||||||
|
|
|
@ -274,7 +274,7 @@ private UploadResult InternalUpload(Stream stream, string fileName, bool refresh
|
||||||
result.URL = "http://imgur.com/" + imageData.id;
|
result.URL = "http://imgur.com/" + imageData.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
string thumbnail = string.Empty;
|
string thumbnail = "";
|
||||||
|
|
||||||
switch (ThumbnailType)
|
switch (ThumbnailType)
|
||||||
{
|
{
|
||||||
|
|
|
@ -93,7 +93,7 @@ public override UploadResult Upload(Stream stream, string fileName)
|
||||||
arguments.Add("responsetype", "XML");
|
arguments.Add("responsetype", "XML");
|
||||||
arguments.Add("upk", upk);
|
arguments.Add("upk", upk);
|
||||||
arguments.Add("type", "image");
|
arguments.Add("type", "image");
|
||||||
arguments.Add("tags", string.Empty);
|
arguments.Add("tags", "");
|
||||||
|
|
||||||
result = UploadData(stream, URLAPI, fileName, "uploadfile", arguments);
|
result = UploadData(stream, URLAPI, fileName, "uploadfile", arguments);
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ public string UserAuth(string email, string password)
|
||||||
return HttpUtility.HtmlEncode(result);
|
return HttpUtility.HtmlEncode(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetUploadKey(string action, string tpid, string tpk)
|
private string GetUploadKey(string action, string tpid, string tpk)
|
||||||
|
|
|
@ -48,7 +48,7 @@ public override GenericUploader CreateUploader(UploadersConfig config, TaskRefer
|
||||||
return new Twitter(twitterOAuth)
|
return new Twitter(twitterOAuth)
|
||||||
{
|
{
|
||||||
SkipMessageBox = config.TwitterSkipMessageBox,
|
SkipMessageBox = config.TwitterSkipMessageBox,
|
||||||
DefaultMessage = config.TwitterDefaultMessage ?? string.Empty
|
DefaultMessage = config.TwitterDefaultMessage ?? ""
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public override bool CheckConfig(UploadersConfig config)
|
||||||
|
|
||||||
public override void ShareURL(string url, UploadersConfig config)
|
public override void ShareURL(string url, UploadersConfig config)
|
||||||
{
|
{
|
||||||
using (EmailForm emailForm = new EmailForm(config.EmailRememberLastTo ? config.EmailLastTo : string.Empty, config.EmailDefaultSubject, url))
|
using (EmailForm emailForm = new EmailForm(config.EmailRememberLastTo ? config.EmailLastTo : "", config.EmailDefaultSubject, url))
|
||||||
{
|
{
|
||||||
if (emailForm.ShowDialog() == DialogResult.OK)
|
if (emailForm.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
|
|
|
@ -88,7 +88,7 @@ public class Paste2Settings
|
||||||
public Paste2Settings()
|
public Paste2Settings()
|
||||||
{
|
{
|
||||||
TextFormat = "text";
|
TextFormat = "text";
|
||||||
Description = string.Empty;
|
Description = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -69,7 +69,7 @@ public override UploadResult UploadText(string text, string fileName)
|
||||||
|
|
||||||
Dictionary<string, string> arguments = new Dictionary<string, string>();
|
Dictionary<string, string> arguments = new Dictionary<string, string>();
|
||||||
arguments.Add("key", APIKey);
|
arguments.Add("key", APIKey);
|
||||||
arguments.Add("description", string.Empty);
|
arguments.Add("description", "");
|
||||||
arguments.Add("paste", text);
|
arguments.Add("paste", text);
|
||||||
arguments.Add("format", "simple");
|
arguments.Add("format", "simple");
|
||||||
arguments.Add("return", "link");
|
arguments.Add("return", "link");
|
||||||
|
|
|
@ -121,13 +121,13 @@ public class PastebinCaSettings
|
||||||
|
|
||||||
public PastebinCaSettings()
|
public PastebinCaSettings()
|
||||||
{
|
{
|
||||||
Author = string.Empty;
|
Author = "";
|
||||||
Description = string.Empty;
|
Description = "";
|
||||||
Tags = string.Empty;
|
Tags = "";
|
||||||
TextFormat = "1";
|
TextFormat = "1";
|
||||||
ExpireTime = "1 month";
|
ExpireTime = "1 month";
|
||||||
Encrypt = false;
|
Encrypt = false;
|
||||||
EncryptPassword = string.Empty;
|
EncryptPassword = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -86,7 +86,7 @@ public override string ToString()
|
||||||
return URL;
|
return URL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ErrorsToString()
|
public string ErrorsToString()
|
||||||
|
|
|
@ -55,9 +55,9 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
||||||
// TinyPic
|
// TinyPic
|
||||||
|
|
||||||
public AccountType TinyPicAccountType = AccountType.Anonymous;
|
public AccountType TinyPicAccountType = AccountType.Anonymous;
|
||||||
public string TinyPicRegistrationCode = string.Empty;
|
public string TinyPicRegistrationCode = "";
|
||||||
public string TinyPicUsername = string.Empty;
|
public string TinyPicUsername = "";
|
||||||
public string TinyPicPassword = string.Empty;
|
public string TinyPicPassword = "";
|
||||||
public bool TinyPicRememberUserPass = false;
|
public bool TinyPicRememberUserPass = false;
|
||||||
|
|
||||||
// Flickr
|
// Flickr
|
||||||
|
@ -73,7 +73,7 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
||||||
// Picasa
|
// Picasa
|
||||||
|
|
||||||
public OAuth2Info PicasaOAuth2Info = null;
|
public OAuth2Info PicasaOAuth2Info = null;
|
||||||
public string PicasaAlbumID = string.Empty;
|
public string PicasaAlbumID = "";
|
||||||
|
|
||||||
// Chevereto
|
// Chevereto
|
||||||
|
|
||||||
|
@ -82,12 +82,12 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
||||||
|
|
||||||
// SomeImage
|
// SomeImage
|
||||||
|
|
||||||
public string SomeImageAPIKey = string.Empty;
|
public string SomeImageAPIKey = "";
|
||||||
public bool SomeImageDirectURL = true;
|
public bool SomeImageDirectURL = true;
|
||||||
|
|
||||||
// vgy.me
|
// vgy.me
|
||||||
|
|
||||||
public string VgymeUserKey = string.Empty;
|
public string VgymeUserKey = "";
|
||||||
|
|
||||||
#endregion Image uploaders
|
#endregion Image uploaders
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
||||||
|
|
||||||
// uPaste
|
// uPaste
|
||||||
|
|
||||||
public string UpasteUserKey = string.Empty;
|
public string UpasteUserKey = "";
|
||||||
public bool UpasteIsPublic = false;
|
public bool UpasteIsPublic = false;
|
||||||
|
|
||||||
// Hastebin
|
// Hastebin
|
||||||
|
@ -120,8 +120,8 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
||||||
|
|
||||||
// OneTimeSecret
|
// OneTimeSecret
|
||||||
|
|
||||||
public string OneTimeSecretAPIKey = string.Empty;
|
public string OneTimeSecretAPIKey = "";
|
||||||
public string OneTimeSecretAPIUsername = string.Empty;
|
public string OneTimeSecretAPIUsername = "";
|
||||||
|
|
||||||
#endregion Text uploaders
|
#endregion Text uploaders
|
||||||
|
|
||||||
|
@ -153,13 +153,13 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
||||||
public OAuth2Info GoogleDriveOAuth2Info = null;
|
public OAuth2Info GoogleDriveOAuth2Info = null;
|
||||||
public bool GoogleDriveIsPublic = true;
|
public bool GoogleDriveIsPublic = true;
|
||||||
public bool GoogleDriveUseFolder = false;
|
public bool GoogleDriveUseFolder = false;
|
||||||
public string GoogleDriveFolderID = string.Empty;
|
public string GoogleDriveFolderID = "";
|
||||||
|
|
||||||
// SendSpace
|
// SendSpace
|
||||||
|
|
||||||
public AccountType SendSpaceAccountType = AccountType.Anonymous;
|
public AccountType SendSpaceAccountType = AccountType.Anonymous;
|
||||||
public string SendSpaceUsername = string.Empty;
|
public string SendSpaceUsername = "";
|
||||||
public string SendSpacePassword = string.Empty;
|
public string SendSpacePassword = "";
|
||||||
|
|
||||||
// Minus
|
// Minus
|
||||||
|
|
||||||
|
@ -178,8 +178,8 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
||||||
|
|
||||||
// Localhostr
|
// Localhostr
|
||||||
|
|
||||||
public string LocalhostrEmail = string.Empty;
|
public string LocalhostrEmail = "";
|
||||||
public string LocalhostrPassword = string.Empty;
|
public string LocalhostrPassword = "";
|
||||||
public bool LocalhostrDirectURL = true;
|
public bool LocalhostrDirectURL = true;
|
||||||
|
|
||||||
// FTP Server
|
// FTP Server
|
||||||
|
@ -201,10 +201,9 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
||||||
public string EmailSmtpServer = "smtp.gmail.com";
|
public string EmailSmtpServer = "smtp.gmail.com";
|
||||||
public int EmailSmtpPort = 587;
|
public int EmailSmtpPort = 587;
|
||||||
public string EmailFrom = "...@gmail.com";
|
public string EmailFrom = "...@gmail.com";
|
||||||
public string EmailPassword = string.Empty;
|
public string EmailPassword = "";
|
||||||
public bool EmailRememberLastTo = true;
|
public bool EmailRememberLastTo = true;
|
||||||
public bool EmailConfirmSend = true;
|
public string EmailLastTo = "";
|
||||||
public string EmailLastTo = string.Empty;
|
|
||||||
public string EmailDefaultSubject = "Sending email from ShareX";
|
public string EmailDefaultSubject = "Sending email from ShareX";
|
||||||
public string EmailDefaultBody = "Screenshot is attached.";
|
public string EmailDefaultBody = "Screenshot is attached.";
|
||||||
|
|
||||||
|
@ -267,7 +266,7 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
||||||
|
|
||||||
// s-ul
|
// s-ul
|
||||||
|
|
||||||
public string SulAPIKey = string.Empty;
|
public string SulAPIKey = "";
|
||||||
|
|
||||||
// Seafile
|
// Seafile
|
||||||
|
|
||||||
|
@ -298,7 +297,7 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
||||||
// bit.ly
|
// bit.ly
|
||||||
|
|
||||||
public OAuth2Info BitlyOAuth2Info = null;
|
public OAuth2Info BitlyOAuth2Info = null;
|
||||||
public string BitlyDomain = string.Empty;
|
public string BitlyDomain = "";
|
||||||
|
|
||||||
// Google URL Shortener
|
// Google URL Shortener
|
||||||
|
|
||||||
|
@ -308,20 +307,20 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
||||||
// yourls.org
|
// yourls.org
|
||||||
|
|
||||||
public string YourlsAPIURL = "http://yoursite.com/yourls-api.php";
|
public string YourlsAPIURL = "http://yoursite.com/yourls-api.php";
|
||||||
public string YourlsSignature = string.Empty;
|
public string YourlsSignature = "";
|
||||||
public string YourlsUsername = string.Empty;
|
public string YourlsUsername = "";
|
||||||
public string YourlsPassword = string.Empty;
|
public string YourlsPassword = "";
|
||||||
|
|
||||||
// adf.ly
|
// adf.ly
|
||||||
public string AdFlyAPIKEY = string.Empty;
|
public string AdFlyAPIKEY = "";
|
||||||
public string AdFlyAPIUID = string.Empty;
|
public string AdFlyAPIUID = "";
|
||||||
|
|
||||||
// coinurl.com
|
// coinurl.com
|
||||||
public string CoinURLUUID = string.Empty;
|
public string CoinURLUUID = "";
|
||||||
|
|
||||||
// polr
|
// polr
|
||||||
public string PolrAPIHostname = string.Empty;
|
public string PolrAPIHostname = "";
|
||||||
public string PolrAPIKey = string.Empty;
|
public string PolrAPIKey = "";
|
||||||
|
|
||||||
#endregion URL shorteners
|
#endregion URL shorteners
|
||||||
|
|
||||||
|
@ -332,7 +331,7 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
||||||
public List<OAuthInfo> TwitterOAuthInfoList = new List<OAuthInfo>();
|
public List<OAuthInfo> TwitterOAuthInfoList = new List<OAuthInfo>();
|
||||||
public int TwitterSelectedAccount = 0;
|
public int TwitterSelectedAccount = 0;
|
||||||
public bool TwitterSkipMessageBox = false;
|
public bool TwitterSkipMessageBox = false;
|
||||||
public string TwitterDefaultMessage = string.Empty;
|
public string TwitterDefaultMessage = "";
|
||||||
|
|
||||||
#endregion URL sharing services
|
#endregion URL sharing services
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ public ApplicationConfig()
|
||||||
#region Paths
|
#region Paths
|
||||||
|
|
||||||
public bool UseCustomScreenshotsPath = false;
|
public bool UseCustomScreenshotsPath = false;
|
||||||
public string CustomScreenshotsPath = string.Empty;
|
public string CustomScreenshotsPath = "";
|
||||||
public string SaveImageSubFolderPattern = "%y-%mo";
|
public string SaveImageSubFolderPattern = "%y-%mo";
|
||||||
|
|
||||||
#endregion Paths
|
#endregion Paths
|
||||||
|
|
|
@ -178,7 +178,7 @@ private void OnInitCompleted()
|
||||||
if (InitCompleted != null)
|
if (InitCompleted != null)
|
||||||
{
|
{
|
||||||
RadioButton rbDestination = flp.Controls.OfType<RadioButton>().FirstOrDefault(x => x.Checked);
|
RadioButton rbDestination = flp.Controls.OfType<RadioButton>().FirstOrDefault(x => x.Checked);
|
||||||
string currentDestination = string.Empty;
|
string currentDestination = "";
|
||||||
if (rbDestination != null)
|
if (rbDestination != null)
|
||||||
{
|
{
|
||||||
currentDestination = rbDestination.Text;
|
currentDestination = rbDestination.Text;
|
||||||
|
|
|
@ -242,7 +242,7 @@ public string GetLocalFilePathAsUri(string fp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion TaskInfo helper methods
|
#endregion TaskInfo helper methods
|
||||||
|
|
|
@ -134,7 +134,7 @@ private void UpdateControls()
|
||||||
cbProxyMethod.SelectedIndex = (int)Program.Settings.ProxySettings.ProxyMethod;
|
cbProxyMethod.SelectedIndex = (int)Program.Settings.ProxySettings.ProxyMethod;
|
||||||
txtProxyUsername.Text = Program.Settings.ProxySettings.Username;
|
txtProxyUsername.Text = Program.Settings.ProxySettings.Username;
|
||||||
txtProxyPassword.Text = Program.Settings.ProxySettings.Password;
|
txtProxyPassword.Text = Program.Settings.ProxySettings.Password;
|
||||||
txtProxyHost.Text = Program.Settings.ProxySettings.Host ?? string.Empty;
|
txtProxyHost.Text = Program.Settings.ProxySettings.Host ?? "";
|
||||||
nudProxyPort.SetValue(Program.Settings.ProxySettings.Port);
|
nudProxyPort.SetValue(Program.Settings.ProxySettings.Port);
|
||||||
UpdateProxyControls();
|
UpdateProxyControls();
|
||||||
|
|
||||||
|
@ -577,7 +577,7 @@ private void cbProxyMethod_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
if (Program.Settings.ProxySettings.ProxyMethod == ProxyMethod.Automatic)
|
if (Program.Settings.ProxySettings.ProxyMethod == ProxyMethod.Automatic)
|
||||||
{
|
{
|
||||||
Program.Settings.ProxySettings.IsValidProxy();
|
Program.Settings.ProxySettings.IsValidProxy();
|
||||||
txtProxyHost.Text = Program.Settings.ProxySettings.Host ?? string.Empty;
|
txtProxyHost.Text = Program.Settings.ProxySettings.Host ?? "";
|
||||||
nudProxyPort.SetValue(Program.Settings.ProxySettings.Port);
|
nudProxyPort.SetValue(Program.Settings.ProxySettings.Port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ private string GetNewFilename()
|
||||||
return newFilename + Path.GetExtension(Filepath);
|
return newFilename + Path.GetExtension(Filepath);
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnNewName_Click(object sender, EventArgs e)
|
private void btnNewName_Click(object sender, EventArgs e)
|
||||||
|
@ -99,7 +99,7 @@ private void btnUniqueName_Click(object sender, EventArgs e)
|
||||||
|
|
||||||
private void btnCancel_Click(object sender, EventArgs e)
|
private void btnCancel_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Filepath = string.Empty;
|
Filepath = "";
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ public ScreenColorPicker()
|
||||||
|
|
||||||
private void CopyToClipboard(object sender, EventArgs e)
|
private void CopyToClipboard(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string text = string.Empty;
|
string text = "";
|
||||||
|
|
||||||
if (sender is NumericUpDown)
|
if (sender is NumericUpDown)
|
||||||
{
|
{
|
||||||
|
|
|
@ -59,7 +59,7 @@ public TaskSettingsForm(TaskSettings hotkeySetting, bool isDefault = false)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tbDescription.Text = TaskSettings.Description ?? string.Empty;
|
tbDescription.Text = TaskSettings.Description ?? "";
|
||||||
cbUseDefaultAfterCaptureSettings.Checked = TaskSettings.UseDefaultAfterCaptureJob;
|
cbUseDefaultAfterCaptureSettings.Checked = TaskSettings.UseDefaultAfterCaptureJob;
|
||||||
cbUseDefaultAfterUploadSettings.Checked = TaskSettings.UseDefaultAfterUploadJob;
|
cbUseDefaultAfterUploadSettings.Checked = TaskSettings.UseDefaultAfterUploadJob;
|
||||||
cbUseDefaultDestinationSettings.Checked = TaskSettings.UseDefaultDestinations;
|
cbUseDefaultDestinationSettings.Checked = TaskSettings.UseDefaultDestinations;
|
||||||
|
|
|
@ -130,7 +130,7 @@ public HotkeyInfo(Keys hotkey, ushort id) : this(hotkey)
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
string text = string.Empty;
|
string text = "";
|
||||||
|
|
||||||
if (Control)
|
if (Control)
|
||||||
{
|
{
|
||||||
|
|
|
@ -52,7 +52,7 @@ public override string ToString()
|
||||||
return string.Format("Hotkey: {0}, Description: {1}, Job: {2}", HotkeyInfo, TaskSettings, TaskSettings.Job);
|
return string.Format("Hotkey: {0}, Description: {1}, Job: {2}", HotkeyInfo, TaskSettings, TaskSettings.Job);
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -503,14 +503,14 @@ public static string ReadPersonalPathConfig()
|
||||||
return File.ReadAllText(PersonalPathConfigFilePath, Encoding.UTF8).Trim();
|
return File.ReadAllText(PersonalPathConfigFilePath, Encoding.UTF8).Trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void WritePersonalPathConfig(string path)
|
public static void WritePersonalPathConfig(string path)
|
||||||
{
|
{
|
||||||
if (path == null)
|
if (path == null)
|
||||||
{
|
{
|
||||||
path = string.Empty;
|
path = "";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -381,7 +381,7 @@ public static string CheckFilePath(string folder, string filename, TaskSettings
|
||||||
filepath = Helpers.GetUniqueFilePath(filepath);
|
filepath = Helpers.GetUniqueFilePath(filepath);
|
||||||
break;
|
break;
|
||||||
case FileExistAction.Cancel:
|
case FileExistAction.Cancel:
|
||||||
filepath = string.Empty;
|
filepath = "";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ public string FilePath
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(filePath))
|
if (string.IsNullOrEmpty(filePath))
|
||||||
{
|
{
|
||||||
FileName = string.Empty;
|
FileName = "";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -122,7 +122,7 @@ public string UploaderHost
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -189,12 +189,12 @@ private static void CreateListViewItem(WorkerTask task)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lvi.SubItems.Add(Resources.TaskManager_CreateListViewItem_In_queue);
|
lvi.SubItems.Add(Resources.TaskManager_CreateListViewItem_In_queue);
|
||||||
lvi.SubItems.Add(string.Empty);
|
lvi.SubItems.Add("");
|
||||||
}
|
}
|
||||||
|
|
||||||
lvi.SubItems.Add(string.Empty);
|
lvi.SubItems.Add("");
|
||||||
lvi.SubItems.Add(string.Empty);
|
lvi.SubItems.Add("");
|
||||||
lvi.SubItems.Add(string.Empty);
|
lvi.SubItems.Add("");
|
||||||
|
|
||||||
if (task.Status == TaskStatus.History)
|
if (task.Status == TaskStatus.History)
|
||||||
{
|
{
|
||||||
|
@ -203,7 +203,7 @@ private static void CreateListViewItem(WorkerTask task)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lvi.SubItems.Add(string.Empty);
|
lvi.SubItems.Add("");
|
||||||
lvi.ImageIndex = 3;
|
lvi.ImageIndex = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@ private static void task_TaskCompleted(WorkerTask task)
|
||||||
if (lvi != null)
|
if (lvi != null)
|
||||||
{
|
{
|
||||||
lvi.SubItems[1].Text = Resources.TaskManager_task_UploadCompleted_Error;
|
lvi.SubItems[1].Text = Resources.TaskManager_task_UploadCompleted_Error;
|
||||||
lvi.SubItems[6].Text = string.Empty;
|
lvi.SubItems[6].Text = "";
|
||||||
lvi.ImageIndex = 1;
|
lvi.ImageIndex = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class TaskSettings
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public TaskSettings TaskSettingsReference { get; private set; }
|
public TaskSettings TaskSettingsReference { get; private set; }
|
||||||
|
|
||||||
public string Description = string.Empty;
|
public string Description = "";
|
||||||
|
|
||||||
public HotkeyType Job = HotkeyType.None;
|
public HotkeyType Job = HotkeyType.None;
|
||||||
|
|
||||||
|
|
|
@ -932,7 +932,7 @@ private UploadResult GetInvalidConfigResult(IUploaderService uploaderService)
|
||||||
private bool DownloadAndUpload()
|
private bool DownloadAndUpload()
|
||||||
{
|
{
|
||||||
string url = Info.Result.URL.Trim();
|
string url = Info.Result.URL.Trim();
|
||||||
Info.Result.URL = string.Empty;
|
Info.Result.URL = "";
|
||||||
Info.FilePath = TaskHelpers.CheckFilePath(Info.TaskSettings.CaptureFolder, Info.FileName, Info.TaskSettings);
|
Info.FilePath = TaskHelpers.CheckFilePath(Info.TaskSettings.CaptureFolder, Info.FileName, Info.TaskSettings);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(Info.FilePath))
|
if (!string.IsNullOrEmpty(Info.FilePath))
|
||||||
|
|
Loading…
Reference in a new issue