示例#1
0
        void markerHelper_MarkerReached(object sender, MarkerReachedEventArgs e)
        {
            switch (e.Marker.Type)
            {
            case Marker_SkippableOffset:
                AdSkippableState = true;
                markerHelper.Markers.Remove(e.Marker);
                break;

            case Marker_FirstQuartile:
                if (AdVideoFirstQuartile != null)
                {
                    AdVideoFirstQuartile(this, EventArgs.Empty);
                }
                markerHelper.Markers.Remove(e.Marker);
                break;

            case Marker_Midpoint:
                if (AdVideoMidpoint != null)
                {
                    AdVideoMidpoint(this, EventArgs.Empty);
                }
                markerHelper.Markers.Remove(e.Marker);
                break;

            case Marker_ThirdQuartile:
                if (AdVideoThirdQuartile != null)
                {
                    AdVideoThirdQuartile(this, EventArgs.Empty);
                }
                markerHelper.Markers.Remove(e.Marker);
                break;

            case Marker_DurationReached:
                if (AdVideoComplete != null)
                {
                    AdVideoComplete(this, EventArgs.Empty);
                }
                markerHelper.Markers.Remove(e.Marker);
                StopAd();
                break;
            }
        }
 void markerHelper_MarkerReached(object sender, MarkerReachedEventArgs e)
 {
     switch (e.Marker.Type)
     {
         case Marker_SkippableOffset:
             AdSkippableState = true;
             markerHelper.Markers.Remove(e.Marker);
             break;
         case Marker_FirstQuartile:
             if (AdVideoFirstQuartile != null) AdVideoFirstQuartile(this, EventArgs.Empty);
             markerHelper.Markers.Remove(e.Marker);
             break;
         case Marker_Midpoint:
             if (AdVideoMidpoint != null) AdVideoMidpoint(this, EventArgs.Empty);
             markerHelper.Markers.Remove(e.Marker);
             break;
         case Marker_ThirdQuartile:
             if (AdVideoThirdQuartile != null) AdVideoThirdQuartile(this, EventArgs.Empty);
             markerHelper.Markers.Remove(e.Marker);
             break;
         case Marker_DurationReached:
             if (AdVideoComplete != null) AdVideoComplete(this, EventArgs.Empty);
             markerHelper.Markers.Remove(e.Marker);
             StopAd();
             break;
     }
 }