void ViewEvent_VdsViewEventEvent_StopPlotScriptEventEvent(object sender, EventArgs e) { if (!PlotIsPlaying) { return; } VdsViewEventEvent.VEventArgs vArgs = e as VdsViewEventEvent.VEventArgs; string plotID = vArgs.EventParameter.ToString(); if (CurrentPlotID == plotID) { for (int i = _childrenList.Count - 1; i >= 0; i--) { VdsPlotTimeLine t = (VdsPlotTimeLine)_childrenList[i]; t.StopScript(); } PlotIsPlaying = false; PlotIsPause = false; _pauseTick = 0; _startTick = 0; (ParentObject as VdsLayer).RemoveChild(this); if (_currentView != null) { _currentView.ViewEvent.VdsViewEventEvent_PlayPlotScriptEventEvent -= ViewEvent_VdsViewEventEvent_PlayPlotScriptEventEvent; _currentView.ViewEvent.VdsViewEventEvent_StopPlotScriptEventEvent -= ViewEvent_VdsViewEventEvent_StopPlotScriptEventEvent; _currentView.ViewEvent.VdsViewEventEvent_PausePlotScriptEventEvent -= ViewEvent_VdsViewEventEvent_PausePlotScriptEventEvent; } } }