public DefaultViewModel(IMessenger messenger, IMonsterDatabase dbConnexion) { _alreadyAttachedBehavior = new List <Grid>(); _messenger = messenger; _notificationMessageCallback = MediaPlayerPlaybackCallback; _dbConn = dbConnexion; _showedCollection = new ObservableCollection <Cast>(); _messenger.Register <NotificationMessage>(this, MessengerAction); _messenger.Register <NotificationMessage>(this, ViewBuiltNotificationAction); _messenger.Register <GenericMessage <Cast> >(this, Message.REQUEST_VIEW_UPDATE_PLAYBACK_BADGE, UpdateViewPlaybackBadgeRequestAction); _messenger.Register <NotificationMessage>(this, Message.MEDIAPLAYER_PLAYBACK_STATE_PLAYING, PlaybackStatePlayingAction); _messenger.Register <NotificationMessage>(this, Message.MEDIAPLAYER_PLAYBACK_STATE_PAUSED, PlaybackStatePausedAction); _scrollerBarValueChangedCommand = new RelayCommand <RangeBaseValueChangedEventArgs>(ScrollerBarValueChangedAction); _castItemPointerEnteredCommand = new RelayCommand <PointerRoutedEventArgs>(CastItemPointerEnteredAction); _castItemPointerExitedCommand = new RelayCommand <PointerRoutedEventArgs>(CastItemPointerExitedAction); _playCommand = new RelayCommand(PlayRelayCommand); _loveCommand = new RelayCommand(LoveRelayCommand); _playbackPlayCommand = new RelayCommand(PlaybackPlayRelayCommand); _playbackLoveCommand = new RelayCommand(PlaybackLoveRelayCommand); }
public FavoriteViewModel(IMessenger messenger, IMonsterDatabase dbConn) { _messenger = messenger; _dbConn = dbConn; _messenger.Register <NotificationMessage>(this, ViewBuiltNotificationAction); GridViewCommand = new RelayCommand <ItemClickEventArgs>(RelayCommandHandler); _dbConn.DatabaseUpdated += OnDatabaseUpdated; }
public CastDetailViewModel(IMessenger messenger, IMonsterDatabase dbConnexion) { _messenger = messenger; _dbConn = dbConnexion; _messenger.Register <NotificationMessage>(this, ViewBuiltNotificationAction); _messenger.Register <GenericMessage <Cast> >(this, SetCastInfoAction); _playCommand = new RelayCommand(PlayRelayCommand); _loveCommand = new RelayCommand(LoveRelayCommand); }
// TODO: Add a method for retrieving a created character from a save file public Engine( IMenuHandler menuHandler, IMonsterDatabase monsterDatabase, IAreaDatabase areaDatabase, IAIDatabase aiDatabase) { this.menuHandler = menuHandler; this.monsterDatabase = monsterDatabase; this.areaDatabase = areaDatabase; this.aiDatabase = aiDatabase; }