Exemple #1
0
        private void Preview_Button_Click(object sender, RoutedEventArgs e)
        {
            _media.Clock.Controller.Resume();
            _media.Clock.Controller.Seek(TimeSpan.FromSeconds(TimeSRT.GetSeconds(_st.Text)), TimeSeekOrigin.BeginTime);
            //while(_media.Clock.Controller.)
            Thread t2 = new Thread(t);

            t2.Start();
        }
Exemple #2
0
        void t()
        {
            while (true)
            {
                this.Dispatcher.Invoke(
                    new Action(() =>
                               ppos = _media.Position.TotalSeconds));
                this.Dispatcher.Invoke(
                    new Action(() =>
                               eend = _ft.Text));

                if (ppos > TimeSRT.GetSeconds(eend))
                {
                    this.Dispatcher.Invoke(
                        new Action(() =>
                                   _media.Clock.Controller.Pause()));

                    return;
                }
            }
        }