public MusicManager() { CSCoreEngine = new CSCoreEngine(); Playlists = new ObservableCollection <NormalPlaylist>(); CSCoreEngine.TrackFinished += CSCoreEngine_TrackFinished; CSCoreEngine.TrackChanged += CSCoreEngine_TrackChanged; Notification = new NotificationService(CSCoreEngine); Commands = new MusicManagerCommands(this); Random = new Random(); Lasttracks = new List <TrackPlaylistPair>(); Queue = new QueueManager(); DownloadManager = new DownloadManager(); TrackSearcher = new TrackSearcher(this, (MainWindow)Application.Current.MainWindow); }
public void Loaded(MainWindow window) { _baseWindow = window; MySettings = HurricaneSettings.Instance; MusicManager = new MusicManager(); MusicManager.CSCoreEngine.TrackChanged += CSCoreEngine_TrackChanged; MusicManager.CSCoreEngine.ExceptionOccurred += CSCoreEngine_ExceptionOccurred; MusicManager.LoadFromSettings(); MainTabControlIndex = MySettings.CurrentState.MainTabControlIndex; TrackSearcher = new TrackSearcher(MusicManager, window); _keyboardListener = new KeyboardListener(); _keyboardListener.KeyDown += KListener_KeyDown; Updater = new UpdateService(MySettings.Config.Language == "de" ? UpdateService.Language.German : UpdateService.Language.English); Updater.CheckForUpdates(_baseWindow); }