示例#1
0
        public VideoPlayerForm(VideoPlayerHost host)
        {
            if (Program.IsRun)
            {
                InitializeComponent();
            }
            _host = host;
            if (Program.IsRun)
            {
                DR2API.DR2_SetDrawWnd(ViewModelBase.ApiHandle, Handle);
            }

            //设置定时器  3 秒一次
            _mainTimer           = new DispatcherTimer();
            _mainTimer.Interval  = TimeSpan.FromSeconds(3);
            _mainTimer.Tick     += new EventHandler(dTimer_Tick);
            _mainTimer.IsEnabled = true;
            _mainTimer.Start();
        }