public void fireActiveItemChanged(object sender, ActiveItemChangedEventArgs args) { if (ActiveItemChanged != null) { ActiveItemChanged(sender,args); } }
// 只管设m_selectedItem public void SetActiveItem(Item item) { Item oldItem = this.m_selectedItem; this.m_selectedItem = item; ///////////////////////////////////// // 触发ActiveItemChanged事件 /////////////////////////////////////// ActiveItemChangedEventArgs args = new ActiveItemChangedEventArgs(); args.Lastitem = oldItem; args.ActiveItem = this.m_selectedItem; args.CurText = this.m_curText; this.fireActiveItemChanged(this,args); }