diff --git a/BassBoom/Views/MainView.axaml.cs b/BassBoom/Views/MainView.axaml.cs index 4554e57..f8e5245 100644 --- a/BassBoom/Views/MainView.axaml.cs +++ b/BassBoom/Views/MainView.axaml.cs @@ -224,7 +224,9 @@ public void SelectDriver() { var drivers = DeviceTools.GetDrivers(); var driverArray = drivers.Keys.ToArray(); - var selection = new SelectionWindow(new ObservableCollection(driverArray)); + var selection = new SelectionWindow(); + selection.selection.ItemsSource = driverArray; + selection.SelectInfo.Text = $"Select a driver. {driverArray.Length} drivers found in your system."; selection.Closed += (s, e) => { string answer = selection.SelectionInput; @@ -268,7 +270,9 @@ public void SelectDevice() string activeDevice = selectedDevice; var devices = DeviceTools.GetDevices(selectedDriver, ref activeDevice); var deviceArray = devices.Keys.ToArray(); - var selection = new SelectionWindow(new ObservableCollection(deviceArray)); + var selection = new SelectionWindow(); + selection.selection.ItemsSource = deviceArray; + selection.SelectInfo.Text = $"Select a device for the {selectedDriver} driver. {deviceArray.Length} devices found."; selection.Closed += (s, e) => { string answer = selection.SelectionInput; diff --git a/BassBoom/Views/SelectionWindow.axaml b/BassBoom/Views/SelectionWindow.axaml index 5732bc1..b40cc61 100644 --- a/BassBoom/Views/SelectionWindow.axaml +++ b/BassBoom/Views/SelectionWindow.axaml @@ -29,9 +29,12 @@ x:Class="BassBoom.Views.SelectionWindow" Title="Select..."> - - - + + Please select an item from the drop-down box below. + + + + diff --git a/BassBoom/Views/SelectionWindow.axaml.cs b/BassBoom/Views/SelectionWindow.axaml.cs index 9c05ad8..e0c2132 100644 --- a/BassBoom/Views/SelectionWindow.axaml.cs +++ b/BassBoom/Views/SelectionWindow.axaml.cs @@ -25,13 +25,10 @@ public partial class SelectionWindow : Window { public string SelectionInput { get; set; } - public SelectionWindow(ObservableCollection selections) + public SelectionWindow() { InitializeComponent(); - DataContext = new SelectionData(this) - { - Selections = selections - }; + DataContext = new SelectionData(this); ShowInTaskbar = false; CanResize = false; } @@ -41,8 +38,6 @@ public class SelectionData { private readonly Window view; - public ObservableCollection Selections { get; set; } = new(); - public void Acknowledge() { var thisView = (SelectionWindow)view;