Example #1
0
        public void RemoveSymbol(ISymbol symbol)
        {
            SymbolCollectionItem symbolItem = null;

            foreach (SymbolCollectionItem item in _symbols)
            {
                if (item.Symbol == symbol)
                {
                    symbolItem = item;
                    break;
                }
            }
            if (symbolItem != null)
            {
                _symbols.Remove(symbolItem);
            }
        }
Example #2
0
        public void InsertBefore(ISymbol symbol, ISymbol before, bool visible)
        {
            SymbolCollectionItem beforeItem = null;

            foreach (SymbolCollectionItem item in _symbols)
            {
                if (item.Symbol == before)
                {
                    beforeItem = item;
                    break;
                }
            }
            if (beforeItem != null)
            {
                int index = _symbols.IndexOf(beforeItem);
                if (index > -1)
                {
                    _symbols.Insert(index, new SymbolCollectionItem(symbol, visible));
                }
            }
        }