Ejemplo n.º 1
0
        void ViewEvent_VdsViewEventEvent_PlayPlotScriptEventEvent(object sender, EventArgs e)
        {
            VdsViewEventEvent.VEventArgs vArgs = e as VdsViewEventEvent.VEventArgs;
            List <string> eventParameter       = vArgs.EventParameter as List <string>;

            if (_totalLength == 0)
            {
                for (int i = _childrenList.Count - 1; i >= 0; i--)
                {
                    VdsPlotTimeLine t = (VdsPlotTimeLine)_childrenList[i];
                    t.InitPlotTimeLine();
                }
            }
            if (!PlotIsPlaying)
            {
                double offsetTime = Convert.ToDouble(eventParameter[1]);
                _startTick    = DateTime.Now.Ticks - (long)(offsetTime * TimeSpan.TicksPerSecond);
                CurrentPlotID = eventParameter[0];
                PlotIsPlaying = true;
            }
            else if (PlotIsPause)
            {
                PlotIsPause = false;
                long nowTick = DateTime.Now.Ticks;
                _startTick = _startTick + (nowTick - _pauseTick);
            }
        }