private void lblQuery_MouseDown(object sender, MouseButtonEventArgs e) { try { dataList = DataOperate.query(this.cbxIsMistaken.IsChecked); this.lswData.ItemsSource = Filter.searchList(dataList, txtFilter.Text); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void lswData_MouseDoubleClick(object sender, MouseButtonEventArgs e) { Data data = (Data)lswData.SelectedItem; if (data != null) { DataModify dm = new DataModify(data); if (dm.ShowDialog() == true) { try { //lswData.ItemsSource = Filter.searchList(dataList, txtFilter.Text); dataList = DataOperate.query(this.cbxIsMistaken.IsChecked); this.lswData.ItemsSource = Filter.searchList(dataList, txtFilter.Text); }catch (Exception ex) { throw ex; } } else { dataList = DataOperate.query(this.cbxIsMistaken.IsChecked); this.lswData.ItemsSource = Filter.searchList(dataList, txtFilter.Text); } } }