/// <summary> /// 客户端模块评语实现客户端。 /// </summary> /// <returns></returns> public IChartLayoutTemplateClient CreateLayoutTemplateClient() { string cfgSetting = System.Configuration.ConfigurationSettings.AppSettings[APP_CONFIG_KEY_NAME]; if (string.IsNullOrEmpty(cfgSetting)) { return(null); } string[] cfgs = cfgSetting.Split(','); object instance = MB.Util.DllFactory.Instance.LoadObject(cfgs[0], cfgs[1]); if (instance == null) { throw new MB.Util.APPException(string.Format("创建{0} , {1} 有误,请检查", cfgs[0], cfgs[1])); } IChartLayoutTemplateClient commentClient = instance as IChartLayoutTemplateClient; if (commentClient == null) { throw new MB.Util.APPException("客户端模块评语实现客户端需要实现 MB.WinDxChart.IFace.IChartLayoutTemplateClient 接口"); } return(commentClient); }
/// <summary> /// 定义一个protected 的构造函数以阻止外部直接创建。 /// </summary> protected DxChartControlHelper() { _TemplateHelper = new ChartTemplateHelper(); _LayoutTemplateHelper = new ChartLayoutTemplateHelper(); _TemplateClient = _TemplateHelper.CreateTemplateClient(); _LayoutTemplateClient = _LayoutTemplateHelper.CreateLayoutTemplateClient(); }