1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-22 18:15:47 +02:00

Add sound notification file size warning as it's now loaded into memory

This commit is contained in:
chylex 2020-06-08 23:29:37 +02:00
parent 16ced3d827
commit 8502f9105f

View File

@ -72,6 +72,14 @@ private void btnBrowseSound_Click(object sender, EventArgs e){
};
if (dialog.ShowDialog() == DialogResult.OK){
try{
if (new FileInfo(dialog.FileName).Length > (1024 * 1024) && !FormMessage.Warning("Sound Notification", "The sound file is larger than 1 MB, this will cause increased memory usage. Use this file anyway?", FormMessage.Yes, FormMessage.No)){
return;
}
}catch{
// ignore
}
tbCustomSound.Text = dialog.FileName;
}
}