Exemplo n.º 1
0
        /// <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();
        }
Exemplo n.º 2
0
        /// <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);
        }
Exemplo n.º 3
0
 /// <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));
 }