Example #1
0
 public void RegistMsg(string msg, MsgEventHandler handlerEvent, string handler = AppConst.MsgHandler_Common)
 {
     if (!MsgHandlers.ContainsKey(handler))
     {
         MsgHandlers.Add(handler, FrameManager.CreateInstence <IMsgHandler>(handler, null));
     }
     if (MsgHandlers[handler].MsgEventHandlers.ContainsKey(msg))
     {
         MsgHandlers[handler].MsgEventHandlers[msg] = handlerEvent;
     }
     else
     {
         MsgHandlers[handler].MsgEventHandlers.Add(msg, handlerEvent);
     }
     FrameManager.GetInstence <MsgManager>(notifiedObject.MsgStstem).RegistMsg(this, msg);
 }
Example #2
0
 public void UnRegistMsg(string msg)
 {
     FrameManager.GetInstence <MsgManager>(notifiedObject.MsgStstem).UnRegistMsg(this, msg);
 }
Example #3
0
 public IModel GetModel(string modelName)
 {
     return(FrameManager.GetInstence <IModel>(modelName));
 }
Example #4
0
 public void Init()
 {
     FrameManager.GetInstence <UIManager>().RegistUITree(this as UIRootBase);
 }
Example #5
0
        public virtual void RaisePropertyChanged <T>(Expression <Func <T> > propertyExpression)
        {
            string propertyName = (propertyExpression.Body as MemberExpression).Member.Name;

            FrameManager.GetInstence <IObservableManager>().PropertyChange(this, propertyName, propertyExpression.Compile().Invoke());
        }
Example #6
0
 public virtual void RaisePropertyChanged([CallerMemberName] string propertyName = "")
 {
     FrameManager.GetInstence <IObservableManager>().PropertyChange(this, propertyName, GetType().GetProperty(propertyName).GetValue(this));
 }