public TextBoundaries(TextBoundaries from) { _itemList = new AltaxoSet<string>(); BeginUpdate(); foreach (string s in from._itemList) _itemList.Add(s); EndUpdate(); }
public TextBoundaries(TextBoundaries from) { _itemList = new AltaxoSet <string>(); BeginUpdate(); foreach (string s in from._itemList) { _itemList.Add(s); } EndUpdate(); }
/// <summary> /// Processes a single value . /// If the data value is text, the boundaries are /// updated and the number of items is increased by one (if not contained already). The function returns true /// in this case. On the other hand, if the value is outside the range, the function has to /// return false. /// </summary> /// <param name="item">The data item.</param> /// <returns>True if data is in the tracked range, false if the data is not in the tracked range.</returns> public bool Add(Altaxo.Data.AltaxoVariant item) { if (item.IsType(Altaxo.Data.AltaxoVariant.Content.VString)) { string s = item.ToString(); if (!_itemList.Contains(s)) { _itemList.Add(s); if (_eventSuspendCount == 0) { OnNumberOfItemsChanged(); OnBoundaryChanged(false, true); } return(true); } } return(false); }