mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-11 20:39:29 +08:00
(AddSelectionExec): wrapped method body into try/catch block.
This commit is contained in:
parent
9cdb4f0efe
commit
2f2bbb3dc0
@ -1061,14 +1061,16 @@ namespace GARbro.GUI
|
||||
/// </summary>
|
||||
void AddSelectionExec (object sender, ExecutedRoutedEventArgs e)
|
||||
{
|
||||
var mask_list = new SortedSet<string>();
|
||||
try
|
||||
{
|
||||
var ext_list = new SortedSet<string>();
|
||||
foreach (var entry in ViewModel)
|
||||
{
|
||||
var ext = Path.GetExtension (entry.Name).ToLowerInvariant();
|
||||
if (!string.IsNullOrEmpty (ext))
|
||||
mask_list.Add ("*" + ext);
|
||||
ext_list.Add (ext);
|
||||
}
|
||||
var selection = new EnterMaskDialog (mask_list);
|
||||
var selection = new EnterMaskDialog (ext_list.Select (ext => "*"+ext));
|
||||
selection.Owner = this;
|
||||
var result = selection.ShowDialog();
|
||||
if (!result.Value)
|
||||
@ -1098,6 +1100,11 @@ namespace GARbro.GUI
|
||||
if (count != 0)
|
||||
SetStatusText (Localization.Format ("MsgSelectedFiles", count));
|
||||
}
|
||||
catch (Exception X)
|
||||
{
|
||||
SetStatusText (X.Message);
|
||||
}
|
||||
}
|
||||
|
||||
void SelectAllExec (object sender, ExecutedRoutedEventArgs e)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user