mirror of
https://github.com/ShareX/ShareX.git
synced 2024-06-30 12:11:07 +12:00
Implementing save changes before closing dialog for the image editor as requested on issue 6725
This commit is contained in:
parent
52a71c8b8d
commit
894394715b
|
@ -605,8 +605,15 @@ internal bool ShowExitConfirmation()
|
|||
if (IsImageModified)
|
||||
{
|
||||
Pause();
|
||||
result = MessageBox.Show(this, Resources.RegionCaptureForm_ShowExitConfirmation_Text, Resources.RegionCaptureForm_ShowExitConfirmation_ShareXImageEditor,
|
||||
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes;
|
||||
DialogResult dialogResult = MessageBox.Show(this, Resources.RegionCaptureForm_SaveChangesBeforeClosingEditor, Resources.RegionCaptureForm_ShowExitConfirmation_ShareXImageEditor,
|
||||
MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
|
||||
|
||||
if (dialogResult == DialogResult.Yes)
|
||||
{
|
||||
OnSaveImageRequested();
|
||||
}
|
||||
|
||||
result = dialogResult != DialogResult.Cancel;
|
||||
Resume();
|
||||
}
|
||||
|
||||
|
|
|
@ -1356,6 +1356,16 @@ internal class Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to There are unsaved changes.
|
||||
///Would you like to save the changes before closing the editor.
|
||||
/// </summary>
|
||||
internal static string RegionCaptureForm_SaveChangesBeforeClosingEditor {
|
||||
get {
|
||||
return ResourceManager.GetString("RegionCaptureForm_SaveChangesBeforeClosingEditor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ShareX - Image editor.
|
||||
/// </summary>
|
||||
|
|
|
@ -487,4 +487,8 @@ Você gostaria de fechar o editor de imagens?</value>
|
|||
<data name="ShapeManager_CreateToolbar_ZoomToFitOnOpen" xml:space="preserve">
|
||||
<value>Zoom para caber em aberto</value>
|
||||
</data>
|
||||
<data name="RegionCaptureForm_SaveChangesBeforeClosingEditor" xml:space="preserve">
|
||||
<value>Existem alterações não salvas.
|
||||
Deseja salvar as alterações antes de fechar o editor?</value>
|
||||
</data>
|
||||
</root>
|
|
@ -823,4 +823,8 @@ Would you like to close image editor?</value>
|
|||
<data name="ImageURL" xml:space="preserve">
|
||||
<value>Image URL</value>
|
||||
</data>
|
||||
<data name="RegionCaptureForm_SaveChangesBeforeClosingEditor" xml:space="preserve">
|
||||
<value>There are unsaved changes.
|
||||
Would you like to save the changes before closing the editor</value>
|
||||
</data>
|
||||
</root>
|
Loading…
Reference in a new issue