Beispiel #1
0
 /// <summary>
 /// 解绑事件
 /// </summary>
 /// <param name="Attribute"></param>
 /// <param name="fun"></param>
 protected void UnSetModel(Enum Attribute, Notifier.StandardDelegate fun)
 {
     if (BindModel != null)
     {
         string KeyName = string.Format("{0}{1}", BindModel.GetModelName(), Attribute);
         if (FunList.ContainsKey(KeyName))
         {
             BindModel.RemoveEventHandler(KeyName, FunList[KeyName]);
             FunList.Remove(KeyName);
         }
     }
 }
Beispiel #2
0
 /// <summary>
 /// 移除事件监听
 /// </summary>
 /// <param name="eventName"></param>
 /// <param name="func"></param>
 protected void UnBindEvent(string eventName, Notifier.StandardDelegate func)
 {
     EventMgr.GetInstance().RemoveEventHandle(eventName, func);
 }