private void AddSoundBoard() { string name = _viewModel._dialogService.NameDialog( _viewModel._container.Get <MainWindow>(), Resources.CommandsRepository_AddSoundBoard_Add_soundboard, Resources.CommandsRepository_AddSoundBoard_Please_enter_a_name_for_the_new_soundboard, string.Empty); if (!string.IsNullOrEmpty(name)) { Model.SoundBoard addedSoundBoard = new Model.SoundBoard { Name = name }; _viewModel.SoundBoards.Add(addedSoundBoard); _viewModel.SelectedSoundBoard = addedSoundBoard; } }
private bool AreBoardsEqual(Model.SoundBoard board, Model.SoundBoard otherBoard) { return(board.Name == otherBoard.Name && board.Sounds.Count == otherBoard.Sounds.Count && board.Sounds.SequenceEqual(otherBoard.Sounds, new SoundEqualityComparer())); }