コード例 #1
0
        public LineLiveCommentViewModel(LineLiveSitePlugin.ILineLiveComment comment, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options)
            : this(metadata, methods, connectionStatus, options)
        {
            _message = comment;

            _nameItems   = Common.MessagePartFactory.CreateMessageItems(comment.DisplayName);
            MessageItems = Common.MessagePartFactory.CreateMessageItems(comment.Text);
            Thumbnail    = new Common.MessageImage()
            {
                Url    = comment.UserIconUrl,
                Height = 40,
                Width  = 40,
            };
            Id       = null;
            PostTime = comment.PostedAt.ToString("HH:mm:ss");
        }
コード例 #2
0
        public LineLiveCommentViewModel(LineLiveSitePlugin.ILineLiveItem item, IMessageMetadata metadata, IMessageMethods methods, IConnectionStatus connectionStatus, IOptions options)
            : this(metadata, methods, connectionStatus, options)
        {
            var comment = item;

            _message = comment;

            _nameItems   = Common.MessagePartFactory.CreateMessageItems(comment.DisplayName);
            MessageItems = comment.CommentItems;
            Thumbnail    = new Common.MessageImage()
            {
                Url    = comment.UserIconUrl,
                Height = 40,//_optionsにcolumnの幅を動的に入れて、ここで反映させたい。propertyChangedはどうやって発生させるか
                Width  = 40,
            };
            Id       = null;
            PostTime = comment.PostedAt.ToString("HH:mm:ss");
        }
コード例 #3
0
        public McvWhowatchCommentViewModel(WhowatchSitePlugin.IWhowatchItem 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    = 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");
            Info     = item.ItemCount == 1 ? item.ItemName : $"{item.ItemName} × {item.ItemCount}";
        }