Example #1
0
        public void addControlWord(int position, RtfFieldControlWord.FieldType type)
        {
            if (!_allowControlWord)
            {
                throw new Exception("ControlWord is not allowed.");
            }
            RtfFieldControlWord w = new RtfFieldControlWord(position, type);

            for (int i = 0; i < _controlWords.Count; i++)
            {
                if (_controlWords[i].Position == w.Position)
                {
                    _controlWords[i] = w;
                    return;
                }
            }
            _controlWords.Add(w);
        }
Example #2
0
		public void addControlWord(int position, RtfFieldControlWord.FieldType type)
		{
			if (!_allowControlWord) {
				throw new Exception("ControlWord is not allowed.");
			}
			RtfFieldControlWord w = new RtfFieldControlWord(position, type);
			for (int i = 0; i < _controlWords.Count; i++) {
				if (_controlWords[i].Position == w.Position) {
					_controlWords[i] = w;
					return;
				}
			}
			_controlWords.Add(w);
		}