protected void OnCurrentFinished2(object sender, EventArgs e) { ClockGroup sender_cg = (ClockGroup)sender; Storyboard sender_sb = (Storyboard)sender_cg.Timeline; if (sender_sb == null) { return; } int nextPos = ElementIndexer.GetPos(sender_sb); if ((nextPos == -1) || (Animates.Count <= nextPos)) { return; } Animates[nextPos].Begin(_obj); }
public void Begin() { // _obj = containingObject; if (Animates.Count == 0) { return; } for (int i = 0; i < Animates.Count; ++i) { Storyboard refBoard = Animates[i]; int h = (i + 1 == Animates.Count) ? -1 : i + 1; ElementIndexer.SetPos(refBoard, h); refBoard.Completed -= OnCurrentFinished; refBoard.Completed += new EventHandler(OnCurrentFinished); } Animates[0].Begin(); }
public void Begin(List <FrameworkElement> containingObjects) { _objs = containingObjects; if (Animates.Count == 0) { return; } for (int i = 0; i < Animates.Count; ++i) { Storyboard refBoard = Animates[i]; int h = (i + 1 == Animates.Count) ? -1 : i + 1; ElementIndexer.SetPos(refBoard, h); refBoard.Completed -= OnCurrentFinished3; refBoard.Completed += new EventHandler(OnCurrentFinished3); } Animates[0].Begin(containingObjects[0]); }