/// <summary> /// 根据模块的友好名称获取一个直属子模块的引用 /// </summary> /// <param name="modulename">模块名称</param> /// <returns>获取的模块,获取失败为null。</returns> public BaseModule GetModule(string modulename) { BaseModule m = null; if (_SubModules.Contains(modulename)) { m = _SubModules[modulename]; } return(m); }
/// <summary> /// 将一个模块注册为本模块的子模块 /// </summary> /// <param name="submodule">被注册的子模块</param> protected void RegisterSubModule(BaseModule submodule) { //Log.Print(string.Format("向 {0} 中注册了 {1}", this.ModuleName, submodule.ModuleName)); _SubModules.Add(submodule); }