private void TimerSearch_Tick(object sender, EventArgs e) { if ((DateTime.Now - mLastSearch).TotalMilliseconds > 500) { UtilityListView.DoListViewFilter(mListViewData, txtSearch.Text); TimerSearch.Enabled = false; } }
private void TimerSearch_Tick(object sender, EventArgs e) { if ((DateTime.Now - mLastSearch).TotalMilliseconds > 500) { UtilityListView.DoListViewFilter(mListViewData, txtSearch.Text); if (String.IsNullOrEmpty(txtSearch.Text)) { //txtSearch.ButtonCustom.Image = global::Medibox.Properties.Resources.Find_16; } else { //txtSearch.ButtonCustom.Image = global::Medibox.Properties.Resources.delete_16; } TimerSearch.Enabled = false; } }
private void ListViewNhomDichVu_SelectedIndexChanged(object sender, EventArgs e) { mThongTinDanhSachRoom = ListViewNhomDichVu.SelectedObject as ThongTinDanhSachRoom; if (mThongTinDanhSachRoom != null) { //Refresh dịch vụ if (mRoom == null) { UtilityListView.ListViewRefresh(mListViewData, mThongTinDanhSachRoom.mListData); } else { UtilityListView.ListViewRefresh(mListViewData, mThongTinDanhSachRoom.mListData, mRoom.RoomID.ToString(), 0); } //Seach if (!String.IsNullOrEmpty(txtSearch.Text.Trim()) && mThongTinDanhSachRoom.mListData.Count > 0) { UtilityListView.DoListViewFilter(mListViewData, txtSearch.Text); } } }
public static void DoFilter(this ObjectListView olv, String txtInput) { UtilityListView.DoListViewFilter(olv, txtInput); }