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