Esempio n. 1
0
        private void dispatcherTick(object sender, EventArgs e)
        {
            MediaControl.PrintTimer(Video, lblTime);
            if (MediaControl.subtitleState)
            {
                MediaControl.PrintSubtitle(lblSubtitle);

                if (tt.Status != TaskStatus.Running)
                {
                    tt = new Task(() => MediaControl.EditSubtitleAsync(Video, lblSubtitle, subtitle));
                    tt.Start();
                }
            }
        }
Esempio n. 2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            if (!(textBoxOpenVideo.Text == "VideoFile" && textBoxOpenSrt.Text == "SubtitleFile"))
            {
                Video.Source = new Uri(textBoxOpenVideo.Text);
                MediaControl.InitStaticVar();
                InitDispatcherTimer();
                InitSubtitle();
                InitTask();
                Video.ScrubbingEnabled = true;
                Video.Pause();

                gridMenu.Opacity   = 0;
                gridPlayer.Opacity = 1;
            }
            else
            {
                textBoxOpenVideo.BorderBrush = Brushes.Red;
                textBoxOpenSrt.BorderBrush   = Brushes.Red;
            }
        }
Esempio n. 3
0
        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.Key)
            {
            case Key.Space:
                MediaControl.Play(Video, pctPlay);
                break;

            case Key.Left:
                MediaControl.MooveBackward(Video);
                break;

            case Key.Right:
                MediaControl.MooveForward(Video);
                break;

            case Key.C:
                MediaControl.ActivateCc(lblSubtitle);
                break;
            }
        }
Esempio n. 4
0
 private void btnPlay_Click(object sender, RoutedEventArgs e)
 {
     MediaControl.Play(Video, pctPlay);
 }
Esempio n. 5
0
 private void InitTask()
 {
     tt = new Task(() => MediaControl.EditSubtitleAsync(Video, lblSubtitle, subtitle));
 }
Esempio n. 6
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     MediaControl.ActivateCc(lblSubtitle);
 }
Esempio n. 7
0
 private void btnForward_Click(object sender, RoutedEventArgs e)
 {
     MediaControl.MooveForward(Video);
 }