mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-30 17:05:37 +08:00
110 lines
6.7 KiB
XML
110 lines
6.7 KiB
XML
<!-- Game Resource browser
|
|
|
|
Copyright (C) 2014 by morkt
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
of this software and associated documentation files (the "Software"), to
|
|
deal in the Software without restriction, including without limitation the
|
|
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
sell copies of the Software, and to permit persons to whom the Software is
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
all copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
IN THE SOFTWARE.
|
|
-->
|
|
<w:ModalWindow x:Class="GARbro.GUI.AboutBox"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:GARbro.GUI"
|
|
xmlns:w="clr-namespace:Rnd.Windows"
|
|
xmlns:s="clr-namespace:GARbro.GUI.Strings"
|
|
xmlns:gr="clr-namespace:GameRes;assembly=GameRes"
|
|
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
|
|
Title="{x:Static s:guiStrings.TextAboutTitle}" Height="306" Width="500" ResizeMode="NoResize"
|
|
Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
|
|
ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
|
|
<Window.Resources>
|
|
<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>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="4*" />
|
|
<ColumnDefinition Width="7*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<StackPanel Grid.Column="0" Grid.Row="0" Grid.RowSpan="3" Margin="10"
|
|
DataContext="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:AboutBox}}}">
|
|
<Label Content="{Binding Path=AssemblyTitle, Mode=OneWay}" />
|
|
<Label Content="{Binding Path=VersionString, Mode=OneWay}" />
|
|
<Label Content="{Binding Path=AssemblyCopyright, Mode=OneWay}" />
|
|
</StackPanel>
|
|
<Button Grid.Row="3" VerticalAlignment="Bottom" HorizontalAlignment="Left" VerticalContentAlignment="Center" IsDefault="true"
|
|
Content="{x:Static s:guiStrings.ButtonOK}" Margin="10,0,0,10" Width="70" Height="25" Click="Button_Click" IsCancel="True"/>
|
|
<Grid Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Margin="10,8,10,6">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Text="{x:Static s:guiStrings.TextAboutSupportedArchives}" Grid.Row="0" Margin="0" />
|
|
<Border Grid.Row="1" BorderThickness="1" BorderBrush="Black" VerticalAlignment="Stretch" Margin="0" SnapsToDevicePixels="True">
|
|
<ScrollViewer Grid.Row="1" Margin="0" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"
|
|
Background="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"
|
|
BorderThickness="1" BorderBrush="Black">
|
|
<ItemsControl Name="ArchiveFormats" ItemsSource="{Binding Source={StaticResource FormatsSource}}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<StackPanel Orientation="Horizontal">
|
|
<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}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
</Border>
|
|
</Grid>
|
|
<Grid Grid.Column="1" Grid.Row="2" Grid.RowSpan="2" Margin="10,2,10,10">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Grid.Row="0" Text="{x:Static s:guiStrings.TextAboutSupportedImages}" Margin="0" />
|
|
<Border Grid.Row="1" BorderThickness="1" BorderBrush="Black" VerticalAlignment="Stretch" Margin="0" SnapsToDevicePixels="True">
|
|
<ScrollViewer VerticalAlignment="Stretch" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Margin="0" Background="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" BorderThickness="1" BorderBrush="Black">
|
|
<ItemsControl Name="ImageFormats" ItemsSource="{Binding Source={x:Static gr:FormatCatalog.Instance}, Path=ImageFormats, Mode=OneWay}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="{Binding Tag}" Margin="3,0,5,0" />
|
|
<TextBlock Text="{x:Static s:guiStrings.TextAboutBuiltin}" Margin="0,0,5,0" Visibility="{Binding IsBuiltin, Converter={StaticResource guiBoolToVisibilityConverter}}"/>
|
|
<TextBlock Text="{Binding Description}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
</Border>
|
|
</Grid>
|
|
</Grid>
|
|
</w:ModalWindow>
|