public virtual void OnItemChosen(int combo, int entry) { SourceContext c = new SourceContext(null, 1, 1); if (combo == TypeAndMemberDropdownBars.DropClasses) { if (this.sortedDropDownTypes != null && entry >= 0 && entry < this.sortedDropDownTypes.Length) { c = this.sortedDropDownTypes[entry].SourceContext; } } else { if (this.sortedDropDownMembers != null && entry >= 0 && entry < this.sortedDropDownMembers.Length) { c = this.sortedDropDownMembers[entry].SourceContext; } } if (c.Document != null && this.textView != null) { int line = c.StartLine - 1; int col = c.StartColumn - 1; try{ textView.CenterLines(line, 16); }catch {} this.textView.SetCaretPos(line, col); NativeWindowHelper.SetFocus(this.textView.GetWindowHandle()); this.SynchronizeDropdowns(this.textView, line, col); } }
public virtual int OnItemChosen(int combo, int entry) { int line = 0; int col = 0; if (combo == 0) { if (this.dropDownTypeNames != null && entry >= 0 && entry < this.dropDownTypeNames.Length) { line = this.dropDownTypeStartLines[entry]; col = this.dropDownTypeStartColumns[entry]; } } else { if (this.dropDownMemberSignatures != null && entry >= 0 && entry < this.dropDownMemberSignatures.Length) { line = this.dropDownMemberStartLines[entry]; col = this.dropDownMemberStartColumns[entry]; } } if (this.textView != null) { try{ textView.CenterLines(line, 16); }catch {} this.textView.SetCaretPos(line, col); NativeWindowHelper.SetFocus(this.textView.GetWindowHandle()); this.SynchronizeDropdowns(this.textView, line, col); if (combo == 0) { this.dropDownBar.RefreshCombo(1, this.selectedMember); } else { this.dropDownBar.RefreshCombo(0, this.selectedType); } this.dropDownBar.RefreshCombo(combo, entry); } return(0); }