private void Btn_Search_Click(object sender, EventArgs e) { MyResources.Main.SetCursorLoading(); var text = Tbox_NameSearch.Text.Trim(); text = text.ToLower(); if (text == "") { MyResources.Main.SetCursorDefault(); return; } foreach (var i in FlowPanel_ListPlaylist.Controls) { var c = i as Control; if (c.Name.ToLower().Contains(text)) { c.Show(); } else { c.Hide(); } } Lb_ColNameListPlaylist.Focus(); MyResources.Main.SetCursorDefault(); }
private void Btn_Create_Click(object sender, EventArgs e) { MyResources.Main.SetCursorLoading(); var text = Tbox_NameCreate.Text.Trim(); if (text == "") { MyResources.Main.SetCursorDefault(); MessageBox.Show("Name is null !!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } int id = MyResources.Resources.InsertPlaylist(text); if (id < 0) { MyResources.Main.SetCursorDefault(); MessageBox.Show("Name is duplicate !!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } else { var r = new RowPlaylist(); r.SetData(text, id.ToString()); FlowPanel_ListPlaylist.Controls.Add(r); } Lb_ColNameListPlaylist.Focus(); MyResources.Main.SetCursorDefault(); }
private void Btn_Reload_Click(object sender, EventArgs e) { LoadAllPlaylist(); Lb_ColNameListPlaylist.Focus(); }