mirror of
https://github.com/ShareX/ShareX.git
synced 2024-06-28 11:10:23 +12:00
When .sxie file opened ask for enabling image effects if not already enabled
This commit is contained in:
parent
4182c90775
commit
0ebabcb907
|
@ -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()
|
||||
|
|
|
@ -160,7 +160,7 @@ private string GetFileNameRow(FileInfo fi, int level)
|
|||
|
||||
private string GetFooter()
|
||||
{
|
||||
return $"Generated by <a href=\"{Links.URL_WEBSITE}\">ShareX Directory Indexer</a> on {DateTime.UtcNow.ToString("yyyy-MM-dd 'at' HH:mm:ss 'UTC'")}";
|
||||
return $"Generated by <a href=\"{Links.URL_WEBSITE}\">ShareX Directory Indexer</a> on {DateTime.UtcNow:yyyy-MM-dd 'at' HH:mm:ss 'UTC'}";
|
||||
}
|
||||
|
||||
private string GetCssStyle()
|
||||
|
|
|
@ -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}";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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<UploadMetadataResponse>(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<UploadMetadataResponse>(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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue