public void Add2InteractionList(InteractionInterface ob) { if (ob is InteractionInterface) { //add2list if (interactionList.Count > 0) { //last hide InteractionInterface interaction = interactionList[interactionList.Count - 1]; interaction.HideFoucsArror(); } //add interactionList.Add(ob); //new last show interactionList[interactionList.Count - 1].ShowFoucsArror(); } }
public void remove2InteractionList(InteractionInterface ob) { if (ob is InteractionInterface) { //removeList if (interactionList.Count > 0) { //是否是最后一个 if (interactionList.IndexOf(ob) == (interactionList.Count - 1)) { ob.HideFoucsArror(); } interactionList.Remove(ob); if (interactionList.Count > 0) { //倒数第二个显示(现在的倒数第一个) interactionList[interactionList.Count - 1].ShowFoucsArror(); } } } }