diff --git a/ShareX.HistoryLib/Forms/ImageHistoryForm.cs b/ShareX.HistoryLib/Forms/ImageHistoryForm.cs index 6a1569832..a11977900 100644 --- a/ShareX.HistoryLib/Forms/ImageHistoryForm.cs +++ b/ShareX.HistoryLib/Forms/ImageHistoryForm.cs @@ -84,7 +84,7 @@ public ImageHistoryForm(string historyPath, ImageHistorySettings settings, Actio private void UpdateTitle(int total, int filtered) { - Text = $"{defaultTitle} (Total: {total.ToString("N0")} - Filtered: {filtered.ToString("N0")})"; + Text = $"{defaultTitle} (Total: {total:N0} - Filtered: {filtered:N0})"; } private void RefreshHistoryItems() diff --git a/ShareX.IndexerLib/IndexerHtml.cs b/ShareX.IndexerLib/IndexerHtml.cs index d6df433c4..4c7cd1add 100644 --- a/ShareX.IndexerLib/IndexerHtml.cs +++ b/ShareX.IndexerLib/IndexerHtml.cs @@ -160,7 +160,7 @@ private string GetFileNameRow(FileInfo fi, int level) private string GetFooter() { - return $"Generated by ShareX Directory Indexer on {DateTime.UtcNow.ToString("yyyy-MM-dd 'at' HH:mm:ss 'UTC'")}"; + return $"Generated by ShareX Directory Indexer on {DateTime.UtcNow:yyyy-MM-dd 'at' HH:mm:ss 'UTC'}"; } private string GetCssStyle() diff --git a/ShareX.IndexerLib/IndexerText.cs b/ShareX.IndexerLib/IndexerText.cs index bf73762df..fac892704 100644 --- a/ShareX.IndexerLib/IndexerText.cs +++ b/ShareX.IndexerLib/IndexerText.cs @@ -112,7 +112,7 @@ private string GetFileNameRow(FileInfo fi, int level) private string GetFooter() { - return $"Generated by ShareX Directory Indexer on {DateTime.UtcNow.ToString("yyyy-MM-dd 'at' HH:mm:ss 'UTC'")}. Latest version can be downloaded from: {Links.URL_WEBSITE}"; + return $"Generated by ShareX Directory Indexer on {DateTime.UtcNow:yyyy-MM-dd 'at' HH:mm:ss 'UTC'}. Latest version can be downloaded from: {Links.URL_WEBSITE}"; } } } \ No newline at end of file diff --git a/ShareX.UploadersLib/FileUploaders/Plik.cs b/ShareX.UploadersLib/FileUploaders/Plik.cs index 5b53ecb19..030d093c1 100644 --- a/ShareX.UploadersLib/FileUploaders/Plik.cs +++ b/ShareX.UploadersLib/FileUploaders/Plik.cs @@ -101,7 +101,7 @@ public override UploadResult Upload(Stream stream, string fileName) string metaDataResp = SendRequest(HttpMethod.POST, Settings.URL + "/upload", JsonConvert.SerializeObject(metaDataReq), headers: requestHeaders); UploadMetadataResponse metaData = JsonConvert.DeserializeObject(metaDataResp); requestHeaders["x-uploadtoken"] = metaData.uploadToken; - string url = $"{Settings.URL}/file/{metaData.id}/{metaData.files.First().Value.id.ToString()}/{fileName}"; + string url = $"{Settings.URL}/file/{metaData.id}/{metaData.files.First().Value.id}/{fileName}"; UploadResult FileDatReq = SendRequestFile(url, stream, fileName, "file", headers: requestHeaders); return ConvertResult(metaData, FileDatReq); @@ -112,7 +112,7 @@ private UploadResult ConvertResult(UploadMetadataResponse metaData, UploadResult UploadResult result = new UploadResult(fileDataReq.Response); UploadMetadataResponse fileData = JsonConvert.DeserializeObject(fileDataReq.Response); UploadMetadataResponseFile actFile = metaData.files.First().Value; - result.URL = $"{Settings.URL}/file/{metaData.id}/{actFile.id.ToString()}/{actFile.fileName}"; + result.URL = $"{Settings.URL}/file/{metaData.id}/{actFile.id}/{actFile.fileName}"; return result; } diff --git a/ShareX/TaskHelpers.cs b/ShareX/TaskHelpers.cs index 5d594cf6a..4c594040d 100644 --- a/ShareX/TaskHelpers.cs +++ b/ShareX/TaskHelpers.cs @@ -1628,7 +1628,7 @@ public static void ImportCustomUploader(string filePath) if (cui.DestinationType == CustomUploaderDestinationType.None) { - DialogResult result = MessageBox.Show($"Would you like to add \"{cui.ToString()}\" custom uploader?", + DialogResult result = MessageBox.Show($"Would you like to add \"{cui}\" custom uploader?", "ShareX - Custom uploader confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1); if (result == DialogResult.No) @@ -1647,7 +1647,7 @@ public static void ImportCustomUploader(string filePath) string destinationsText = string.Join("/", destinations); - DialogResult result = MessageBox.Show($"Would you like to set \"{cui.ToString()}\" as the active custom uploader for {destinationsText}?", + DialogResult result = MessageBox.Show($"Would you like to set \"{cui}\" as the active custom uploader for {destinationsText}?", "ShareX - Custom uploader confirmation", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1); if (result == DialogResult.Yes) @@ -1735,6 +1735,15 @@ public static void ImportImageEffect(string filePath) { imageEffectsForm.ImportImageEffect(configJson); } + + // TODO: Translate + if (!Program.DefaultTaskSettings.AfterCaptureJob.HasFlag(AfterCaptureTasks.AddImageEffects) && + MessageBox.Show("Would you like to enable image effects?\r\n\r\nYou can later disable it from \"After capture tasks\" menu.", + "ShareX", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + { + Program.DefaultTaskSettings.AfterCaptureJob = Program.DefaultTaskSettings.AfterCaptureJob.Add(AfterCaptureTasks.AddImageEffects); + Program.MainForm.UpdateCheckStates(); + } } }