view plaincopy to clipboardPRint? using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Drawing.Imaging; using System.Text; using System.Windows.Forms; using System.IO; using System.Text.RegularExpressions;
using System.Collections; namespace MyPlayer { public partial class FormLrc : Form { public FormLrc() {
TimerLrc2.Interval = 60; TimerLrc2.Tick += new EventHandler(TimerLrc2_Tick);
InitializeComponent();
this.DoubleBuffered = true; this.TopMost = true; timerMask.Tick += new EventHandler(timerMask_Tick); timerLrc.Tick += new EventHandler(timerLrc_Tick); timerLrc.Interval = 100;
sTime = _sTime; sText = _sText; } public string sTime; public string sText;
public override string ToString() {
return sTime + sText;
}
} System.Windows.Forms.Timer TimerLrc2 = new Timer(); ArrayList LrcList = new ArrayList(); string sFile = "刘德华 - 冰雨.lrc"; string sOut = ""; string sText = ""; DateTime LrcTime = new DateTime(); Graphics g; Bitmap bmp = new Bitmap(1024, 500); Bitmap bmpMask = new Bitmap(1024, 500); Graphics BmpG; Graphics MaskGr; Point p = new Point(2, 2); Point p1 = new Point(4, 4); Point p2 = new Point(3, 3); Brush b = new SolidBrush(Color.Red); Brush bMask = new SolidBrush(Color.Yellow);// mask color Brush b2 = new SolidBrush(Color.FromArgb(11, 211, 1, 1)); //Font f = new Font("Times New Roman", 44, FontStyle.Bold); Font f = new Font("宋体", 44, FontStyle.Bold); Font f2 = new Font("宋体", 44, FontStyle.Bold); Color transColor = new Color(); MemoryStream ms = new MemoryStream(); int TextIndex = 0; //ths need mask text index System.Windows.Forms.Timer timerMask = new Timer(); System.Windows.Forms.Timer timerLrc = new Timer();
public static string SongCurrentTime = "00:00.00";
} } using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Drawing.Imaging; using System.Text; using System.Windows.Forms; using System.IO; using System.Text.RegularExpressions;
using System.Collections; namespace MyPlayer { public partial class FormLrc : Form { public FormLrc() {
TimerLrc2.Interval = 60; TimerLrc2.Tick += new EventHandler(TimerLrc2_Tick);
InitializeComponent();
this.DoubleBuffered = true; this.TopMost = true; timerMask.Tick += new EventHandler(timerMask_Tick); timerLrc.Tick += new EventHandler(timerLrc_Tick); timerLrc.Interval = 100;
sTime = _sTime; sText = _sText; } public string sTime; public string sText;
public override string ToString() {
return sTime + sText;
}
} System.Windows.Forms.Timer TimerLrc2 = new Timer(); ArrayList LrcList = new ArrayList(); string sFile = "刘德华 - 冰雨.lrc"; string sOut = ""; string sText = ""; DateTime LrcTime = new DateTime(); Graphics g; Bitmap bmp = new Bitmap(1024, 500); Bitmap bmpMask = new Bitmap(1024, 500); Graphics BmpG; Graphics MaskGr; Point p = new Point(2, 2); Point p1 = new Point(4, 4); Point p2 = new Point(3, 3); Brush b = new SolidBrush(Color.Red); Brush bMask = new SolidBrush(Color.Yellow);// mask color Brush b2 = new SolidBrush(Color.FromArgb(11, 211, 1, 1)); //Font f = new Font("Times New Roman", 44, FontStyle.Bold); Font f = new Font("宋体", 44, FontStyle.Bold); Font f2 = new Font("宋体", 44, FontStyle.Bold); Color transColor = new Color(); MemoryStream ms = new MemoryStream(); int TextIndex = 0; //ths need mask text index System.Windows.Forms.Timer timerMask = new Timer(); System.Windows.Forms.Timer timerLrc = new Timer();
public static string SongCurrentTime = "00:00.00";
view plaincopy to clipboardprint? using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms;
namespace MyPlayer { public partial class FormPlayer : Form { Song Music = new Song(); public FormPlayer() { InitializeComponent();
} } using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms;
namespace MyPlayer { public partial class FormPlayer : Form { Song Music = new Song(); public FormPlayer() { InitializeComponent();
view plaincopy to clipboardprint? using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; using System.Windows.Forms;
namespace MyPlayer { public class Song { //声明调用“GetShortPathName”函数,功能:获得短文件名; [DllImport("kernel32.dll", CharSet = CharSet.Auto)] public static extern int GetShortPathName( string lpszLongPath, string shortFile, int cchBuffer ); //声明调用“mciSendString”函数,功能:向 mci 设备发送播放等命令; [DllImport("winmm.dll", EntryPoint = "mciSendString", CharSet = CharSet.Auto)] public static extern int mciSendString( string lpstrCommand, string lpstrReturnString, int uReturnLength, int hwndCallback );
//播放录音; public void Recordplay() { StrTemp = ""; StrTemp = StrTemp.PadLeft(128, Convert.ToChar(" ")); mciSendString("stop song", StrTemp, StrTemp.Length, 0); mciSendString("play song from 1", StrTemp, StrTemp.Length, 0);
}
//获取当前音量; public int TheVolume() { /*uint VolumeSize; * int Flag = 0; * uint i = waveOutGetVolume(Flag, out VolumeSize); * return (int)(VolumeSize & 0xFFFF);//右声道的音量; */
} } using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; using System.Windows.Forms;
namespace MyPlayer { public class Song { //声明调用“GetShortPathName”函数,功能:获得短文件名; [DllImport("kernel32.dll", CharSet = CharSet.Auto)] public static extern int GetShortPathName( string lpszLongPath, string shortFile, int cchBuffer ); //声明调用“mciSendString”函数,功能:向 mci 设备发送播放等命令; [DllImport("winmm.dll", EntryPoint = "mciSendString", CharSet = CharSet.Auto)] public static extern int mciSendString( string lpstrCommand, string lpstrReturnString, int uReturnLength, int hwndCallback );
//播放录音; public void Recordplay() { StrTemp = ""; StrTemp = StrTemp.PadLeft(128, Convert.ToChar(" ")); mciSendString("stop song", StrTemp, StrTemp.Length, 0); mciSendString("play song from 1", StrTemp, StrTemp.Length, 0);
}
//获取当前音量; public int TheVolume() { /*uint VolumeSize; * int Flag = 0; * uint i = waveOutGetVolume(Flag, out VolumeSize); * return (int)(VolumeSize & 0xFFFF);//右声道的音量; */