Files
romrepomgr/RomRepoMgr/Views/ImportRomFolder.xaml

140 lines
7.3 KiB
Plaintext
Raw Normal View History

2020-08-22 21:57:05 +01:00
<!--
// /***************************************************************************
// RomRepoMgr - ROM repository manager
//
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// [ License ]
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General public License for more details.
//
// You should have received a copy of the GNU General public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//
2024-11-08 19:13:57 +00:00
// Copyright © 2020-2024 Natalia Portillo
2020-08-22 21:57:05 +01:00
// ****************************************************************************/
-->
2024-11-09 01:37:59 +00:00
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
2020-08-22 21:57:05 +01:00
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
2024-11-09 01:37:59 +00:00
xmlns:vm="clr-namespace:RomRepoMgr.ViewModels;assembly=RomRepoMgr"
xmlns:resources="clr-namespace:RomRepoMgr.Resources"
2024-11-09 01:37:59 +00:00
mc:Ignorable="d"
d:DesignWidth="800"
d:DesignHeight="450"
Width="480"
Height="360"
x:Class="RomRepoMgr.Views.ImportRomFolder"
Icon="/Assets/avalonia-logo.ico"
CanResize="False"
Title="{x:Static resources:Localization.ImportRomFolderTitle}"
2024-11-09 01:37:59 +00:00
WindowStartupLocation="CenterOwner">
2020-08-22 21:57:05 +01:00
<Design.DataContext>
<vm:ImportRomFolderViewModel />
</Design.DataContext>
<Border Padding="15">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="*" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions>
2024-11-09 01:37:59 +00:00
<StackPanel Grid.Row="0"
Orientation="Horizontal"
HorizontalAlignment="Stretch">
<TextBlock Text="{x:Static resources:Localization.PathLabel}"
2024-11-09 01:37:59 +00:00
FontWeight="Bold" />
<TextBlock Text="{Binding FolderPath}" />
2020-08-22 21:57:05 +01:00
</StackPanel>
2024-11-09 01:37:59 +00:00
<CheckBox Grid.Row="1"
IsChecked="{Binding RemoveFilesChecked}"
IsEnabled="{Binding RemoveFilesEnabled}"
2020-08-23 21:21:55 +01:00
IsVisible="{Binding IsReady}">
2020-08-22 21:57:05 +01:00
<CheckBox.Content>
<TextBlock Text="{x:Static resources:Localization.RemoveFilesLabel}" />
2020-08-22 21:57:05 +01:00
</CheckBox.Content>
</CheckBox>
2024-11-09 01:37:59 +00:00
<CheckBox Grid.Row="2"
IsChecked="{Binding KnownOnlyChecked}"
IsVisible="{Binding IsReady}">
2020-08-22 21:57:05 +01:00
<CheckBox.Content>
<TextBlock Text="{x:Static resources:Localization.KnownOnlyLabel}" />
2020-08-22 21:57:05 +01:00
</CheckBox.Content>
</CheckBox>
2024-11-09 01:37:59 +00:00
<CheckBox Grid.Row="3"
IsChecked="{Binding RecurseArchivesChecked}"
IsEnabled="{Binding RecurseArchivesEnabled}"
IsVisible="{Binding IsReady}">
2020-08-22 21:57:05 +01:00
<CheckBox.Content>
<TextBlock Text="{x:Static resources:Localization.RecurseArchivesLabel}" />
2020-08-22 21:57:05 +01:00
</CheckBox.Content>
</CheckBox>
2024-11-09 01:37:59 +00:00
<TextBlock Grid.Row="4"
Text="{Binding StatusMessage}"
FontWeight="Bold"
HorizontalAlignment="Center" />
<ProgressBar Grid.Row="5"
Minimum="{Binding ProgressMinimum}"
Maximum="{Binding ProgressMaximum}"
Value="{Binding ProgressValue}"
IsIndeterminate="{Binding ProgressIsIndeterminate}"
2020-08-22 21:57:05 +01:00
IsVisible="{Binding ProgressVisible}" />
2024-11-09 01:37:59 +00:00
<StackPanel Grid.Row="6"
IsVisible="{Binding Progress2Visible}">
2020-08-22 21:57:05 +01:00
<TextBlock Text="{Binding Status2Message}" />
2024-11-09 01:37:59 +00:00
<ProgressBar Minimum="{Binding Progress2Minimum}"
Maximum="{Binding Progress2Maximum}"
Value="{Binding Progress2Value}"
IsIndeterminate="{Binding Progress2IsIndeterminate}" />
2020-08-22 21:57:05 +01:00
</StackPanel>
2024-11-09 01:37:59 +00:00
<DataGrid Grid.Row="7"
2024-11-09 06:14:25 +00:00
ItemsSource="{Binding ImportResults}"
2024-11-09 01:37:59 +00:00
HorizontalScrollBarVisibility="Visible"
2020-08-22 21:57:05 +01:00
IsVisible="{Binding IsImporting}">
<DataGrid.Columns>
2024-11-09 01:37:59 +00:00
<DataGridTextColumn Binding="{Binding Filename}"
Width="Auto"
IsReadOnly="True">
2020-08-22 21:57:05 +01:00
<DataGridTextColumn.Header>
<TextBlock Text="{x:Static resources:Localization.ResultFilenameLabel}" />
2020-08-22 21:57:05 +01:00
</DataGridTextColumn.Header>
</DataGridTextColumn>
2024-11-09 01:37:59 +00:00
<DataGridTextColumn Binding="{Binding Status}"
Width="Auto"
IsReadOnly="True">
2020-08-22 21:57:05 +01:00
<DataGridTextColumn.Header>
<TextBlock Text="{x:Static resources:Localization.ResultStatusLabel}" />
2020-08-22 21:57:05 +01:00
</DataGridTextColumn.Header>
</DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
2024-11-09 01:37:59 +00:00
<StackPanel Grid.Row="8"
Orientation="Horizontal"
HorizontalAlignment="Right">
<Button HorizontalAlignment="Right"
VerticalAlignment="Center"
IsEnabled="{Binding CanClose}"
2020-08-22 21:57:05 +01:00
Command="{Binding CloseCommand}">
<TextBlock Text="{x:Static resources:Localization.CloseLabel}" />
2020-08-22 21:57:05 +01:00
</Button>
2024-11-09 01:37:59 +00:00
<Button HorizontalAlignment="Right"
VerticalAlignment="Center"
IsEnabled="{Binding CanStart}"
2020-08-22 21:57:05 +01:00
Command="{Binding StartCommand}">
<TextBlock Text="{x:Static resources:Localization.StartLabel}" />
2020-08-22 21:57:05 +01:00
</Button>
</StackPanel>
</Grid>
</Border>
</Window>