public static IList <ILabelVievModel> GetWaypointsWithin(Random r, int n, IAudioSelectionViewModel selection, MenuViewModel waypointsMenu) { return(Enumerable.Range(0, n).Select(i => (ILabelVievModel) new WaypointLabelViewModel(RandomWaypoint(r)) { Position = (r.NextDouble() * selection.Duration + selection.Start), Menu = waypointsMenu }).ToList()); }
public void Copy(IAudioSelectionViewModel value) { if (value == null) { Start = End = 0; return; } if (value.Source != Source) { throw new InvalidOperationException("Cannot change source"); } Start = value.Start; End = value.End; Top = value.Top; Height = value.Height; }
public CropAudioRequest(IAudioSelectionViewModel selection, string outputFilename = null) { Selection = selection ?? throw new ArgumentNullException(nameof(selection)); OutputFilename = outputFilename; }
public static bool IsEmpty(this IAudioSelectionViewModel value) { return(value.Start >= value.End); }