Exemplo n.º 1
0
 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());
 }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
 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);
 }