private bool valueChecked(Value value, ListBox ckdListBox) { bool retVal = false; for (int i = 0; i < ckdListBox.Items.Count; i++) { string val = value.getValue() + "-" + value.getDescription(); if ((val.Equals(ckdListBox.Items[i])) & ckdListBox.GetSelected(i)) { retVal = true; break; } } return retVal; }
private void removeCheckBox(Value value, ListBox ckdListBox) { string val = value.getValue() + "-" + value.getDescription(); for (int i = 0; i < ckdListBox.Items.Count; i++) { if (val.Equals(ckdListBox.Items[i])) { ckdListBox.Items.RemoveAt(i); } } }
private bool textFound(Value value, string searchedText) { bool retVal = false; string val = value.getValue() + "-" + value.getDescription(); if (val.Contains(searchedText) || (searchedText == "")) { retVal = true; } return retVal; }
private bool existCheckBox(Value value, ListBox ckdListBox) { bool retVal = false; string val = value.getValue() + "-" + value.getDescription(); for (int i = 0; i < ckdListBox.Items.Count; i++) { if (val.Equals(ckdListBox.Items[i])) { retVal = true; break; } } return retVal; }