/// <summary> /// /// </summary> /// <param name="flid"></param> /// <param name="morphIndex"></param> /// <param name="hvoTarget"></param> /// <returns>index of item in combo</returns> internal int SelectItemInCombo(int flid, int morphIndex, int hvoTarget) { using (InterlinComboHandler handler = GetComboHandler(flid, morphIndex)) { handler.SelectComboItem(hvoTarget); return(handler.IndexOfCurrentItem); } }
/// <summary> /// /// </summary> /// <param name="flid"></param> /// <param name="morphIndex"></param> /// <param name="index"></param> /// <returns>hvo of item in Items</returns> internal int SelectIndexInCombo(int flid, int morphIndex, int index) { using (InterlinComboHandler handler = GetComboHandler(flid, morphIndex)) { handler.HandleSelect(index); return(handler.Items[handler.IndexOfCurrentItem]); } }
internal List <int> GetComboItems(int flid, int morphIndex) { List <int> items = new List <int>(); using (InterlinComboHandler handler = GetComboHandler(flid, morphIndex)) { items.AddRange(handler.Items); } return(items); }
/// <summary> /// /// </summary> /// <param name="flid"></param> /// <param name="morphIndex"></param> /// <param name="target"></param> /// <returns></returns> internal int GetComboItemHvo(int flid, int morphIndex, string target) { using (InterlinComboHandler handler = GetComboHandler(flid, morphIndex)) { int index; object item = handler.GetComboItem(target, out index); if (item != null) { return(handler.Items[index]); } } return(0); }
private InterlinComboHandler GetComboHandler(int flid, int morphIndex) { // first select the proper pull down icon. int tagIcon = 0; switch (flid) { default: break; case InterlinLineChoices.kflidWordGloss: tagIcon = ktagWordGlossIcon; break; case InterlinLineChoices.kflidWordPos: tagIcon = ktagWordPosIcon; break; } return(InterlinComboHandler.MakeCombo( m_propertyTable != null ? m_propertyTable.GetValue <IHelpTopicProvider>("HelpTopicProvider") : null, tagIcon, this, morphIndex) as InterlinComboHandler); }
private InterlinComboHandler GetComboHandler(int flid, int morphIndex) { // first select the proper pull down icon. int tagIcon = 0; switch (flid) { default: break; case InterlinLineChoices.kflidWordGloss: tagIcon = ktagWordGlossIcon; break; case InterlinLineChoices.kflidWordPos: tagIcon = ktagWordPosIcon; break; } List <int> currentMorphs = CurrentMorphs(); return(InterlinComboHandler.MakeCombo(tagIcon, this, currentMorphs[morphIndex]) as InterlinComboHandler); }