Esempio n. 1
0
            public static PlaySource Create(NormalPlaySource playSource, PlayRange playRange)
            {
                // Note: 是否在自动垫片上操作?

                if (playSource == null)
                {
                    throw new ArgumentNullException("playSource");
                }

                playRange = playSource.Adjust(playRange);

                if (playRange == playSource.PlayRange)
                {
                    return(playSource);
                }

                return(new PlaySourceSegment(playSource, playRange));
            }
Esempio n. 2
0
        public override void Split(TimeSpan duration, out PlaybillItem first, out PlaybillItem second)
        {
            if (duration <= TimeSpan.Zero)
            {
                throw new ArgumentOutOfRangeException("duration", string.Format("<{0}>无效,必须大于TimeSpan.Zero。", duration));
            }

            // Note: 是否在自动垫片上操作?

            PlayRange firstRange, secondRange;

            this.PlaySource.Break(duration, out firstRange, out secondRange);

            var segment             = this.PlaySource as PlaySourceSegment;
            NormalPlaySource source = segment != null ? segment.PlaySource : (NormalPlaySource)this.PlaySource;

            var firstSource = PlaySourceSegment.Create(source, firstRange);

            first = CreateInternal(firstSource);

            var secondSource = PlaySourceSegment.Create(source, secondRange);

            second = CreateInternal(secondSource);
        }
Esempio n. 3
0
 private AutoPlaybillItem(NormalPlaySource playSource)
     : base(playSource, ScheduleMode.Auto)
 {
 }
Esempio n. 4
0
 private PlaySourceSegment(NormalPlaySource playSource, PlayRange playRange)
 {
     this.PlayRange  = playRange;
     this.PlaySource = playSource;
 }
Esempio n. 5
0
 private TimingPlaybillItem(DateTime startTime, NormalPlaySource playSource, bool isBreak)
     : base(playSource, isBreak ? ScheduleMode.TimingBreak : ScheduleMode.Timing)
 {
     _scheduleInfo = new ScheduleInfo(startTime, this.PlaySource.PlayRange.Duration, this.ScheduleMode);
 }