コード例 #1
0
ファイル: marqueecontrol.cs プロジェクト: zhimaqiao51/docs
 public void Stop()
 {
     // The MarqueeControl may contain any number of
     // controls that implement IMarqueeWidget, so find
     // each IMarqueeWidget child and call its StopMarquee
     // method.
     foreach (Control cntrl in this.Controls)
     {
         if (cntrl is IMarqueeWidget)
         {
             IMarqueeWidget widget = cntrl as IMarqueeWidget;
             widget.StopMarquee();
         }
     }
 }
コード例 #2
0
        public virtual void StopMarquee()
        {
            // The MarqueeBorder control may contain any number of
            // controls that implement IMarqueeWidget, so find
            // each IMarqueeWidget child and call its StopMarquee
            // method.
            foreach (Control cntrl in this.Controls)
            {
                if (cntrl is IMarqueeWidget)
                {
                    IMarqueeWidget widget = cntrl as IMarqueeWidget;
                    widget.StopMarquee();
                }
            }

            // Stop the updating thread.
            this.backgroundWorker1.CancelAsync();
        }
コード例 #3
0
        private void OnVerbStopTest(object sender, EventArgs e)
        {
            IMarqueeWidget widget = this.Control as IMarqueeWidget;

            widget.StopMarquee();
        }