From f509ac60dadce8bde46f59da84576b0062a67e51 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sun, 13 Sep 2020 20:41:23 -0700 Subject: [PATCH] Make DiscInformationWindow more robust --- DICUI.Avalonia/MainWindow.axaml.cs | 37 ++++++++------- DICUI/Windows/DiscInformationWindow.xaml.cs | 7 ++- DICUI/Windows/MainWindow.xaml.cs | 50 +++++++++------------ 3 files changed, 49 insertions(+), 45 deletions(-) diff --git a/DICUI.Avalonia/MainWindow.axaml.cs b/DICUI.Avalonia/MainWindow.axaml.cs index 8a73cb3f..95141b0d 100644 --- a/DICUI.Avalonia/MainWindow.axaml.cs +++ b/DICUI.Avalonia/MainWindow.axaml.cs @@ -454,7 +454,7 @@ namespace DICUI.Avalonia private void SetSupportedDriveSpeed() { // Set the drive speed list that's appropriate - var values = Constants.GetSpeedsForMediaType(CurrentMediaType); + var values = Interface.GetSpeedsForMediaType(CurrentMediaType); this.Find("DriveSpeedComboBox").Items = values; ViewModels.LoggerViewModel.VerboseLogLn("Supported media speeds: {0}", string.Join(",", values)); @@ -464,6 +464,21 @@ namespace DICUI.Avalonia this.Find("DriveSpeedComboBox").SelectedItem = speed; } + /// + /// Show the disc information window + /// + /// SubmissionInfo object to display and possibly change + /// Dialog open result + private bool? ShowDiscInformationWindow(SubmissionInfo submissionInfo) + { + var discInformationWindow = new DiscInformationWindow(); + discInformationWindow.SubmissionInfo = submissionInfo; + discInformationWindow.Load(); + discInformationWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner; + discInformationWindow.ShowDialog(this).ConfigureAwait(false).GetAwaiter().GetResult(); + return true; + } + /// /// Begin the dumping process using the given inputs /// @@ -516,7 +531,7 @@ namespace DICUI.Avalonia } } - this.Find