protected override void WireMessages() { Messenger.Default.Register <NotificationMessage>(this, m => { if (m.Notification.Equals(Constants.Messages.VideoFileMsg)) { var file = m.Sender as StorageFile; if (file == null) { return; } _channel = m.Target != null ? m.Target as ChannelItemViewModel : null; //IsUploading = true; EditVideo.CanEdit = IsUploading = false; File = file; Image = File; } }); Messenger.Default.Register <VideoMessage>(this, m => { if (m.Notification.Equals(Constants.Messages.EditVideoMsg)) { EditVideo.SetVideo(m.Video.Video); Image = m.Video.Video.ThumbnailUrl; } }); base.WireMessages(); }
protected override void WireMessages() { Messenger.Default.Register <ChannelMessage>(this, m => { _fromProtocol = false; Channel = m.Channel; }); Messenger.Default.Register <ProtocolMessage>(this, m => { if (m.Type != ProtocolMessage.ProtocolType.Channel) { return; } _fromProtocol = true; Channel = new ChannelItemViewModel(new Channel()) { ProgressIsVisible = true }; GetChannel(m.Content); }); base.WireMessages(); }
protected override void WireMessages() { base.WireMessages(); Messenger.Default.Register <ChannelMessage>(this, m => { if (m.Notification.Equals(Constants.Messages.AddVideoToChannelMsg)) { _channel = m.Channel; } }); }
private async Task GetChannel(string channelId) { try { var response = await _vidMeClient.GetChannelAsync(channelId); if (response != null) { if (Channel == null) { Channel = new ChannelItemViewModel(response.Channel); } else { Channel.Channel = response.Channel; } await LoadChannelVideos(); } } catch (Exception ex) { } }
public ChannelMessage(ChannelItemViewModel channel, string notification) : base(notification) { Channel = channel; }
public ChannelMessage(ChannelItemViewModel channel) : base(string.Empty) { Channel = channel; }
public ChannelDeleteEvent(Channel channel, ChannelItemViewModel channelItemViewModel) { ChannelItemViewModel = channelItemViewModel; Channel = channel; }
public ChannelDeleteEvent(Channel model, ChannelItemViewModel viewModel) { ViewModel = viewModel; Model = model; }