/// <summary> /// Clears the widget list and disposes off all /// the animation objects /// </summary> private void clearAnimationWidgetList() { foreach (AnimationWidget animationWidget in AnimationWidgetList) { animationWidget.Dispose(); } AnimationWidgetList.Clear(); }
/// <summary> /// Creates and adds an animation widget entry that will contain the /// specified ui widget. UI widget represents a windows control /// such as a button in the scanner. Raises an event that the /// widget was added /// </summary> /// <param name="uiWidget">the ui widget</param> /// <returns>animation widget</returns> private AnimationWidget createAndAddAnimationWidget(Widget uiWidget) { var retVal = new AnimationWidget { UIWidget = uiWidget }; AnimationWidgetList.Add(retVal); if (EvtAnimationWidgetAdded != null) { EvtAnimationWidgetAdded(this, new AnimationWidgetAddedEventArgs(retVal)); } return(retVal); }
/// <summary> /// Returns the outer animation widget for the specified /// ui widget /// </summary> /// <param name="widget">ui widget</param> /// <returns>animation widget</returns> public AnimationWidget GetAnimationWidget(Widget widget) { return(AnimationWidgetList.FirstOrDefault(animationWidget => animationWidget.UIWidget == widget)); }