代码拉取完成,页面将自动刷新
同步操作将从 Gsan./Bassplayer 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
using CCWin.SkinControl;
using System;
using System.Drawing;
using System.IO;
using System.Text.RegularExpressions;
using System.Windows.Forms;
namespace Bassplayer
{
public partial class SearchAllLrc : Form
{
public SearchAllLrc()
{
InitializeComponent();
}
GetLrc gl = new GetLrc();
frmMain f = new frmMain();
public static string name = "", singer = "", time = "";
string[] alllrc;
string filePath = Environment.CurrentDirectory + "\\Lyrics\\";
private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e)
{
if (listBox1.SelectedIndex >= 0)
{
textBox5.Text = alllrc[listBox1.SelectedIndex].Split('|')[0];
}
}
private void label2_Click(object sender, EventArgs e)
{
Close();
}
#region 拖动窗口移动
private Point offset;//当前窗口坐标
public void Form1_MouseDown(object sender, MouseEventArgs e)
{
if (MouseButtons.Left != e.Button) return;
Point cur = this.PointToScreen(e.Location);
offset = new Point(cur.X - this.Left, cur.Y - this.Top);
}
public void Form1_MouseMove(object sender, MouseEventArgs e)
{
if (MouseButtons.Left != e.Button) return;
Point cur = MousePosition;
this.Location = new Point(cur.X - offset.X, cur.Y - offset.Y);
}
#endregion
private void 设置歌词ToolStripMenuItem_Click(object sender, EventArgs e)
{
frmMain.lrcFlag = true;
string lrc= alllrc[listBox1.SelectedIndex].Split('|')[0];
string[] fen = new string[] { "\r\n", "\\\\n", "\n" };
int i = 0;
WriteFile(lrc, singer + " - " + name + ".lrc");
string[] lrcs = Regex.Split(alllrc[listBox1.SelectedIndex].Split('|')[0], fen[i]);
while (lrc.Length < 2)
{
i++;
lrcs = Regex.Split(alllrc[listBox1.SelectedIndex].Split('|')[0], fen[i]);
}
f.FormatLrc(lrcs);
}
public void WriteFile(string lrcs, string name)
{
if (!File.Exists(name)) { FileStream fs = File.Create(filePath + name); fs.Close(); }
StreamWriter sw = new StreamWriter(filePath + name);
sw.Write(lrcs);
sw.Flush();
sw.Close();
}
private void button1_Click(object sender, EventArgs e)
{
listBox1.Items.Clear();
gl.singerss = ".+?singer\":\"(?<singer>.+?)\"";
alllrc = gl.GetAllKuGouLrc(textBox1.Text, textBox2.Text, int.Parse(textBox3.Text) * 60 + int.Parse(textBox4.Text));
int i = 1;
foreach(string lrc in alllrc)
{
SkinListBoxItem s = new SkinListBoxItem(i + "."+alllrc[i-1].Split('|')[1] +" - "+ name);
listBox1.Items.Add(s);
i++;
}
}
private void SearchAllLrc_Load(object sender, EventArgs e)
{
textBox1.Text = name;
textBox2.Text = singer;
textBox3.Text = time.Split(':')[0].Trim();
textBox4.Text = time.Split(':')[1].Trim();
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。