void ThreadScrollFunc() { SetControlPos scpControl = new SetControlPos(SetConPos); for (; ;) { object[] objLabel = { lblScroll, lblScroll.Left - 1 }; lblScroll.Invoke(scpControl, objLabel); if (lblScroll.Left == pnlScroll.Left - lblScroll.Width) { object[] objSetPos = { lblScroll, pnlScroll.Left + pnlScroll.Width }; lblScroll.Invoke(scpControl, objSetPos); } // Application.DoEvents(); Thread.Sleep(10); } }
void clsDownload_VideoInfoReceived(clsMain.VideoInfoEventArgs VideoInfo) { SetTextHandler sth = new SetTextHandler(SetText); strCurrentVideoTitle = VideoInfo.strTitle; object[] text = { txtInfo, "[AUTHOR YOUTUBE CHANNEL:]" + Environment.NewLine + VideoInfo.strAuthor + Environment.NewLine + Environment.NewLine + "[VIDEO VIEWS:]" + Environment.NewLine + VideoInfo.strViews + Environment.NewLine + Environment.NewLine + "[LIKES:]" + Environment.NewLine + VideoInfo.strLikes + Environment.NewLine + Environment.NewLine + "[DISLIKES:]" + Environment.NewLine + VideoInfo.strDislikes + Environment.NewLine + Environment.NewLine + "[VIDEO DURATION:]" + Environment.NewLine + VideoInfo.strLength }; txtInfo.Invoke(sth, text); SetImageHandler si = new SetImageHandler(SetImage); //object[] objLoading = { picVideoPic,Properties.Resources.Loading }; //picVideoPic.Invoke(si, objLoading); object[] objImage = { picVideoPic, VideoInfo.strPic }; picVideoPic.Invoke(si, objImage); SetControlPos scp = new SetControlPos(SetConPos); object[] objScroll = { lblScroll, pnlScroll.Left }; lblScroll.Invoke(scp, objScroll); object[] strTitle = { lblScroll, VideoInfo.strTitle }; lblScroll.Invoke(sth, strTitle); }
void ThreadScrollFunc() { SetControlPos scpControl = new SetControlPos(SetConPos); for (; ; ) { object[] objLabel = { lblScroll, lblScroll.Left - 1 }; lblScroll.Invoke(scpControl, objLabel); if (lblScroll.Left == pnlScroll.Left - lblScroll.Width) { object[] objSetPos = { lblScroll, pnlScroll.Left + pnlScroll.Width }; lblScroll.Invoke(scpControl, objSetPos); } // Application.DoEvents(); Thread.Sleep(10); } }