Example #1
0
 void MediaPlayer_PlaybackStateChange(object sender, ClipEventArgs e)
 {
     RefreshStatus();
     SendToControls(c => c.PlayStateChanged(Status));
     if (e.Context.CurrentClipState == MediaElementState.Playing)
     {
         WantToPlay = false;
     }
 }
Example #2
0
 void MediaPlayer_ClipError(object sender, ClipEventArgs e)
 {
     foreach (var ctrl in ControlSets)
     {
         try {
             ctrl.ErrorOccured(new Exception(e.Context.ClipInformation.ClipUri + " failed"));
         } catch (Exception ex) { drop(ex); }
     }
 }
        void OnClipboardDelayFinished(object sender, EventArgs e)
        {
            var clip = CaptureClipboard();

            if (clip == null)
            {
                return;
            }
            clip.Copied += OnCopyClip;

            var args = new ClipEventArgs();

            args.Clip = clip;

            ClipCaptured?.Invoke(this, args);

            clipboardEventTimer.Stop();
        }
        void OnCopyClip(object sender, ClipEventArgs e)
        {
            lastClipboardCopy = DateTime.Now;

            ClipCopied?.Invoke(this, e);
        }
Example #5
0
 void Player_ClipStarted(object sender, ClipEventArgs e)
 {
     AddLog(new ClipEventLog(ClipEventType.Started, Player.Position, e.Source));
 }
 void SmoothPlayer_ClipError(object sender, ClipEventArgs e)
 {
     OutPut.Text = "Clip Error: " + e.Context.CurrentClipState.ToString();
 }
 private void MediaElement_ClipClickThrough(object sender, ClipEventArgs e)
 {
     if (AdClickThrough != null)
     {
         var adContext = new AdContext(e.Context);
         AdClickThrough(this, adContext);
     }
 }
 void SmoothPlayer_ClipError(object sender, ClipEventArgs e)
 {
     reportError("Clip Error: " + e.Context.CurrentClipState.ToString());
 }
 private void MediaElement_ClipStateChanged(object sender, ClipEventArgs e)
 {
     var adContext = new AdContext(e.Context);
     AdStateChanged.IfNotNull(i => i(this, adContext));
 }
 private void MediaElement_ClipError(object sender, ClipEventArgs e)
 {
     if (AdError != null)
     {
         var adContext = new AdContext(e.Context);
         AdError(this, adContext);
     }
 }
 void MediaElement_LinearClipChanged(object sender, ClipEventArgs e)
 {
     if (MediaElement.CurrentLinearClipContext != null)
     {
         CurrentStateChanged.IfNotNull(i => i(this, MediaPluginState.ClipPlaying));
         linearAdContext = new LinearAdContext(e.Context, MediaElement);
         AdStateChanged.IfNotNull(i => i(this, linearAdContext));
     }
     else
     {
         AdStateChanged.IfNotNull(i => i(this, linearAdContext));
         linearAdContext = null;
         CurrentStateChanged.IfNotNull(i => i(this, CurrentState));
     }
 }
Example #12
0
 void MediaPlayer_PlaybackStateChange(object sender, ClipEventArgs e)
 {
     RefreshStatus();
     SendToControls(c => c.PlayStateChanged(Status));
     if (e.Context.CurrentClipState == MediaElementState.Playing) {
         WantToPlay = false;
     }
 }
Example #13
0
 void MediaPlayer_ClipError(object sender, ClipEventArgs e)
 {
     foreach (var ctrl in ControlSets) {
         try {
             ctrl.ErrorOccured(new Exception(e.Context.ClipInformation.ClipUri + " failed"));
         } catch (Exception ex) { drop(ex); }
     }
 }
Example #14
0
 void SmoothPlayer_ClipError(object sender, ClipEventArgs e)
 {
     OutPut.Text = "Clip Error: " + e.Context.CurrentClipState.ToString();
 }
Example #15
0
 private void mediaElement_ClipError(object sender, ClipEventArgs e)
 {
 }