VixenModules.Editor.TimedSequenceEditor.MarkManager.updateMark C# (CSharp) Method

updateMark() private method

private updateMark ( int index, System.TimeSpan ts ) : void
index int
ts System.TimeSpan
return void
        private void updateMark(int index, TimeSpan ts)
        {
            //test if the new mark already exists, if not remove it and add the new one
            if (_displayedCollection.Marks.Contains(ts))
            {
                System.Media.SystemSounds.Asterisk.Play();
            }
            else
            {
                _displayedCollection.Marks.RemoveAt(index);
                _displayedCollection.Marks.Add(ts);
                _displayedCollection.Marks.Sort();
                PopulateMarkListFromMarkCollection(_displayedCollection);
                UpdateMarkCollectionInList(_displayedCollection);
            }
        }