PlayListMusic.aspx.cs

(开头部分) 2KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class PlayListMusic : System.Web.UI.Page
{
    public string fileUrl;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string[] sid = Request["ID"].Split(',');
            Select1.Items.Clear();
            for (int i = 0; i < sid.Length - 1; i++)
            {
                string strSqlMusicName = "SELECT musicName FROM Music WHERE id = " + sid[i];
                ListItem listItem = new ListItem { Value = sid[i], Text = dataOperate.getTier(strSqlMusicName) };
                Select1.Items.Add(listItem);
            }
            Select1.Items[0].Selected = true;
            string strSqlMusicPath = "SELECT musicPath FROM Music WHERE id = " + sid[0];
            string url = "songs/" + dataOperate.getTier(strSqlMusicPath);
            fileUrl = setUrl(url);
        }
    }

    public string setUrl(string url)
    {
        string s = Request.Url.AbsoluteUri;
        int idx = s.IndexOf("PlayListMusic.aspx");
        s = s.Substring(0, idx);
        return s + url;
    }

    protected void btnSelectPlay_Click(object sender, EventArgs e)
    {
        string id = Select1.Items[Select1.SelectedIndex].Value;
        string strSqlMusicPath = "SELECT musicPath FROM Music WHERE id=" + id;
        fileUrl = setUrl("songs//" + dataOperate.getTier(strSqlMusicPath));
    }

    protected void btnIsPlay_Click(object sender, EventArgs e)
    {
        string id = "";
        int selectIx = Select1.SelectedIndex;
        if (ddlPlayType.SelectedValue == "0")
        {
            int listCount = Select1.Items.Count;
            int playId = Convert.ToInt32(Select1.Items[Select1.SelectedIndex].Value);
            if ((selectIx + 1) == listCount)
            {
                Select1.Items[selectIx].Selected = false;
                Select1.Items[0].Selected = true;
                id = Select1.Items[0].Value;
            }
            else
后面还有 22 行代码,解锁后查看完整代码

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

AI 解读

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

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