Files
romrepomgr/RomRepoMgr/Views/ImportRomFolder.axaml

135 lines
7.4 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 RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,*,Auto">
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" />
2025-07-08 18:14:37 +01:00
<TextBlock Text="{Binding FolderPath, Mode=OneWay}" />
2020-08-22 21:57:05 +01:00
</StackPanel>
2024-11-09 01:37:59 +00:00
<CheckBox Grid.Row="1"
2025-07-08 18:14:37 +01:00
IsChecked="{Binding RemoveFilesChecked, Mode=TwoWay}"
IsEnabled="{Binding RemoveFilesEnabled, Mode=OneWay}"
IsVisible="{Binding IsReady, Mode=OneWay}">
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"
2025-07-08 18:14:37 +01:00
IsChecked="{Binding KnownOnlyChecked, Mode=TwoWay}"
IsVisible="{Binding IsReady, Mode=OneWay}">
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"
2025-07-08 18:14:37 +01:00
IsChecked="{Binding RecurseArchivesChecked, Mode=TwoWay}"
IsEnabled="{Binding RecurseArchivesEnabled, Mode=OneWay}"
IsVisible="{Binding IsReady, Mode=OneWay}">
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"
2025-07-08 18:14:37 +01:00
Text="{Binding StatusMessage, Mode=OneWay}"
2024-11-09 01:37:59 +00:00
FontWeight="Bold"
HorizontalAlignment="Center" />
<ProgressBar Grid.Row="5"
2025-07-08 18:14:37 +01:00
Minimum="{Binding ProgressMinimum, Mode=OneWay}"
Maximum="{Binding ProgressMaximum, Mode=OneWay}"
Value="{Binding ProgressValue, Mode=OneWay}"
IsIndeterminate="{Binding ProgressIsIndeterminate, Mode=OneWay}"
IsVisible="{Binding ProgressVisible, Mode=OneWay}" />
2024-11-09 01:37:59 +00:00
<StackPanel Grid.Row="6"
2025-07-08 18:14:37 +01:00
IsVisible="{Binding Progress2Visible, Mode=OneWay}">
<TextBlock Text="{Binding Status2Message, Mode=OneWay}" />
<ProgressBar Minimum="{Binding Progress2Minimum, Mode=OneWay}"
Maximum="{Binding Progress2Maximum, Mode=OneWay}"
Value="{Binding Progress2Value, Mode=OneWay}"
IsIndeterminate="{Binding Progress2IsIndeterminate, Mode=OneWay}" />
2020-08-22 21:57:05 +01:00
</StackPanel>
2024-11-09 01:37:59 +00:00
<DataGrid Grid.Row="7"
2025-07-08 18:14:37 +01:00
ItemsSource="{Binding ImportResults, Mode=OneWay}"
2024-11-09 01:37:59 +00:00
HorizontalScrollBarVisibility="Visible"
2025-07-08 18:14:37 +01:00
IsVisible="{Binding IsImporting, Mode=OneWay}">
2020-08-22 21:57:05 +01:00
<DataGrid.Columns>
2025-07-08 18:14:37 +01:00
<DataGridTextColumn Binding="{Binding Filename, Mode=OneWay}"
2024-11-09 01:37:59 +00:00
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>
2025-07-08 18:14:37 +01:00
<DataGridTextColumn Binding="{Binding Status, Mode=OneWay}"
2024-11-09 01:37:59 +00:00
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"
2025-07-08 18:14:37 +01:00
IsEnabled="{Binding CanClose, Mode=OneWay}"
Command="{Binding CloseCommand, Mode=OneWay}">
<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"
2025-07-08 18:14:37 +01:00
IsEnabled="{Binding CanStart, Mode=OneWay}"
Command="{Binding StartCommand, Mode=OneWay}">
<TextBlock Text="{x:Static resources:Localization.StartLabel}" />
2020-08-22 21:57:05 +01:00
</Button>
</StackPanel>
</Grid>
</Border>
</Window>