mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
added indicator for implementations that support archive creation.
This commit is contained in:
@@ -27,11 +27,18 @@ IN THE SOFTWARE.
|
|||||||
xmlns:w="clr-namespace:Rnd.Windows"
|
xmlns:w="clr-namespace:Rnd.Windows"
|
||||||
xmlns:s="clr-namespace:GARbro.GUI.Strings"
|
xmlns:s="clr-namespace:GARbro.GUI.Strings"
|
||||||
xmlns:gr="clr-namespace:GameRes;assembly=GameRes"
|
xmlns:gr="clr-namespace:GameRes;assembly=GameRes"
|
||||||
|
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
|
||||||
Title="{x:Static s:guiStrings.TextAboutTitle}" Height="306" Width="475" ResizeMode="NoResize"
|
Title="{x:Static s:guiStrings.TextAboutTitle}" Height="306" Width="475" ResizeMode="NoResize"
|
||||||
Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
|
Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
|
||||||
ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
|
ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<local:BooleanToVisibiltyConverter x:Key="guiBoolToVisibilityConverter" />
|
<local:BooleanToVisibiltyConverter x:Key="guiBoolToVisibilityConverter" />
|
||||||
|
<local:CanCreateConverter x:Key="guiCanCreateConverter"/>
|
||||||
|
<CollectionViewSource x:Key="FormatsSource" Source="{Binding Source={x:Static gr:FormatCatalog.Instance}, Path=ArcFormats, Mode=OneWay}">
|
||||||
|
<CollectionViewSource.SortDescriptions>
|
||||||
|
<scm:SortDescription PropertyName="Tag" Direction="Ascending"/>
|
||||||
|
</CollectionViewSource.SortDescriptions>
|
||||||
|
</CollectionViewSource>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -62,11 +69,12 @@ IN THE SOFTWARE.
|
|||||||
<ScrollViewer Grid.Row="1" Margin="0" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"
|
<ScrollViewer Grid.Row="1" Margin="0" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"
|
||||||
Background="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"
|
Background="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"
|
||||||
BorderThickness="1" BorderBrush="Black">
|
BorderThickness="1" BorderBrush="Black">
|
||||||
<ItemsControl Name="ArchiveFormats" ItemsSource="{Binding Source={x:Static gr:FormatCatalog.Instance}, Path=ArcFormats, Mode=OneWay}">
|
<ItemsControl Name="ArchiveFormats" ItemsSource="{Binding Source={StaticResource FormatsSource}}">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<TextBlock Text="{Binding Tag}" Margin="3,0,5,0" />
|
<TextBlock Text="{Binding Tag}" Margin="3,0,5,0" />
|
||||||
|
<TextBlock Text="{Binding Path=CanCreate, Converter={StaticResource guiCanCreateConverter}}" Margin="0,0,5,0"/>
|
||||||
<TextBlock Text="{Binding Description}" />
|
<TextBlock Text="{Binding Description}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|||||||
@@ -208,4 +208,18 @@ namespace GARbro.GUI
|
|||||||
return isVisible;
|
return isVisible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ValueConversion(typeof(bool), typeof(string))]
|
||||||
|
class CanCreateConverter : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||||
|
{
|
||||||
|
return (bool)value ? "[r/w]" : "[r]";
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user