private string GetUniqueMarkerName() { string value = Strings.TimelineMarker_NewName; TimelineMarkersCollection markers = this.MarkersSource; if (markers != null) { if (markers.Any(m => m.Name == value)) { int i = 2; while (true) { value = String.Format(CultureInfo.CurrentCulture, Strings.TimelineMarker_NewName_Format, i); if (!markers.Any(m => m.Name == value)) { break; } ++i; } } } return(value); }
public TimelineMarker(TimelineMarkersCollection owner, TimeSpan relativeTime, KStudioMarker marker) : base(relativeTime) { DebugHelper.AssertUIThread(); if (owner == null) { throw new ArgumentNullException("owner"); } if (marker == null) { throw new ArgumentNullException("marker"); } this.owner = owner; this.marker = marker; }
public TimelinePausePointsCollection(string targetAlias, KStudioClipSource clipSource, TimelineMarkersCollection markers) : base(targetAlias, clipSource) { DebugHelper.AssertUIThread(); this.markers = markers; this.OnLoad(); }