initial load
This commit is contained in:
@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using YouTubeViewers.WPF.Commands;
|
||||
using YouTubeViewers.Domain.Models;
|
||||
using YouTubeViewers.WPF.Stores;
|
||||
|
||||
namespace YouTubeViewers.WPF.ViewModels
|
||||
{
|
||||
public class YouTubeViewersListingItemViewModel : ViewModelBase
|
||||
{
|
||||
//private YouTubeViewer _youTubeViewer;
|
||||
//private YouTubeViewersStore _youTubeViewersStore;
|
||||
//private ModalNavigationStore _modalNavigationStore;
|
||||
|
||||
public YouTubeViewer YouTubeViewer { get; private set; }
|
||||
|
||||
public string UserName => YouTubeViewer.Username;
|
||||
|
||||
public ICommand EditCommand { get; }
|
||||
public ICommand DeleteCommand { get; }
|
||||
|
||||
public YouTubeViewersListingItemViewModel(YouTubeViewer youTubeViewer, YouTubeViewersStore youTubeViewersStore, ModalNavigationStore modalNavigationStore)
|
||||
{
|
||||
YouTubeViewer = youTubeViewer;
|
||||
|
||||
EditCommand = new OpenEditYouTubeViewerCommand(this, youTubeViewersStore, modalNavigationStore);
|
||||
DeleteCommand = new DeleteYouTubeViewerCommand(this, youTubeViewersStore);
|
||||
}
|
||||
|
||||
public void Update(YouTubeViewer youTubeViewer)
|
||||
{
|
||||
YouTubeViewer = youTubeViewer;
|
||||
OnPropertyChanged(nameof(UserName));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user