diff --git a/Mystify/App.axaml.cs b/Mystify/App.axaml.cs index 7a29ad7..539c55c 100644 --- a/Mystify/App.axaml.cs +++ b/Mystify/App.axaml.cs @@ -64,7 +64,7 @@ namespace Mystify private void OpenMainWindow() { - _mainWindowViewModel?.UpdateChannelsAndControllables(); + _mainWindowViewModel?.UpdateChannels(); _mainWindow?.Show(); } diff --git a/Mystify/ViewModels/MainWindowViewModel.cs b/Mystify/ViewModels/MainWindowViewModel.cs index f97ca43..1666c90 100644 --- a/Mystify/ViewModels/MainWindowViewModel.cs +++ b/Mystify/ViewModels/MainWindowViewModel.cs @@ -8,7 +8,6 @@ using System.Collections.ObjectModel; using System.Linq; using System.Windows.Input; using Avalonia.Controls; -using Lib.Audio.Interfaces; using Lib.Driver; using Mystify.Views; using ReactiveUI; @@ -33,27 +32,6 @@ namespace Mystify.ViewModels } public ObservableCollection? Channels => _mainModel?.Channels?.Select(c => new ChannelViewModel(c, _mainWindow, _mainModel)).ToObservableCollection(); - public List? Controllables => _mainModel?.Controllables; - - public ChannelViewModel? SelectedChannel - { - get => _mainModel?.SelectedChannel == null ? null : new ChannelViewModel(_mainModel.SelectedChannel, _mainWindow, _mainModel); - set - { - if (_mainModel != null) - _mainModel.SelectedChannel = value?.Channel; - } - } - - public IControllable? SelectedControllable - { - get => _mainModel?.SelectedControllable; - set - { - if (_mainModel != null) - _mainModel.SelectedControllable = value; - } - } public bool UseMidiView { @@ -80,15 +58,8 @@ namespace Mystify.ViewModels RaisePropertyChanged(() => SelectedDeviceText); RaisePropertyChanged(() => Channels); - RaisePropertyChanged(() => Controllables); }); - public ICommand MapControllableCommand => ReactiveCommand.Create(() => _mainModel?.MapControllable()); - - public void UpdateChannelsAndControllables() - { - RaisePropertyChanged(() => Channels); - RaisePropertyChanged(() => Controllables); - } + public void UpdateChannels() => RaisePropertyChanged(() => Channels); } } diff --git a/Mystify/Views/MainWindow.axaml b/Mystify/Views/MainWindow.axaml index f5a11d8..81615dc 100644 --- a/Mystify/Views/MainWindow.axaml +++ b/Mystify/Views/MainWindow.axaml @@ -44,23 +44,5 @@ - - - - - - - - - - - - - -