c#实现KTV点歌系统

2019-12-26 13:10:24王旭
  • {  AnimateWindow(this.Handle, , FrmMain.AW_SLIDE + FrmMain.AW_VER_POSITIVE); 
  • }  public void Binder()  
  • {  string PinYin = this.textBox .Text; 
  • StringBuilder PY = new StringBuilder(PinYin);  for (int i = ; i <= PY.Length; i++) 
  • {  PY.Insert(i, "%"); 
  • i++;  } 
  • string sql = string.Format("SELECT song_name,singer_name FROM dbo.singer_info, dbo.song_info WHERE dbo.singer_info.singer_id=dbo.song_info.singer_id AND song_ab LIKE '{ }'", PY);  DataSet ds = db.dataSet(sql, "PY"); 
  • if (ds.Tables["PY"]!=null)  { 
  • ds.Tables["PY"].Clear();  } 
  • this.dgvPinYinInfo.DataSource = db.dataTable(sql, "PY");  } 
  • private void pictureBox _Click(object sender, EventArgs e)  { 
  • string text = textBox .Text;  int index = text.Length - ; 
  • if (index >= )  { 
  • textBox .Text = text.Remove(index);  } 
  • }  private void textBox _TextChanged(object sender, EventArgs e) 
  • {  if (textBox .Text!=string.Empty) 
  • {  Binder(); 
  • this.dgvPinYinInfo.AutoGenerateColumns = false;  } 
  • else  { 
  • this.dgvPinYinInfo.DataSource=null;  } 
  • }  private void tsPYMain_Click(object sender, EventArgs e) 
  • {  FrmMain main = new FrmMain(); 
  • main.Show();  this.Hide(); 
  • }  private void txPYAgain_Click(object sender, EventArgs e) 
  • {  FrmMain main = new FrmMain(); 
  • main.Playsong();  } 
  • Song song = new Song();  private void tsPYCut_Click(object sender, EventArgs e) 
  • {  song.playState = SongPlayState.cut; 
  • }  private void tsPYYidian_Click(object sender, EventArgs e)