From 3f802e85484064c0ace3fc20acadfba77f3562d3 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 12 Jun 2018 15:15:41 -0700 Subject: [PATCH 1/2] Consistent UI states --- MainWindow.xaml.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 1e4335dd..fd8cea1d 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -77,6 +77,8 @@ namespace DICUI cmb_DiscType.DisplayMemberPath = "Item1"; cmb_DiscType.SelectedIndex = 0; cmb_DiscType_SelectionChanged(null, null); + + btn_Start.IsEnabled = false; } /// @@ -181,7 +183,7 @@ namespace DICUI if (!File.Exists(sgRawPath)) { lbl_Status.Content = "Error! Could not find sg-raw!"; - return; + break; } Process sgraw = new Process() @@ -199,7 +201,7 @@ namespace DICUI if (!File.Exists(psxtPath)) { lbl_Status.Content = "Error! Could not find psxt001z!"; - return; + break; } // Invoke the program with all 3 configurations @@ -273,17 +275,21 @@ namespace DICUI { case DiscType.NONE: lbl_Status.Content = "Please select a valid disc type"; + btn_Start.IsEnabled = false; break; case DiscType.GameCubeGameDisc: case DiscType.GDROM: lbl_Status.Content = string.Format("{0} discs are partially supported by DIC", Utilities.DiscTypeToString(tuple.Item3)); + btn_Start.IsEnabled = true; break; case DiscType.HDDVD: case DiscType.UMD: lbl_Status.Content = string.Format("{0} discs are not currently supported by DIC", Utilities.DiscTypeToString(tuple.Item3)); + btn_Start.IsEnabled = true; break; default: lbl_Status.Content = string.Format("{0} ready to dump", Utilities.DiscTypeToString(tuple.Item3)); + btn_Start.IsEnabled = true; break; } From ed67522675765b8a3e13eae81028f4b21fbb9d3c Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 12 Jun 2018 16:49:33 -0700 Subject: [PATCH 2/2] Add custom parameter support --- MainWindow.xaml | 19 ++++++++--------- MainWindow.xaml.cs | 52 +++++++++++++++++++++++++++++++++++++--------- Utilities.cs | 3 +++ 3 files changed, 54 insertions(+), 20 deletions(-) diff --git a/MainWindow.xaml b/MainWindow.xaml index a2002525..5b9481dc 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -30,28 +30,30 @@ - + - - - - - + +