internal void UndockControlFromParent() { grid.Children.Remove(this); grid.Children.Remove(split); grid.ColumnDefinitions.Remove(controlColumn); grid.ColumnDefinitions.Remove(splitColumn); playlistControlParent = null; }
public static void StorePlaylistControl(PlaylistControl playlistControl) { Properties.Settings.Default.ManagedPlaylists.Clear(); List <string> plist = playlistControl.listView.playlistManager.GetPlaylistsAsFiles(); foreach (string s in plist) { Properties.Settings.Default.ManagedPlaylists.Add(s); } }
public static void RestorePlaylistControl(PlaylistControl playlistControl) { foreach (string s in Properties.Settings.Default.ManagedPlaylists) { playlistControl.listView.playlistManager.AddPlaylistFromFile(s); } if (playlistControl.listView.Items.Count < 0) { return; } VMPlaylist p = playlistControl.FindPlaylist(Properties.Settings.Default.LastPlaylist); if (p == null) { return; } TrackControl tc = playlistControl.AddDockColumn(p); tc.viewModel.PlaySong(Properties.Settings.Default.CurrentSong, false); PlayState ps = (PlayState)Properties.Settings.Default.PlayState; if (ps == PlayState.IsPaused) { MusicPlayer.Player.Pause(); } if (ps == PlayState.Stopped) { MusicPlayer.Player.Stop(); } if (ps == PlayState.IsPlaying) { MusicPlayer.Player.Resume(Properties.Settings.Default.TrackPosition); } }