mirror of
https://github.com/claunia/romrepomgr.git
synced 2025-12-16 11:14:45 +00:00
Adjust visibility of items in import ROM view.
This commit is contained in:
@@ -30,6 +30,8 @@ public sealed partial class ImportRomFolderViewModel : ViewModelBase
|
|||||||
readonly ConcurrentBag<DbMedia> _newMedias = [];
|
readonly ConcurrentBag<DbMedia> _newMedias = [];
|
||||||
readonly Stopwatch _stopwatch = new();
|
readonly Stopwatch _stopwatch = new();
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
|
bool _canChoose;
|
||||||
|
[ObservableProperty]
|
||||||
bool _canClose;
|
bool _canClose;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
bool _canStart;
|
bool _canStart;
|
||||||
@@ -75,7 +77,6 @@ public sealed partial class ImportRomFolderViewModel : ViewModelBase
|
|||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
bool _statusMessage2Visible;
|
bool _statusMessage2Visible;
|
||||||
|
|
||||||
|
|
||||||
public ImportRomFolderViewModel()
|
public ImportRomFolderViewModel()
|
||||||
{
|
{
|
||||||
SelectFolderCommand = new AsyncRelayCommand(SelectFolderAsync);
|
SelectFolderCommand = new AsyncRelayCommand(SelectFolderAsync);
|
||||||
@@ -86,6 +87,7 @@ public sealed partial class ImportRomFolderViewModel : ViewModelBase
|
|||||||
KnownOnlyChecked = true;
|
KnownOnlyChecked = true;
|
||||||
RecurseArchivesChecked = Settings.Settings.UnArUsable;
|
RecurseArchivesChecked = Settings.Settings.UnArUsable;
|
||||||
RemoveFilesEnabled = false;
|
RemoveFilesEnabled = false;
|
||||||
|
CanChoose = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICommand SelectFolderCommand { get; }
|
public ICommand SelectFolderCommand { get; }
|
||||||
@@ -122,6 +124,8 @@ public sealed partial class ImportRomFolderViewModel : ViewModelBase
|
|||||||
CanClose = false;
|
CanClose = false;
|
||||||
CanStart = false;
|
CanStart = false;
|
||||||
IsImporting = true;
|
IsImporting = true;
|
||||||
|
IsReady = false;
|
||||||
|
CanChoose = false;
|
||||||
|
|
||||||
_ = Task.Run(() => _rootImporter.FindFiles(FolderPath));
|
_ = Task.Run(() => _rootImporter.FindFiles(FolderPath));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,8 @@
|
|||||||
<Button Content="{x:Static resources:Localization.ChooseLabel}"
|
<Button Content="{x:Static resources:Localization.ChooseLabel}"
|
||||||
Command="{Binding SelectFolderCommand, Mode=OneWay}"
|
Command="{Binding SelectFolderCommand, Mode=OneWay}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center"
|
||||||
|
IsVisible="{Binding CanChoose}" />
|
||||||
<TextBlock Text="{x:Static resources:Localization.PathLabel}"
|
<TextBlock Text="{x:Static resources:Localization.PathLabel}"
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
|
|||||||
Reference in New Issue
Block a user