mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-02 18:26:27 +13:00
Show confirmation msg box before running file if file type is not image, text or video
This commit is contained in:
parent
8a80f56653
commit
74c5172778
1 changed files with 3 additions and 1 deletions
|
@ -24,6 +24,7 @@ You should have received a copy of the GNU General Public License
|
||||||
#endregion License Information (GPL v3)
|
#endregion License Information (GPL v3)
|
||||||
|
|
||||||
using ShareX.HelpersLib;
|
using ShareX.HelpersLib;
|
||||||
|
using ShareX.Properties;
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
@ -257,7 +258,8 @@ private void PbThumbnail_MouseClick(object sender, MouseEventArgs e)
|
||||||
pbThumbnail.Enabled = true;
|
pbThumbnail.Enabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (Helpers.IsTextFile(filePath) || Helpers.IsVideoFile(filePath) || MessageBox.Show("Would you like to run this file?" + "\r\n\r\n" + filePath,
|
||||||
|
Resources.ShareXConfirmation, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
Helpers.OpenFile(filePath);
|
Helpers.OpenFile(filePath);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue