コード例 #1
0
        private void AddRepeatSectoin(WordGroupDef wordDoc, XmlNode node)
        {
            var dataSetAttr = node.Attributes != null ? node.Attributes["dataset"] : null;
            var dataSet     = dataSetAttr != null ? _dataSets[dataSetAttr.Value] : _dataSets.First().Value;
            var reset       = node.Attributes != null && node.Attributes["reset"] != null;

            var oldStyle = new ContentStyle(_style);

            try
            {
                SetSectionStyle(node);

                var section = new WordRepeatSectionDef(dataSet)
                {
                    Style = _style
                };
                wordDoc.AddItem(section);
                _dataSetStack.Push(dataSet);
                try
                {
                    section.ResetDatas = reset;
                    BuildSections(section, node);
                }
                finally
                {
                    _dataSetStack.Pop();
                }
            }
            finally
            {
                _style.Assign(oldStyle);
            }
        }
コード例 #2
0
ファイル: WordSectionDef.cs プロジェクト: tilekchubakov/CISSA
        public WordRepeatSectionDef AddRepeatSection(DataSet dataSet, ContentStyle style = null)
        {
            var result = new WordRepeatSectionDef(dataSet);

            AddItem(result);
            if (style != null)
            {
                result.Style = style;
            }
            return(result);
        }