From d041e7b1b3144b248f3c2f5d6a1c5d851c7f1aa5 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Tue, 8 Jul 2025 18:14:37 +0100 Subject: [PATCH] [Refactor] Set explicit binding modes. --- RomRepoMgr/Views/About.xaml | 22 ++++----- RomRepoMgr/Views/EditDat.xaml | 40 ++++++++-------- RomRepoMgr/Views/ExportDat.xaml | 12 ++--- RomRepoMgr/Views/ExportRoms.xaml | 42 ++++++++--------- RomRepoMgr/Views/ImportDat.xaml | 20 ++++---- RomRepoMgr/Views/ImportDatFolder.xaml | 54 ++++++++++----------- RomRepoMgr/Views/ImportRomFolder.xaml | 58 +++++++++++------------ RomRepoMgr/Views/MainWindow.xaml | 68 +++++++++++++-------------- RomRepoMgr/Views/RemoveDat.xaml | 2 +- RomRepoMgr/Views/SettingsDialog.xaml | 22 ++++----- RomRepoMgr/Views/SplashWindow.xaml | 32 ++++++------- RomRepoMgr/Views/UpdateStats.xaml | 46 +++++++++--------- 12 files changed, 209 insertions(+), 209 deletions(-) diff --git a/RomRepoMgr/Views/About.xaml b/RomRepoMgr/Views/About.xaml index 5c34e5f..4cc28e5 100644 --- a/RomRepoMgr/Views/About.xaml +++ b/RomRepoMgr/Views/About.xaml @@ -57,13 +57,13 @@ VerticalAlignment="Center" RowDefinitions="Auto,Auto"> @@ -77,18 +77,18 @@ + Text="{Binding SuiteName, Mode=OneWay}" /> + Text="{Binding Copyright, Mode=OneWay}" /> diff --git a/RomRepoMgr/Views/EditDat.xaml b/RomRepoMgr/Views/EditDat.xaml index c8e1745..5c96267 100644 --- a/RomRepoMgr/Views/EditDat.xaml +++ b/RomRepoMgr/Views/EditDat.xaml @@ -56,7 +56,7 @@ diff --git a/RomRepoMgr/Views/ExportDat.xaml b/RomRepoMgr/Views/ExportDat.xaml index f0f7a72..d53d2c4 100644 --- a/RomRepoMgr/Views/ExportDat.xaml +++ b/RomRepoMgr/Views/ExportDat.xaml @@ -46,22 +46,22 @@ + IsVisible="{Binding ProgressVisible, Mode=OneWay}" /> + IsVisible="{Binding ErrorVisible, Mode=OneWay}" /> diff --git a/RomRepoMgr/Views/ExportRoms.xaml b/RomRepoMgr/Views/ExportRoms.xaml index 4eae7f7..b6b1eb0 100644 --- a/RomRepoMgr/Views/ExportRoms.xaml +++ b/RomRepoMgr/Views/ExportRoms.xaml @@ -50,39 +50,39 @@ HorizontalAlignment="Stretch"> - + + 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}" /> - - + IsVisible="{Binding Progress2Visible, Mode=OneWay}"> + + - - + IsVisible="{Binding Progress3Visible, Mode=OneWay}"> + + diff --git a/RomRepoMgr/Views/ImportDat.xaml b/RomRepoMgr/Views/ImportDat.xaml index d534a82..40eb325 100644 --- a/RomRepoMgr/Views/ImportDat.xaml +++ b/RomRepoMgr/Views/ImportDat.xaml @@ -46,25 +46,25 @@ + IsVisible="{Binding ProgressVisible, Mode=OneWay}" /> + IsVisible="{Binding ErrorVisible, Mode=OneWay}" /> diff --git a/RomRepoMgr/Views/ImportDatFolder.xaml b/RomRepoMgr/Views/ImportDatFolder.xaml index 235309c..7b9bd36 100644 --- a/RomRepoMgr/Views/ImportDatFolder.xaml +++ b/RomRepoMgr/Views/ImportDatFolder.xaml @@ -50,7 +50,7 @@ HorizontalAlignment="Stretch"> - + @@ -63,54 +63,54 @@ + IsChecked="{Binding AllFilesChecked, Mode=TwoWay}" + IsEnabled="{Binding IsReady, Mode=OneWay}"> + IsChecked="{Binding RecursiveChecked, Mode=TwoWay}" + IsEnabled="{Binding IsReady, Mode=OneWay}"> + 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}" /> - - + IsVisible="{Binding Progress2Visible, Mode=OneWay}"> + + + IsVisible="{Binding IsImporting, Mode=OneWay}"> - - @@ -121,18 +121,18 @@ diff --git a/RomRepoMgr/Views/ImportRomFolder.xaml b/RomRepoMgr/Views/ImportRomFolder.xaml index bfeb7e1..b3f2cc7 100644 --- a/RomRepoMgr/Views/ImportRomFolder.xaml +++ b/RomRepoMgr/Views/ImportRomFolder.xaml @@ -50,62 +50,62 @@ HorizontalAlignment="Stretch"> - + + IsChecked="{Binding RemoveFilesChecked, Mode=TwoWay}" + IsEnabled="{Binding RemoveFilesEnabled, Mode=OneWay}" + IsVisible="{Binding IsReady, Mode=OneWay}"> + IsChecked="{Binding KnownOnlyChecked, Mode=TwoWay}" + IsVisible="{Binding IsReady, Mode=OneWay}"> + IsChecked="{Binding RecurseArchivesChecked, Mode=TwoWay}" + IsEnabled="{Binding RecurseArchivesEnabled, Mode=OneWay}" + IsVisible="{Binding IsReady, Mode=OneWay}"> + 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}" /> - - + IsVisible="{Binding Progress2Visible, Mode=OneWay}"> + + + IsVisible="{Binding IsImporting, Mode=OneWay}"> - - @@ -119,14 +119,14 @@ HorizontalAlignment="Right"> diff --git a/RomRepoMgr/Views/MainWindow.xaml b/RomRepoMgr/Views/MainWindow.xaml index d008126..db1010d 100644 --- a/RomRepoMgr/Views/MainWindow.xaml +++ b/RomRepoMgr/Views/MainWindow.xaml @@ -17,59 +17,59 @@ + Command="{Binding ImportDatCommand, Mode=OneWay}" /> + Command="{Binding ImportDatFolderCommand, Mode=OneWay}" /> + IsVisible="{Binding !NativeMenuSupported, Mode=OneWay}" + Command="{Binding SettingsCommand, Mode=OneWay}" /> + IsVisible="{Binding !NativeMenuSupported, Mode=OneWay}" + Command="{Binding ExitCommand, Mode=OneWay}" /> + Command="{Binding MountCommand, Mode=OneWay}" + IsEnabled="{Binding Vfs, Converter={x:Static ObjectConverters.IsNull}, Mode=OneWay}" /> + Command="{Binding UmountCommand, Mode=OneWay}" + IsEnabled="{Binding Vfs, Converter={x:Static ObjectConverters.IsNotNull}, Mode=OneWay}" /> + Command="{Binding ImportRomFolderCommand, Mode=OneWay}" /> + IsEnabled="{Binding SelectedRomSet, Converter={x:Static ObjectConverters.IsNotNull}, Mode=OneWay}"> + Command="{Binding ExportRomsCommand, Mode=OneWay}" /> + Command="{Binding ExportDatCommand, Mode=OneWay}" /> + Command="{Binding EditRomSetCommand, Mode=OneWay}" /> + Command="{Binding DeleteRomSetCommand, Mode=OneWay}" /> + Command="{Binding UpdateStatsCommand, Mode=OneWay}" /> + IsVisible="{Binding !NativeMenuSupported, Mode=OneWay}" + Command="{Binding AboutCommand, Mode=OneWay}" /> - - - - - - - - - - - - - - - diff --git a/RomRepoMgr/Views/RemoveDat.xaml b/RomRepoMgr/Views/RemoveDat.xaml index 1a25d79..5143676 100644 --- a/RomRepoMgr/Views/RemoveDat.xaml +++ b/RomRepoMgr/Views/RemoveDat.xaml @@ -46,7 +46,7 @@ @@ -77,13 +77,13 @@ @@ -99,13 +99,13 @@ @@ -121,13 +121,13 @@ @@ -135,19 +135,19 @@ diff --git a/RomRepoMgr/Views/SplashWindow.xaml b/RomRepoMgr/Views/SplashWindow.xaml index 265e931..8154390 100644 --- a/RomRepoMgr/Views/SplashWindow.xaml +++ b/RomRepoMgr/Views/SplashWindow.xaml @@ -23,7 +23,7 @@ VerticalAlignment="Top" Orientation="Vertical" Margin="5"> - @@ -31,21 +31,21 @@ Orientation="Horizontal"> + IsVisible="{Binding LoadingSettingsOk, Mode=OneWay}"> + IsVisible="{Binding LoadingSettingsError, Mode=OneWay}"> + IsVisible="{Binding LoadingSettingsUnknown, Mode=OneWay}"> @@ -57,21 +57,21 @@ Orientation="Horizontal"> + IsVisible="{Binding CheckingUnArOk, Mode=OneWay}"> + IsVisible="{Binding CheckingUnArError, Mode=OneWay}"> + IsVisible="{Binding CheckingUnArUnknown, Mode=OneWay}"> @@ -83,21 +83,21 @@ Orientation="Horizontal"> + IsVisible="{Binding LoadingDatabaseOk, Mode=OneWay}"> + IsVisible="{Binding LoadingDatabaseError, Mode=OneWay}"> + IsVisible="{Binding LoadingDatabaseUnknown, Mode=OneWay}"> @@ -109,21 +109,21 @@ Orientation="Horizontal"> + IsVisible="{Binding MigratingDatabaseOk, Mode=OneWay}"> + IsVisible="{Binding MigratingDatabaseError, Mode=OneWay}"> + IsVisible="{Binding MigratingDatabaseUnknown, Mode=OneWay}"> @@ -135,21 +135,21 @@ Orientation="Horizontal"> + IsVisible="{Binding LoadingRomSetsOk, Mode=OneWay}"> + IsVisible="{Binding LoadingRomSetsError, Mode=OneWay}"> + IsVisible="{Binding LoadingRomSetsUnknown, Mode=OneWay}"> diff --git a/RomRepoMgr/Views/UpdateStats.xaml b/RomRepoMgr/Views/UpdateStats.xaml index 66ef483..530de7c 100644 --- a/RomRepoMgr/Views/UpdateStats.xaml +++ b/RomRepoMgr/Views/UpdateStats.xaml @@ -44,114 +44,114 @@ + IsVisible="{Binding ProgressVisible, Mode=OneWay}" /> - - - - - - - - - - - - - - @@ -163,8 +163,8 @@