mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-01 08:34:11 +02:00
Add sound notification file size warning as it's now loaded into memory
This commit is contained in:
parent
16ced3d827
commit
8502f9105f
@ -72,6 +72,14 @@ private void btnBrowseSound_Click(object sender, EventArgs e){
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (dialog.ShowDialog() == DialogResult.OK){
|
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;
|
tbCustomSound.Text = dialog.FileName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user