/// <summary> /// The event would raise an event to inform that sequence has been removed, /// would change the style of the associated treeview item /// </summary> /// <param name="sender">Framework Element</param> /// <param name="e">Routed event args</param> void OnSequencesBottomViewSequenceRemoving(object sender, RemoveSequenceEventArgs e) { if (this.RemoveSequence != null) { this.RemoveSequence(this, e); } if (this.selectedSequences == null || this.selectedSequences.Count == 0) { this.ClearTopView(); } }
/// <summary> /// Remove a sequence from the list /// </summary> /// <param name="sequenceToRemove">Sequence to be removed</param> public void RemoveSequence(ISequence sequenceToRemove) { int sequenceIndex = sequenceList.IndexOf(sequenceToRemove); if (sequenceIndex != -1) { if (sequencePropertiesList != null) { sequencePropertiesList.RemoveAt(sequenceIndex); } RemoveSequenceEventArgs args = new RemoveSequenceEventArgs(sequenceToRemove); if (this.SequenceRemoving != null) { this.SequenceRemoving(this, args); } } }