private void Frm_Play_Load(object sender, EventArgs e) { //窗体位置的初始化 Cla_FrmClass.ImageDir(); FrmClass.ImgDir = FrmClass.ImgDir + "\\Image"; Cla_FrmClass.FrmInitialize(this); FrmClass.F_MPlay = this; Example_MusicToler = 100.0 / (panel_Sound.Width - pictureBox_SoundHold.Width); }
private void Frm_Screen_Load(object sender, EventArgs e) { this.Top = 0; this.Left = 0; Cla_FrmClass.FrmInitialize(this); this.BackColor = Color.Maroon; this.TransparencyKey = this.BackColor; }
private void Frm_ListBox_Load(object sender, EventArgs e) { string Tem_Path = ""; string Tem_Name = ""; ToolS_Mode03.Checked = true; this.Left = FrmClass.Example_Play_Left; this.Top = FrmClass.Example_Play_Top + FrmClass.Example_Play_Height; Cla_FrmClass.Format_ListV(listView_List); Cla_FrmClass.FrmInitialize(this); Cla_FrmClass.Format_ListN(listView_Fname); Tem_Dir = Cla_FrmClass.UpAndDown_Dir(System.AppDomain.CurrentDomain.BaseDirectory); Tem_Path = Tem_Dir; Tem_Dir = Tem_Dir + "\\默认.m3u"; FrmClass.Example_ListNameDir = Tem_Dir; if (File.Exists(Tem_Dir)) { Cla_FrmClass.m3uRead(Tem_Dir); if (FrmClass.AList.Count > 1) { Cla_FrmClass.ListAddFile(listView_Fname, listView_List, FrmClass.AList); } } else { Cla_FrmClass.m3uCreate(Tem_Dir); } Cla_FrmClass.Data_List(listView_Fname, "默认", Tem_Dir); FrmClass.Example_ListNameNark = 0; listView_Fname.Items[0].BackColor = Color.DarkGreen; string Tem_Play = ""; DirectoryInfo dir = new DirectoryInfo(Tem_Path); FileSystemInfo[] files = dir.GetFileSystemInfos();//获取文件夹中所有文件和文件夹 //对单个FileSystemInfo进行判断,如果是文件夹则进行递归操作 foreach (FileSystemInfo FSys in files) { FileInfo file = FSys as FileInfo; if (file != null) { Tem_Name = file.DirectoryName + "\\" + file.Name; Tem_Name = Tem_Name.Substring(Tem_Name.LastIndexOf(Convert.ToChar(".")) + 1, Tem_Name.Length - Tem_Name.LastIndexOf(Convert.ToChar(".")) - 1); if (Tem_Name.ToLower() == "m3u") { if (file.Name.Substring(0, file.Name.Length - 4) != "默认") { Tem_Play = file.DirectoryName + "\\" + file.Name; Cla_FrmClass.Data_List(listView_Fname, file.Name.Substring(0, file.Name.Length - 4), Tem_Play); } } } } }
private void Frm_Libretto_Load(object sender, EventArgs e) { this.Top = FrmClass.Example_Play_Top; this.Left = FrmClass.Example_Play_Left + FrmClass.Example_Play_Width; Cla_FrmClass.FrmInitialize(this); this.BackColor = Color.Maroon; this.TransparencyKey = this.BackColor; listBox_Lyric.Width = panel_All.Width + 20; listBox_Lyric.Height = panel_All.Height; }