public void SelectBefore() { while (this.Ready != TagReady.y_ready || SearchBar == null) { Task.Delay(300).Wait(); } dynamic temp = JustTheList(out int i); if (temp == null) { return; } if (SelectPosition > 0) { mshtml.HTMLLIElement link_element = ((dynamic)temp).children[--SelectPosition]; //remove border of current object link_element.style.border = ""; //add the border to the element if (SelectPosition > 0) { var new_Element = ((dynamic)temp).children[SelectPosition - 1]; new_Element.style.border = "thick solid #0000FF"; PutItemAtTop(new_Element); } } Debug.WriteLine("finished SelectBefore"); }
public void SelectNext() { dynamic temp = JustTheList(out int i); if (temp == null) { return; } //add the border to the element dynamic new_Element = ((dynamic)temp).children[SelectPosition]; new_Element.style.border = "thick solid #0000FF"; PutItemAtTop(new_Element); //clean before if (SelectPosition > 0) { mshtml.HTMLLIElement link_element = ((dynamic)temp).children[SelectPosition - 1]; //remove border of current object link_element.style.border = ""; } //whether there are more results if (SelectPosition < ((dynamic)temp).children.length) { SelectPosition++; } else { return; } Debug.WriteLine("finished SelectNext"); }