public void Shutdown()
        {
            // Call this method before the player is stopped. It ensures that the App stays alive until the playing file is saved as well.
            MusicPropertiesController.Shutdown();

            TranscodingController.Shutdown();
            PlaylistController.Shutdown();
            PlayerController.Shutdown();
            ManagerController.Shutdown();

            SaveSettings(appSettingsFileName, appSettings);
            SaveSettings(playlistSettingsFileName, playlistSettings);
        }
        public void Initialize()
        {
            appSettings      = LoadSettings <AppSettings>(appSettingsFileName);
            playlistSettings = LoadSettings <PlaylistSettings>(playlistSettingsFileName);

            ShellService.Settings        = appSettings;
            ShellService.ShowErrorAction = ShellViewModel.ShowError;
            ShellService.ShowMusicPropertiesViewAction = ShowMusicPropertiesView;
            ShellService.ShowPlaylistViewAction        = ShowPlaylistView;
            ShellService.ShowTranscodingListViewAction = ShowTranscodingListView;

            ManagerController.Initialize();
            MusicPropertiesController.PlaylistManager = playlistManager;
            MusicPropertiesController.Initialize();
            PlayerController.PlaylistManager  = playlistManager;
            PlayerController.PlaylistSettings = playlistSettings;
            PlayerController.Initialize();
            PlaylistController.PlaylistSettings = playlistSettings;
            PlaylistController.PlaylistManager  = playlistManager;
            PlaylistController.Initialize();
            TranscodingController.Initialize();
        }