(IResource.CanWrite): new property.

(ArchiveFormat.CanCreate): renamed to CanWrite.
This commit is contained in:
morkt
2016-10-11 00:05:22 +04:00
parent 3c5a61d580
commit f1d66206bc
248 changed files with 323 additions and 279 deletions

View File

@@ -12,7 +12,7 @@
<StackPanel Orientation="Horizontal" Margin="20,10,20,0">
<Label Content="{x:Static s:guiStrings.LabelDestinationFormat}" Target="{Binding ElementName=ImageConversionFormat}" HorizontalAlignment="Left" Padding="0,0,10,0" VerticalAlignment="Center"/>
<ComboBox Name="ImageConversionFormat" DisplayMemberPath="Tag" Width="60" HorizontalAlignment="Left"
ItemsSource="{Binding Source={x:Static g:FormatCatalog.Instance}, Path=ImageFormats, Mode=OneWay}" SelectedValuePath="Tag"
ItemsSource="{Binding}" SelectedValuePath="Tag"
SelectedValue="{Binding Source={x:Static p:Settings.Default}, Path=appLastImageFormat, Mode=TwoWay}"/>
</StackPanel>
<TextBlock Text="{x:Static s:guiStrings.TextAudioConversion}" Margin="20,10,20,0"/>

View File

@@ -1,5 +1,7 @@
using System.Windows;
using System.Linq;
using System.Windows;
using System.Windows.Input;
using GameRes;
using GARbro.GUI.Strings;
using Microsoft.WindowsAPICodePack.Dialogs;
@@ -13,6 +15,7 @@ namespace GARbro.GUI
public ConvertMedia ()
{
InitializeComponent ();
ImageConversionFormat.ItemsSource = FormatCatalog.Instance.ImageFormats.Where (f => f.CanWrite);
}
private void BrowseExec (object sender, ExecutedRoutedEventArgs e)

View File

@@ -52,7 +52,7 @@ namespace GARbro.GUI
ArchiveName.Text = initial_name;
}
private readonly IEnumerable<ArchiveFormat> m_formats = FormatCatalog.Instance.ArcFormats.Where (f => f.CanCreate).OrderBy (f => f.Tag);
private readonly IEnumerable<ArchiveFormat> m_formats = FormatCatalog.Instance.ArcFormats.Where (f => f.CanWrite).OrderBy (f => f.Tag);
public IEnumerable<ArchiveFormat> ArcFormats { get { return m_formats; } }