mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-06 19:31:22 +08:00
display only formats that implement Create method.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using Microsoft.Win32;
|
||||
@@ -23,10 +24,15 @@ namespace GARbro.GUI
|
||||
{
|
||||
var format = this.ArchiveFormat.SelectedItem as ArchiveFormat;
|
||||
if (null != format)
|
||||
ArchiveName.Text = Path.ChangeExtension (initial_name, format.Extensions.First());
|
||||
initial_name = Path.ChangeExtension (initial_name, format.Extensions.First());
|
||||
}
|
||||
ArchiveName.Text = initial_name;
|
||||
}
|
||||
|
||||
private readonly IEnumerable<ArchiveFormat> m_formats = FormatCatalog.Instance.ArcFormats.Where (f => f.CanCreate);
|
||||
|
||||
public IEnumerable<ArchiveFormat> ArcFormats { get { return m_formats; } }
|
||||
|
||||
public ResourceOptions ArchiveOptions { get; private set; }
|
||||
|
||||
void Button_Click (object sender, RoutedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user