예제 #1
0
 // <snippet260>
 public void Start()
 {
     // The MarqueeControl may contain any number of
     // controls that implement IMarqueeWidget, so
     // find each IMarqueeWidget child and call its
     // StartMarquee method.
     foreach (Control cntrl in this.Controls)
     {
         if (cntrl is IMarqueeWidget)
         {
             IMarqueeWidget widget = cntrl as IMarqueeWidget;
             widget.StartMarquee();
         }
     }
 }
예제 #2
0
        ///////////////////////////////////////////////////////////////////////
        #region IMarqueeWidget implementation

        public virtual void StartMarquee()
        {
            // The MarqueeBorder control may contain any number of
            // controls that implement IMarqueeWidget, so find
            // each IMarqueeWidget child and call its StartMarquee
            // method.
            foreach (Control cntrl in this.Controls)
            {
                if (cntrl is IMarqueeWidget)
                {
                    IMarqueeWidget widget = cntrl as IMarqueeWidget;
                    widget.StartMarquee();
                }
            }

            // Start the updating thread and pass it the UpdatePeriod.
            this.backgroundWorker1.RunWorkerAsync(this.UpdatePeriod);
        }
예제 #3
0
        // </snippet450>

        // <snippet460>
        private void OnVerbRunTest(object sender, EventArgs e)
        {
            IMarqueeWidget widget = this.Control as IMarqueeWidget;

            widget.StartMarquee();
        }