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