protected NodeIndex GetInsertIndex(Vector2 point) { // Assuming the key frames are ordered var index = controlPoints.FindIndex(kf => (kf.IsSynchronized ? kf.ActualKey : kf.Key) > point.X); return(new NodeIndex(index >= 0 ? index : controlPoints.Count)); }
public void Add(string fileName) { int i = _items.FindIndex(item => item.FileName == fileName); if (i > -1) { _items.RemoveAt(i); } _items.Insert(0, new RecentFile() { FileName = fileName }); if (_items.Count > _maxFiles) { _items.RemoveAt(_items.Count - 1); } }