TMusic.Model/MusicLrcModel.cs

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TMusic.Model
{
    public class MusicLrcModel
    {
        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 艺术家
        /// </summary>
        public string Artist { get; set; }

        /// <summary>
        /// 专辑
        /// </summary>
        public string Album { get; set; }

        /// <summary>
        /// 作者
        /// </summary>
        public string By { get; set; }

        /// <summary>
        /// 偏移量
        /// </summary>
        public string Offset { get; set; }

        /// <summary>
        /// 总时长
        /// </summary>
        public double Total { get; set; }

        public List<MusicLrcItemModel> Items { get; set; }

        public MusicLrcItemModel GetPreModel(double preTime, double time)
        {
            int i1 = (int)preTime;
            int i2 = (int)time + 2;
            if (Items != null && Items.Count > 0)
            {
                return Items.Where(m => i1 <= m.Time && m.Time <= i2).FirstOrDefault();
            }
            return null;
        }

        public MusicLrcItemModel GetNextModel(double time)
        {
            if (Items != null && Items.Count > 0)
            {
                return Items.Where(m => m.Time > time).FirstOrDefault();
            }
            return null;
后面还有 12 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。