private YouTubeLiveCommentViewModel(IMessageMetadata metadata, IMessageMethods methods) { _metadata = metadata; _methods = methods; _metadata.PropertyChanged += (s, e) => { switch (e.PropertyName) { case nameof(_metadata.BackColor): RaisePropertyChanged(nameof(Background)); break; case nameof(_metadata.ForeColor): RaisePropertyChanged(nameof(Foreground)); break; case nameof(_metadata.FontFamily): RaisePropertyChanged(nameof(FontFamily)); break; case nameof(_metadata.FontStyle): RaisePropertyChanged(nameof(FontStyle)); break; case nameof(_metadata.FontWeight): RaisePropertyChanged(nameof(FontWeight)); break; case nameof(_metadata.FontSize): RaisePropertyChanged(nameof(FontSize)); break; case nameof(_metadata.IsNameWrapping): RaisePropertyChanged(nameof(UserNameWrapping)); break; } }; if (_metadata.User != null) { var user = _metadata.User; user.PropertyChanged += (s, e) => { switch (e.PropertyName) { case nameof(user.Nickname): SetNickname(user); RaisePropertyChanged(nameof(NameItems)); break; } }; SetNickname(user); } CommentCopyCommand = new RelayCommand(CopyComment); OpenUrlCommand = new RelayCommand(OpenUrl); UsernameCopyCommand = new RelayCommand(CopyUsername); NicknameCopyCommand = new RelayCommand(CopyNickname); }
public InfoCommentViewModel(IInfoMessage comment, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(metadata, methods, connectionStatus, options) { _message = comment; _nameItems = comment.NameItems; MessageItems = comment.CommentItems; //Thumbnail = comment.UserIcon; //Id = comment.Id?.ToString(); //PostTime = comment.PostTime; }
public InfoCommentViewModel(IInfoMessage comment, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(metadata, methods, connectionStatus, options) { _message = comment; _nameItems = null; MessageItems = new List <IMessagePart> { Common.MessagePartFactory.CreateMessageText(comment.Text) }; //Thumbnail = comment.UserIcon; //Id = comment.Id?.ToString(); PostTime = comment.CreatedAt.ToString("HH:mm:ss"); }
public McvBigoGiftViewModel(IBigoGift comment, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : base(metadata, methods, connectionStatus, options) { MessageItems = new List <IMessagePart> { new Common.MessageImage { Alt = comment.GiftName, Height = 40, Width = 40, Url = comment.GiftImgUrl }, Common.MessagePartFactory.CreateMessageText($"×{comment.GiftCount}") }; _nameItems = Common.MessagePartFactory.CreateMessageItems(comment.Username); //Id = comment.Id; //PostTime = comment.PostedAt.ToString("HH:mm:ss"); }
public NicoCommentViewModel(NicoSitePlugin.INicoDisconnected disconnected, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(disconnected as NicoSitePlugin.INicoMessage, metadata, methods, connectionStatus, options) { _message = disconnected; MessageItems = Common.MessagePartFactory.CreateMessageItems(disconnected.Text); }
public NicoCommentViewModel(NicoSitePlugin.INicoEmotion item, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(item as NicoSitePlugin.INicoMessage, metadata, methods, connectionStatus, options) { //_nameItems = MessagePartFactory.CreateMessageItems(item.UserName); MessageItems = MessagePartFactory.CreateMessageItems(item.Content); PostTime = item.PostedAt.ToString("HH:mm:ss"); Info = "エモーション"; }
public McvMildomCommentViewModel(MildomSitePlugin.IMildomDisconnected disconnected, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(metadata, methods, connectionStatus, options) { _message = disconnected; MessageItems = Common.MessagePartFactory.CreateMessageItems(disconnected.Text); }
public McvMildomCommentViewModel(MildomSitePlugin.IMildomJoinRoom item, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(metadata, methods, connectionStatus, options) { var comment = item; _message = comment; _nameItems = comment.NameItems; MessageItems = comment.CommentItems; Thumbnail = comment.UserIcon; Id = null; PostTime = comment.PostedAt.ToString("HH:mm:ss"); }
public LineLiveMessageContext(ILineLiveMessage message, MessageMetadata metadata, IMessageMethods methods) { Message = message; Metadata = metadata; Methods = methods; }
public LineLiveCommentViewModel(LineLiveSitePlugin.ILineLiveItem item, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(metadata, methods, connectionStatus, options) { var comment = item; _message = comment; _nameItems = comment.NameItems; MessageItems = comment.CommentItems; Thumbnail = null; //Thumbnail = new Common.MessageImage //{ // Url = comment.UserIconUrl, // Alt = "", // Height = 40,//_optionsにcolumnの幅を動的に入れて、ここで反映させたい。propertyChangedはどうやって発生させるか // Width = 40, //}; Id = null; PostTime = comment.PostTime; }
public OpenrecCommentViewModel(OpenrecSitePlugin.IOpenrecComment comment, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(metadata, methods, connectionStatus, options) { _message = comment; _nameItems = comment.NameItems; MessageItems = comment.MessageItems; Thumbnail = null; Id = comment.Id; PostTime = comment.PostTime; }
public ShowRoomCommentViewModel(ShowRoomSitePlugin.IShowRoomLeave leave, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(metadata, methods, connectionStatus, options) { _message = leave; //_nameItems = leave.NameItems; //MessageItems = leave.CommentItems; //Thumbnail = join..UserIcon; //Id = join.Id.ToString(); //PostTime = join.PostTime; }
public ShowRoomCommentViewModel(ShowRoomSitePlugin.IShowRoomDisconnected disconnected, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(metadata, methods, connectionStatus, options) { _message = disconnected; MessageItems = disconnected.CommentItems; }
public MirrativMessageContext(IMirrativMessage message, IMirrativMessageMetadata metadata, IMessageMethods methods) { Message = message; Metadata = metadata; Methods = methods; }
public InfoMessageContext(IInfoMessage message, InfoMessageMetadata metadata, InfoMessageMethods methods) { Message = message; Metadata = metadata; Methods = methods; }
//public PeriscopeCommentViewModel(PeriscopeSitePlugin.IPeriscopeItem item, IMessageMetadata metadata, IMessageMethods methods, ConnectionName connectionStatus) // : this(metadata, methods, connectionStatus) //{ // var comment = item; // _message = comment; // _nameItems = comment.NameItems; // MessageItems = comment.CommentItems; // Thumbnail = new Common.MessageImage // { // Url = comment.UserIconUrl, // Alt = "", // Height = 40,//_optionsにcolumnの幅を動的に入れて、ここで反映させたい。propertyChangedはどうやって発生させるか // Width = 40, // }; // Id = comment.Id.ToString(); // PostTime = UnixtimeToDateTime(comment.PostedAt / 1000).ToString("HH:mm:ss"); //} public PeriscopeCommentViewModel(PeriscopeSitePlugin.IPeriscopeConnected connected, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(metadata, methods, connectionStatus, options) { _message = connected; MessageItems = Common.MessagePartFactory.CreateMessageItems(connected.Text); }
public LineLiveCommentViewModel(LineLiveSitePlugin.ILineLiveComment comment, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(metadata, methods, connectionStatus, options) { _message = comment; _nameItems = comment.NameItems; MessageItems = comment.CommentItems; Thumbnail = comment.UserIcon; Id = comment.Id?.ToString(); PostTime = comment.PostTime; }
public OpenrecCommentViewModel(OpenrecSitePlugin.IOpenrecYell yell, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(metadata, methods, connectionStatus, options) { _message = yell; //_nameItems = yell.NameItems; //MessageItems = yell.CommentItems; //Thumbnail = yell.UserIcon; //Id = yell.Id.ToString(); //PostTime = yell.PostTime; }
public LineLiveCommentViewModel(LineLiveSitePlugin.ILineLiveDisconnected disconnected, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(metadata, methods, connectionStatus, options) { _message = disconnected; MessageItems = disconnected.CommentItems; }
public MessageContext(IPeriscopeMessage message, MessageMetadata metadata, IMessageMethods methods) { Message = message; Metadata = metadata; Methods = methods; }
public McvMildomCommentViewModel(MildomSitePlugin.IMildomComment comment, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(metadata, methods, connectionStatus, options) { _message = comment; _nameItems = MessagePartFactory.CreateMessageItems(comment.UserName); MessageItems = comment.CommentItems; Thumbnail = null; Id = null; PostTime = comment.PostedAt.ToString("HH:mm:ss"); }
public TwicasCommentViewModel(TwicasSitePlugin.ITwicasItem item, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus) : this(metadata, methods, connectionStatus) { _message = item; _nameItems = item.NameItems; MessageItems = item.CommentItems; Thumbnail = item.UserIcon; Id = null; PostTime = null;// comment.PostTime; Info = item.ItemName; }
public McvMildomCommentViewModel(MildomSitePlugin.IMildomGift gift, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(metadata, methods, connectionStatus, options) { _message = gift; MessageItems = new List <IMessagePart> { new MessageImage { Alt = gift.GiftName, Url = gift.GiftUrl, Width = 40, Height = 40, }, MessagePartFactory.CreateMessageText($"を贈りました × {gift.Count}"), }; _nameItems = MessagePartFactory.CreateMessageItems(gift.UserName); //MessageItems = comment.CommentItems; //Thumbnail = null; //Id = null; PostTime = gift.PostedAt.ToString("HH:mm:ss"); Info = gift.GiftName; }
public TwicasCommentViewModel(TwicasSitePlugin.ITwicasDisconnected disconnected, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus) : this(metadata, methods, connectionStatus) { _message = disconnected; MessageItems = disconnected.CommentItems; }
public NicoCommentViewModel(NicoSitePlugin.INicoComment comment, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(comment as NicoSitePlugin.INicoMessage, metadata, methods, connectionStatus, options) { if (!string.IsNullOrEmpty(comment.UserName)) { _nameItems = MessagePartFactory.CreateMessageItems(comment.UserName); } MessageItems = MessagePartFactory.CreateMessageItems(comment.Text); if (IsValudThumbnailUrl(comment.ThumbnailUrl)) { Thumbnail = new MessageImage { Url = comment.ThumbnailUrl, Height = 40, Width = 40, }; } Id = comment.Id; PostTime = comment.PostedAt.ToLocalTime().ToString("HH:mm:ss"); }
private TwicasCommentViewModel(IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus) { _metadata = metadata; _methods = methods; ConnectionName = connectionStatus; ConnectionName.PropertyChanged += (s, e) => { switch (e.PropertyName) { case nameof(ConnectionName.Name): RaisePropertyChanged(nameof(ConnectionName)); break; } }; _metadata.PropertyChanged += (s, e) => { switch (e.PropertyName) { case nameof(_metadata.BackColor): RaisePropertyChanged(nameof(Background)); break; case nameof(_metadata.ForeColor): RaisePropertyChanged(nameof(Foreground)); break; case nameof(_metadata.FontFamily): RaisePropertyChanged(nameof(FontFamily)); break; case nameof(_metadata.FontStyle): RaisePropertyChanged(nameof(FontStyle)); break; case nameof(_metadata.FontWeight): RaisePropertyChanged(nameof(FontWeight)); break; case nameof(_metadata.FontSize): RaisePropertyChanged(nameof(FontSize)); break; case nameof(_metadata.IsNameWrapping): RaisePropertyChanged(nameof(UserNameWrapping)); break; case nameof(_metadata.IsVisible): RaisePropertyChanged(nameof(IsVisible)); break; } }; if (_metadata.User != null) { var user = _metadata.User; user.PropertyChanged += (s, e) => { switch (e.PropertyName) { case nameof(user.Nickname): SetNickname(user); RaisePropertyChanged(nameof(NameItems)); break; } }; SetNickname(user); } }
public NicoCommentViewModel(NicoSitePlugin.INicoInfo info, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(info as NicoSitePlugin.INicoMessage, metadata, methods, connectionStatus, options) { //_nameItems = MessagePartFactory.CreateMessageItems(info.UserName); MessageItems = MessagePartFactory.CreateMessageItems(info.Text); PostTime = info.PostedAt.ToString("HH:mm:ss"); }
public PeriscopeCommentViewModel(PeriscopeSitePlugin.IPeriscopeComment comment, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(metadata, methods, connectionStatus, options) { _message = comment; _nameItems = MessagePartFactory.CreateMessageItems(comment.DisplayName); MessageItems = MessagePartFactory.CreateMessageItems(comment.Text); Thumbnail = null; Id = comment.Id; PostTime = comment.PostedAt.HasValue ? comment.PostedAt.Value.ToString("HH:mm:ss") : (string)null; }
private NicoCommentViewModel(NicoSitePlugin.INicoMessage message, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) { _message = message; _metadata = metadata; _methods = methods; ConnectionName = connectionStatus; _options = options; ConnectionName.PropertyChanged += (s, e) => { switch (e.PropertyName) { case nameof(ConnectionName.Name): RaisePropertyChanged(nameof(ConnectionName)); break; case nameof(ConnectionName.BackColor): RaisePropertyChanged(nameof(Background)); break; case nameof(ConnectionName.ForeColor): RaisePropertyChanged(nameof(Foreground)); break; } }; options.PropertyChanged += (s, e) => { switch (e.PropertyName) { case nameof(options.IsEnabledSiteConnectionColor): RaisePropertyChanged(nameof(Background)); RaisePropertyChanged(nameof(Foreground)); break; } }; _message.ValueChanged += (s, e) => { if (_message is INicoComment nicoComment) { switch (e.PropertyName) { case nameof(nicoComment.UserName): RaisePropertyChanged(nameof(NameItems)); break; } } }; _metadata.PropertyChanged += (s, e) => { switch (e.PropertyName) { case nameof(_metadata.BackColor): RaisePropertyChanged(nameof(Background)); break; case nameof(_metadata.ForeColor): RaisePropertyChanged(nameof(Foreground)); break; case nameof(_metadata.FontFamily): RaisePropertyChanged(nameof(FontFamily)); break; case nameof(_metadata.FontStyle): RaisePropertyChanged(nameof(FontStyle)); break; case nameof(_metadata.FontWeight): RaisePropertyChanged(nameof(FontWeight)); break; case nameof(_metadata.FontSize): RaisePropertyChanged(nameof(FontSize)); break; case nameof(_metadata.IsNameWrapping): RaisePropertyChanged(nameof(UserNameWrapping)); break; case nameof(_metadata.IsVisible): RaisePropertyChanged(nameof(IsVisible)); break; } }; if (_metadata.User != null) { var user = _metadata.User; user.PropertyChanged += (s, e) => { switch (e.PropertyName) { case nameof(user.Nickname): SetNickname(user); RaisePropertyChanged(nameof(NameItems)); break; } }; SetNickname(user); } }
public PeriscopeCommentViewModel(PeriscopeSitePlugin.IPeriscopeLeave leave, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options) : this(metadata, methods, connectionStatus, options) { _message = leave; _nameItems = MessagePartFactory.CreateMessageItems(leave.DisplayName); MessageItems = MessagePartFactory.CreateMessageItems(leave.Text); //Thumbnail = join..UserIcon; //Id = join.Id.ToString(); //PostTime = join.PostTime; }