public bool checkIfKeyValueIsValid(bool autofillquery, string key, string value) { for (int i = 0; i < options.Count; i++) { Option op = options.ElementAt(i); if (op.marked == false || autofillquery) { if (op.checkIfKeyValueIsValid(key.Trim(), value)) { if (!autofillquery) { op.marked = true; } return(true); } } } for (int i = 0; i < optionsG.Count; i++) { OptionGroup op = optionsG.ElementAt(i); if (op.marked == false || autofillquery) { if (op.checkIfKeyValueIsValid(key.Trim(), value)) { if (!autofillquery) { op.marked = true; } return(true); } } } return(false); }
/* * 'marked' options will be included, rest need not be.!! */ public string[] get_possible_values(string key) { for (int i = 0; i < options.Count; i++) { Option op = options.ElementAt(i); if (op.marked == true && op.key == key) { return(op.get_valuelist(key)); } } for (int i = 0; i < optionsG.Count; i++) { OptionGroup op = optionsG.ElementAt(i); if (op.marked == true && op.checkIfKeyValueIsValid(key, null)) { return(op.get_valuelist(key)); } } return(null); }