/// <summary> /// Adds an element to the _modelElementsSelected Array and highlights it /// </summary> /// <param name="element"></param> private void AddSelectedElement(ModelElement element) { _modelElementsSelected.Insert(0,element); element.Highlighted(true); //We check if the element has any arrows connected to it and if it does we select them too foreach (ModelElement me in _modelElements) { if (me as ArrowElement != null) { ArrowElement ae = me as ArrowElement; if (ae.StartElement == element || ae.StopElement == element) { _modelElementsSelected.Add(ae); ae.Highlighted(true); } } } IsInitialized = false; }
/// <summary> /// Removes the specified element from the _selectedElements list /// </summary> /// <param name="element"></param> private void RemoveSelectedElement(ModelElement element) { if (_modelElementsSelected.Contains(element)) { _modelElementsSelected.Remove(element); element.Highlighted(false); IsInitialized = false; } }