public void AddParameter(Parameter parameter)
 {
     ParameterDictionary paramDic;
     if (!_container.TryGetValue(parameter.SheetName, out paramDic))
     {
         paramDic = new ParameterDictionary();
         _container[parameter.SheetName] = paramDic;
     }
     paramDic[parameter.ParameterName] = parameter;
 }
        public void AddParameter(Parameter parameter)
        {
            ParameterDictionary paramDic;

            if (!_container.TryGetValue(parameter.SheetName, out paramDic))
            {
                paramDic = new ParameterDictionary();
                _container[parameter.SheetName] = paramDic;
            }
            paramDic[parameter.ParameterName] = parameter;
        }
Beispiel #3
0
        public TableFormatter(ParameterDictionary parameterDictionary, string parameterName, IEnumerable <TSource> dataSource)
            : this(0, dataSource)
        {
            _paramDic = parameterDictionary;
            Parameter p = _paramDic[parameterName];

            if (p == null)
            {
                throw new ApplicationException("模板中未定义参数:" + parameterName + ",无法创建TableFormatter!");
            }
            else
            {
                _templateRowIndex = p.CellPoint.X;
            }
        }
Beispiel #4
0
        public RepeaterFormatter(ParameterDictionary parameterDictionary, string startTagParameterName, string endTagParameterName, IEnumerable <TSource> dataSource)
            : this(new Point(), new Point(), dataSource)
        {
            _paramDic = parameterDictionary;
            Parameter startParam = _paramDic[startTagParameterName];
            Parameter endParam   = _paramDic[endTagParameterName];

            if (startParam == null)
            {
                throw new ApplicationException("模板中未定义参数:" + startTagParameterName + ",无法创建TableFormatter!");
            }
            if (endParam == null)
            {
                throw new ApplicationException("模板中未定义参数:" + endTagParameterName + ",无法创建TableFormatter!");
            }
            _startTagCell = startParam.CellPoint;
            _endTagCell   = endParam.CellPoint;
        }
 /// 构造函数
 public TreeFormatter(ParameterDictionary parameterDictionary, string parameterName, IEnumerable <TSource> dataSource)
     : base(parameterDictionary, parameterName, dataSource)
 {
 }