Example #1
0
        public void LoadImage(string imageUri, bool InResources = true, Abstractions.Scaling Scaling = Scaling.Absolute_None)
        {
            var args = new SetImageHandler()
            {
                Path = imageUri, InResources = InResources, Scaling = Scaling
            };

            SetImagePathEvent?.Invoke(this, args);
        }
Example #2
0
 public static void SetImage(PictureBox box, Image img)
 {
     if (box.InvokeRequired)
     {
         SetImageHandler handler = new SetImageHandler(SetImage);
         box.Invoke(handler, new object[] { box, img });
     }
     else
     {
         box.Image = img;
     }
 }
Example #3
0
        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);
        }
Example #4
0
        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);
        }