Beispiel #1
0
        /// <summary>
        /// Stop Layout
        /// </summary>
        public void Stop()
        {
            // Stat stop
            double duration = StatManager.Instance.LayoutStop(ScheduleId, _layoutId, this.isStatEnabled);

            // If we are an interrupt layout, then report our duration.
            if (this.isInterrupt)
            {
                OnReportLayoutPlayDurationEvent?.Invoke(ScheduleId, this._layoutId, duration);
            }

            // Stop
            IsPaused  = false;
            IsRunning = false;
        }
Beispiel #2
0
        /// <summary>
        /// Pause this Layout
        /// </summary>
        public void Pause()
        {
            // Pause each Region
            foreach (Region region in _regions)
            {
                region.Pause();
            }

            // Pause no-longer pending
            isPausePending = false;
            IsPaused       = true;

            // Close and dispatch any stat records
            double duration = StatManager.Instance.LayoutStop(ScheduleId, _layoutId, this.isStatEnabled);

            // Report Play Duration
            if (this.isInterrupt)
            {
                OnReportLayoutPlayDurationEvent?.Invoke(ScheduleId, _layoutId, duration);
            }
        }