private void AddRootFolder(object sender, RoutedEventArgs e) { FolderBrowserDialog dialog = new FolderBrowserDialog(); if (dialog.ShowDialog() != System.Windows.Forms.DialogResult.OK) { return; } try { if (MyPlayer.Source != null) { new AlertMessage("You should stop media player first.", String.Empty).ShowDialog(); return; } _libraryManager.AddRootPath(dialog.SelectedPath); ShowLibraryList(sender, e); } catch (Exception ex) { new AlertMessage(ex.Message, ex.StackTrace).ShowDialog(); } }