Esempio n. 1
0
        public async Task CreateAlbum()
        {
            var result = await _dialogService.AskToAddAlbum();

            if (result.IsOk)
            {
                var newAlbum = new Album {
                    Title = result.Title
                };
                _databaseService.AddAlbum(newAlbum);
                var cell = new AlbumCellViewModel
                {
                    GUID = newAlbum.GUID,
                    Name = newAlbum.Title
                };
                cell.DeleteAction = () => DeleteAlbum(cell);
                cell.OpenAction   = () => OpenAlbum(cell);
                Albums.Add(cell);
            }
        }