Esempio n. 1
0
 /// <summary>
 /// 根据名称获得模型
 /// </summary>
 /// <param name="modelName">模型名称</param>
 /// <returns>模型对象</returns>
 protected BaseModel GetModel(string modelName)
 {
     return(MVCSystem.GetModel(modelName));
 }
Esempio n. 2
0
 /// <summary>
 /// 发送事件
 /// </summary>
 /// <param name="eventName">事件名称</param>
 /// <param name="data">数据</param>
 protected void SendEvent(string eventName, params object[] data)
 {
     MVCSystem.SendEvent(eventName, data);
 }
Esempio n. 3
0
 /// <summary>
 /// 移除视图
 /// </summary>
 /// <param name="viewName">视图名称</param>
 public void RemoveView(string viewName)
 {
     MVCSystem.RemoveView(viewName);
 }
Esempio n. 4
0
 /// <summary>
 /// 根据类型获得模型
 /// </summary>
 /// <typeparam name="T">模型类型</typeparam>
 /// <returns>模型对象</returns>
 protected BaseModel GetModel <T>() where T : BaseModel
 {
     return(MVCSystem.GetModel <T>());
 }
Esempio n. 5
0
 /// <summary>
 /// 注册事件
 /// </summary>
 /// <param name="eventName">事件名称</param>
 /// <param name="controllerType">响应的Controller的Type对象</param>
 protected void RegisterController(string eventName, Type controllerType)
 {
     MVCSystem.RegisterController(eventName, controllerType);
 }
Esempio n. 6
0
 /// <summary>
 /// 移除模型
 /// </summary>
 /// <param name="modelName">模型名称</param>
 public void RemoveModel(string modelName)
 {
     MVCSystem.RemoveModel(modelName);
 }
Esempio n. 7
0
 /// <summary>
 /// 注册视图
 /// </summary>
 /// <param name="view">视图对象</param>
 protected void RegisterView(BaseView view)
 {
     MVCSystem.RegisterView(view);
 }
Esempio n. 8
0
 /// <summary>
 /// 注册模型
 /// </summary>
 /// <param name="model">模型对象</param>
 protected void RegisterModel(BaseModel model)
 {
     MVCSystem.RegisterModel(model);
 }
Esempio n. 9
0
 /// <summary>
 /// 根据名称获得视图
 /// </summary>
 /// <param name="modelName">视图名称</param>
 /// <returns>视图对象</returns>
 protected BaseView GetView(string viewName)
 {
     return(MVCSystem.GetView(viewName));
 }
Esempio n. 10
0
 /// <summary>
 /// 根据类型获得视图
 /// </summary>
 /// <typeparam name="T">视图类型</typeparam>
 /// <returns>视图对象</returns>
 protected BaseView GetView <T>() where T : BaseView
 {
     return(MVCSystem.GetView <T>());
 }
Esempio n. 11
0
 /// <summary>
 /// 移除监听事件
 /// </summary>
 /// <param name="eventName">监听事件名称</param>
 public void RemoveController(string eventName)
 {
     MVCSystem.RemoveController(eventName);
 }