private void button5_Click(object sender, EventArgs e) { mc.ClosePlayer(); mc.OpenMediaFile("chinh_ta.mp3"); mc.PlayMediaFile(false); Luat l = new Luat(); List <String> words = l.checkLuat(noidung.Text, luat); foreach (String w in words) { changeColor(noidung, w); } }
private void Form1_Load(object sender, EventArgs e) { //set dữ liệu cho combobox for (int i = 8; i <= 72; i++) { textSize.Items.Add(i.ToString()); } //-----------Tạo danh sách font chữ System.Drawing.Text.InstalledFontCollection fonts = new System.Drawing.Text.InstalledFontCollection(); foreach (FontFamily family in fonts.Families) { textFont.Items.Add(family.Name.ToString()); } //hoàn tất set dữ liệu label1.Text = trangdau.story.ten_truyen; mc.OpenMediaFile(trangdau.story.ten + ".mp3"); mc.PlayMediaFile(false);//hết bài dừng không lặp lại, true lặp lại Dinhdang(); Luat ad = new Luat(); luat = ad.add(); connect cn = new connect(); con = cn.conDB(); String sql = "select * from " + trangdau.story.ten; adapter = new SqlDataAdapter(sql, con); table = new DataTable(); adapter.Fill(table); source = new BindingSource(); foreach (DataRow tiep in table.Rows) { source.Add(tiep); String ch = "Chương " + tiep["id"].ToString() + " : " + tiep["ten"]; chapter.Add(ch); } foreach (String chap in chapter) { ds_chuong.Items.Add(chap); } showrecord(); }