Ejemplo n.º 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);
 }
Ejemplo n.º 2
0
 public void UnRegistMsg(string msg)
 {
     FrameManager.GetInstence <MsgManager>(notifiedObject.MsgStstem).UnRegistMsg(this, msg);
 }
Ejemplo n.º 3
0
 public IModel GetModel(string modelName)
 {
     return(FrameManager.GetInstence <IModel>(modelName));
 }
Ejemplo n.º 4
0
 public void Init()
 {
     FrameManager.GetInstence <UIManager>().RegistUITree(this as UIRootBase);
 }
Ejemplo n.º 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());
        }
Ejemplo n.º 6
0
 public virtual void RaisePropertyChanged([CallerMemberName] string propertyName = "")
 {
     FrameManager.GetInstence <IObservableManager>().PropertyChange(this, propertyName, GetType().GetProperty(propertyName).GetValue(this));
 }