diff --git a/Mystify/MainModel.cs b/Mystify/MainModel.cs index 8eba761..df4e1df 100644 --- a/Mystify/MainModel.cs +++ b/Mystify/MainModel.cs @@ -31,7 +31,7 @@ namespace Mystify public List? Controllables => _controllableCollector?.Controllables; public string? DeviceName => _device?.Name; - public void LoadDriverAndDevice(string driverPath) + public void LoadDriverAndDevice(string driverPath, bool useMidiView) { IDriver? driver = _driverLoader.Load(driverPath); @@ -41,7 +41,7 @@ namespace Mystify _device = _deviceFactory.Create(driver); _controllableCollector = _controllableCollectorFactory.Create(); - _device.StartCommunication(); + _device.StartCommunication(useMidiView); } } } \ No newline at end of file diff --git a/Mystify/ViewModels/MainWindowViewModel.cs b/Mystify/ViewModels/MainWindowViewModel.cs index d165719..2f03853 100644 --- a/Mystify/ViewModels/MainWindowViewModel.cs +++ b/Mystify/ViewModels/MainWindowViewModel.cs @@ -35,6 +35,7 @@ namespace Mystify.ViewModels public IChannel? SelectedChannel { get; set; } public IControllable? SelectedControllable { get; set; } + public bool UseMidiView { get; set; } public string SelectedDeviceText => $"Selected Device: {_mainModel?.DeviceName ?? "-"}"; @@ -47,7 +48,7 @@ namespace Mystify.ViewModels string driverPath = (await openFileDialog.ShowAsync(_mainWindow))[0]; - _mainModel?.LoadDriverAndDevice(driverPath); + _mainModel?.LoadDriverAndDevice(driverPath, UseMidiView); RaisePropertyChanged(() => SelectedDeviceText); RaisePropertyChanged(() => Channels); diff --git a/Mystify/Views/MainWindow.axaml b/Mystify/Views/MainWindow.axaml index b8e7a27..72e5a2d 100644 --- a/Mystify/Views/MainWindow.axaml +++ b/Mystify/Views/MainWindow.axaml @@ -17,7 +17,8 @@