public MainWindowViewModel(IRegionManager navigationService, INetWorkServices netWorkServices, IdentityService dentityService, PlayPartCore playPart, InteractionRequestsProxy interactionRequestsProxy ) { this._navigationService = navigationService; this._netWorkServices = netWorkServices; this._dentityService = dentityService; this._playPart = playPart; this._interactionRequestsProxy = interactionRequestsProxy; this._playPart.MusicChanged += _playPart_MusicChanged; this._playPart.PlayStateChanged += _playPart_PlayStateChanged; SysListCommand = new DelegateCommand <int?>(SysListCommandImpl); MyMusicCommand = new DelegateCommand <int?>(MyMusicCommandImpl); OpenPlayPanelCommand = new DelegateCommand(OpenPlayPanelCommandExecute); ClearCurrentPlayListCommand = new DelegateCommand(ClearCurrentPlayListCommandImpl); UserPlayListCommand = new DelegateCommand <PlayList>(UserPlayListCommandExecute); NavBackCommand = new DelegateCommand(NavBackCommandExecute); AddPlayListCommand = new DelegateCommand(AddPlayListCommandExecute); NextCommand = new DelegateCommand(NextCommandExecute); PrevCommand = new DelegateCommand(PrevCommandExecute); // InitData(); dentityService.LoginStateChanged += Session_LoginStateChanged; Session_LoginStateChanged(null, dentityService.CurrentUser != null); }
public MvPlayView(MvPlayViewModel viewModel, PlayPartCore playPart) { _playPart = playPart; this.DataContext = viewModel; viewModel.RefreshCompleated += ViewModel_RefreshCompleated; InitializeComponent(); }
// public event EventHandler RefreshCompleated ; public PlayListDetailViewModel(INetWorkServices netWorkServices, PlayPartCore playPart) { this._netWorkServices = netWorkServices; _playPart = playPart; _innerPlayList = new PlayListDetail(); PlayAllCommand = new DelegateCommand(PlayAllCommandExecute); this.SelectedCommand = new DelegateCommand <IEnumerable>(SelectedCommandExecute); }
public AlbumViewModel(INetWorkServices netWorkServices, IRegionManager navigationService, PlayPartCore playPart) { this._netWorkServices = netWorkServices; this._navigationService = navigationService; this._playPart = playPart; PlayAllCommand = new DelegateCommand(PlayAllCommandExecute); this.SelectedCommand = new DelegateCommand <IEnumerable>(SelectedCommandExecute); }
public CloudMusicViewModel(INetWorkServices netWorkServices, IRegionManager navigationService, PlayPartCore playPart) { this._netWorkServices = netWorkServices; this._navigationService = navigationService; this._playPart = playPart; PlayAllCloudMusicCommand = new DelegateCommand(PlayAllCloudMusicCommandExecute); AlbumCommand = new DelegateCommand <long?>(AlbumCommandExecute); ArtistCommand = new DelegateCommand <long?>(ArtistCommandExecute); SelectedCommand = new DelegateCommand <IEnumerable>(SelectedCommandExecute); }
public ArtistDetailViewModel(INetWorkServices netWorkServices, IRegionManager navigationService, PlayPartCore playPart) { this._netWorkServices = netWorkServices; this._navigationService = navigationService; _playPart = playPart; PlayAllCommand = new DelegateCommand(PlayAllCommandExecute); SelectedCommand = new DelegateCommand <IEnumerable>(SelectedCommandExecute); HotMusicMvCommand = new DelegateCommand <long?>(HotMusicMvCommandExecute); AlbumOrMvOffsetCommand = new DelegateCommand <string>(AlbumOrMvOffsetCommandExecute); }
public EveryDayMusicRecommendViewModel(INetWorkServices netWorkServices, IRegionManager navigationService, PlayPartCore playPart) { this._netWorkServices = netWorkServices; this._navigationService = navigationService; this._playPart = playPart; RecomendMvCommand = new DelegateCommand <long?>(RecomendMvCommandExecute); PlayAllCommand = new DelegateCommand(PlayAllCommandExecute); SelectedCommand = new DelegateCommand <IEnumerable>(SelectedCommandExecute); MusicAlbumCommand = new DelegateCommand <Album>(MusicAlbumCommandExecute); MusicArtistCommand = new DelegateCommand <long?>(MusicArtistCommandExecute); }
public NewMusicViewModel(INetWorkServices netWorkServices, IRegionManager navigationService, PlayPartCore playPart) { this._netWorkServices = netWorkServices; this._navigationService = navigationService; this._playPart = playPart; PlayAllOrSelectedCommand = new DelegateCommand(PlayAllOrSelectedCommandImpl); NewMusicOrDiskCommand = new DelegateCommand <string>(NewMusicOrDiskCommandImpl); LanguageCommand = new DelegateCommand <string>(GetTopMusic); SelectedCommand = new DelegateCommand <IEnumerable>(SelectedCommandImpl); ArtistCommand = new DelegateCommand <Global.Model.Artist>(ArtistCommandExecute); AlbumCommand = new DelegateCommand <long?>(AlbumCommandExecute); NextPageCommand = new DelegateCommand(async() => { await TopAlbumAsync(); }); SelectedAlbumCommand = new DelegateCommand <Album>(SelectedAlbumCommandExecute); GetTopMusic("1"); }
public PlayPanelViewModel(INetWorkServices netWorkServices, IRegionManager navigationService, PlayPartCore playPart ) { this._netWorkServices = netWorkServices; this._navigationService = navigationService; _playPart = playPart; playPart.MusicChanged += (sender, e) => RefreshMusic(e); UserCommand = new DelegateCommand <long?>(UserCommandExecute); AlbumCommand = new DelegateCommand <long?>(AlbumCommandExecute); ArtistCommand = new DelegateCommand <long?>(ArtistCommandExecute); SimiMusicCommand = new DelegateCommand <Music>(SimiMusicCommandExecute); SimiPlayListCommand = new DelegateCommand <PlayList>(SimiPlayListCommandExecute); AddCommentCommand = new DelegateCommand <string>(AddCommentCommandExecute); ThumbsUpCommand = new DelegateCommand <long?>(ThumbsUpCommandExecute); }
public PersonalityRecommendViewModel(INetWorkServices netWorkServices, IRegionManager navigationService, IdentityService dentityService , PlayPartCore playPart, InteractionRequestsProxy interactionRequestsProxy) { this._netWorkServices = netWorkServices; this._navigationService = navigationService; this._dentityService = dentityService; this._playPart = playPart; this._interactionRequestsProxy = interactionRequestsProxy; InitData(); MoreCommand = new DelegateCommand <string>(MoreCommandExecute); RecommendPlayListCommend = new DelegateCommand <PlayList>(RecommendPlayListCommendExecute); PrivateContentCommand = new DelegateCommand <PictureListBoxItem>(PrivateContentCommandExecute); NewMusicCommand = new DelegateCommand <Global.Model.Music>(NewMusicCommandExecute); NewMusicMvCommand = new DelegateCommand <long?>(NewMusicMvCommandExecute); NewMvCommand = new DelegateCommand <Global.Model.Mv>(NewMvCommandExecute); EveryDayMusicRecommendCommand = new DelegateCommand(EveryDayMusicRecommendCommandExecute); BillBoardCommand = new DelegateCommand(BillBoardCommandExecute); PersonalFmCommand = new DelegateCommand(PersonalFmCommandExecute); }
public SearchViewModel(INetWorkServices netWorkServvices, IRegionManager navigationService, PlayPartCore playPart) { this._netWorkServices = netWorkServvices; this._navigationService = navigationService; _playPart = playPart; // SearchRecomend.AddRange(new[] { "陈奕迅", "明年今日", "起风了", "陈奕迅", "明年今日", "起风了", "陈奕迅", "明年今日", "起风了" }); SearchHistory.AddRange(new[] { "习近平", "江泽民", "哈哈", "上台拿衣服", "三个戴表", "苟利国家生死以" }); DeleteHistoryCommand = new DelegateCommand <string>(DeleteHistoryCommandImpl); SelectedSuggestCommand = new DelegateCommand <dynamic>(SelectedSuggestCommandImpl); SearchCommand = new DelegateCommand(SearchCommandExecute); MusicMvCommand = new DelegateCommand <long?>(MusicMvCommandExecute); MusicSelectCommand = new DelegateCommand <Music>(MusicSelectCommandExecute); AlbumSelectCommand = new DelegateCommand <Album>(AlbumSelectCommandExecute); ArtistSelectCommand = new DelegateCommand <Artist>(ArtistSelectCommandExecute); MvSelectCommand = new DelegateCommand <Mv>(MvSelectCommandExecute); PlayListSelectCommand = new DelegateCommand <PlayList>(PlayListSelectCommandExecute); UserSelectCommand = new DelegateCommand <User>(UserSelectCommandExecute); SearchResultNextPageCommand = new DelegateCommand <string>(SearchResultNextPageCommandExecute); Init(); }