/// <summary>
        /// Raised when this control btnPlay is clicked
        /// </summary>
        protected virtual void OnSelectedEvent(YouTubeResultEventArgs e)
        {
            if (SelectedEvent != null)
            {
                //Invokes the delegates.
                SelectedEvent(this, e);
            }

            //wnd = new VideoWindow();
            //wnd.viewer.ClosedEvent += OnBrowserClosed;
            //wnd.viewer.Video = e.Info;
            //wnd.ShowDialog();

            RaiseEvent(new RoutedEventArgs(SourceUC.SourceViewEvent));

            var attachment = DataContext as Attachment;
            var browser = WebkitBrowserWindow.Instance(e.Info.EmbedUrl,
                                        attachment!=null ? attachment.ArgPoint.Topic.Id : (int?)null);
            browser.Show();
            browser.Activate();
        }
示例#2
0
        /// <summary>
        /// Raised when this control btnPlay is clicked
        /// </summary>
        protected virtual void OnSelectedEvent(YouTubeResultEventArgs e)
        {
            if (SelectedEvent != null)
            {
                //Invokes the delegates.
                SelectedEvent(this, e);
            }

            //wnd = new VideoWindow();
            //wnd.viewer.ClosedEvent += OnBrowserClosed;
            //wnd.viewer.Video = e.Info;
            //wnd.ShowDialog();

            RaiseEvent(new RoutedEventArgs(SourceUC.SourceViewEvent));

            var attachment = DataContext as Attachment;
            var browser    = WebkitBrowserWindow.Instance(e.Info.EmbedUrl,
                                                          attachment != null ? attachment.ArgPoint.Topic.Id : (int?)null);

            browser.Show();
            browser.Activate();
        }