/// <summary> /// Initializes a new instance of the <see cref="AudioBandToolbarViewModel"/> class. /// </summary> /// <param name="viewModels">The view models.</param> /// <param name="appSettings">The app settings.</param> /// <param name="audioSourceManager">The audio source mananger.</param> /// <param name="messageBus">The message bus.</param> /// <param name="audioSession">The audio session.</param> public AudioBandToolbarViewModel(IViewModelContainer viewModels, IAppSettings appSettings, IAudioSourceManager audioSourceManager, IMessageBus messageBus, IAudioSession audioSession) { _appSettings = appSettings; _audioSourceManager = audioSourceManager; _messageBus = messageBus; _audioSession = audioSession; ViewModels = viewModels; ShowSettingsWindowCommand = new RelayCommand(ShowSettingsWindowCommandOnExecute); LoadCommand = new AsyncRelayCommand <object>(LoadCommandOnExecute); SelectAudioSourceCommand = new AsyncRelayCommand <IInternalAudioSource>(SelectAudioSourceCommandOnExecute); }
/// <summary> /// Initializes a new instance of the <see cref="MainControl"/> class. /// Entry point. /// </summary> /// <param name="options">The deskband options.</param> /// <param name="info">The taskbar info.</param> /// <param name="track">The track model.</param> /// <param name="appsettings">The app settings</param> /// <param name="audiosourceMananger">The audio source manager</param> /// <param name="settingsWindow">The settings window.</param> /// <param name="labelService">The label service.</param> public MainControl( CSDeskBandOptions options, TaskbarInfo info, Track track, IAppSettings appsettings, IAudioSourceManager audiosourceMananger, ISettingsWindow settingsWindow, ICustomLabelService labelService) { InitializeComponent(); _uiDispatcher = Dispatcher.CurrentDispatcher; Options = options; TaskbarInfo = info; _appSettings = appsettings; _audioSourceManager = audiosourceMananger; _track = track; _settingsWindow = settingsWindow; _labelService = labelService; #pragma warning disable CS4014 Task.Run(InitializeAsync); #pragma warning restore CS4014 }