Exemplo n.º 1
0
        private void OnMarkerSkippedInto(Marker marker)
        {
            // don't process event in Blend
            if (DesignerProperties.GetIsInDesignMode(this))
            {
                return;
            }

            if (MarkerSkippedInto != null)
            {
                MarkerRoutedEventArgs args = new MarkerRoutedEventArgs();
                args.Marker = marker;
                MarkerSkippedInto(this, args);
            }

            Logger.Log(new PlayerLog(PlayerLogType.MarkerSkippedInto)
            {
                Sender = this,
                Message = string.Format(CultureInfo.InvariantCulture, "MarkerSkippedInto: {0}/{1}", marker.Time, marker.Duration)
            });
        }
Exemplo n.º 2
0
        private void OnMarkerReached(Marker marker)
        {
            // don't process event in Blend
            if (DesignerProperties.GetIsInDesignMode(this))
            {
                return;
            }

            // raise event
            if (MarkerReached != null)
            {
                MarkerRoutedEventArgs args = new MarkerRoutedEventArgs();
                args.Marker = marker;
                MarkerReached(this, args);
            }

            Logger.Log(new PlayerLog(PlayerLogType.MarkerReached)
            {
                Sender = this,
                Message = string.Format(CultureInfo.InvariantCulture, "MarkerReached: {0}", marker.Time.ToString())
            });
        }