Exemplo n.º 1
0
        private void CtlRecommanded_Click(object sender, EventArgs e)
        {
            try
            {
                _skipNodeSelection = true;
                CustomeThumbControl ctl = sender as CustomeThumbControl;

                this.treeView1.SelectedNode = this.SelectedNode = treeView1.FindByFullPath(ctl.VideoUrl).FirstOrDefault();

                List <VideoInfo> nextVideoList     = new List <VideoInfo>();
                List <VideoInfo> previousVideoList = new List <VideoInfo>();

                CreatePreviousAndNextPlaylist(_mostRecommandedVideos, ctl.VideoUrl, out nextVideoList, out previousVideoList);

                frmUpCommingVideo upcomingVideoForm = new frmUpCommingVideo();
                upcomingVideoForm.ParentFormControl     = this;
                upcomingVideoForm.ClientInfoObject      = this.ClientInfoObject;
                upcomingVideoForm.EncryptedVideo        = false;
                upcomingVideoForm.NextVideoFileList     = nextVideoList;
                upcomingVideoForm.PreviousVideoFileList = previousVideoList;
                upcomingVideoForm.CurrentVideoInfo      = ctl.ThumbnailInformation;//new VideoInfo() { FileName = ctl.ThumbnailInformation.VideoName, ThumbnailFilePath = ctl.ThumbUrl, VideoFullUrl = ctl.VideoUrl };
                upcomingVideoForm.EncryptedVideo        = true;
                upcomingVideoForm.SelectedNode          = this.treeView1.SelectedNode;
                upcomingVideoForm.DashboardFormControl  = this;
                upcomingVideoForm.Show();
                this.Hide();
            }
            finally
            {
                _skipNodeSelection = false;
            }
        }
Exemplo n.º 2
0
        private void CtlThumb_Click(object sender, EventArgs e)
        {
            CustomeThumbControl ctl = sender as CustomeThumbControl;
            // Find index of currently selected video in list.

            List <VideoInfo> nextVideoList     = new List <VideoInfo>();
            List <VideoInfo> previousVideoList = new List <VideoInfo>();

            if (_searchApplied)
            {
                CreatePreviousAndNextPlaylist(_searchList, ctl.VideoUrl, out nextVideoList, out previousVideoList);
            }
            else
            {
                CreatePreviousAndNextPlaylist(_videoThumbnailFilePathList, ctl.VideoUrl, out nextVideoList, out previousVideoList);
            }

            frmUpCommingVideo upcomingVideoForm = new frmUpCommingVideo();

            upcomingVideoForm.ParentFormControl     = this;
            upcomingVideoForm.ClientInfoObject      = this.ClientInfoObject;
            upcomingVideoForm.NextVideoFileList     = nextVideoList;
            upcomingVideoForm.PreviousVideoFileList = previousVideoList;
            upcomingVideoForm.CurrentVideoInfo      = ctl.ThumbnailInformation;// new VideoInfo() { VideoName = ctl.ThumbnailInformation.VideoName, ThumbnailFilePath = ctl.ThumbnailInformation.ThumbnailFilePath, VideoFullUrl = ctl.ThumbnailInformation.VideoFullUrl};
            upcomingVideoForm.EncryptedVideo        = true;
            upcomingVideoForm.SelectedNode          = this.treeView1.SelectedNode;
            upcomingVideoForm.DashboardFormControl  = this.DashboardFormControl;
            upcomingVideoForm.Show();
            this.Hide();
        }
Exemplo n.º 3
0
        private void AddNextVideoList()
        {
            for (int i = 0; i < NextVideoFileList.Count; i++)
            {
                CustomeThumbControl ctlThumb = new CustomeThumbControl(CtlThumb_Click);
                ctlThumb.ThumbName  = NextVideoFileList[i].VideoName;
                ctlThumb.ThumbUrl   = NextVideoFileList[i].ThumbnailFilePath; //Path.Combine(thumbnailSubjectPath, "Subjects_ENGLISH.png");
                ctlThumb.VideoUrl   = NextVideoFileList[i].VideoFullUrl;
                ctlThumb.LabelWidth = 90;
                //ctlThumb.Size = new System.Drawing.Size(80, 80);
                ctlThumb.Size   = new System.Drawing.Size(60, 120);
                ctlThumb.Margin = new Padding(8, 5, 0, 0);
                flowLayoutPanelUpcoming.Controls.Add(ctlThumb);
            }

            if (NextVideoFileList.Count <= 0)
            {
                pnlUpcomingVideo.Visible = false;
                pnlSep.Visible           = false;
            }

            else if (PreviousVideoFileList.Count <= 0)
            {
                flowLayoutPanelUpcoming.FlowDirection = FlowDirection.LeftToRight;
                lblUpcomming.TextAlign = ContentAlignment.MiddleLeft;
            }
        }
Exemplo n.º 4
0
 // Nitin Start
 private void AddVideoThumbnailControls(FlowLayoutPanel flowLayoutPanel, List <VideoInfo> videoInfoList, Action <object, EventArgs> clickDeligate)
 {
     flowLayoutPanel.Controls.Clear();
     for (int j = 0; j < videoInfoList.Count; j++)
     {
         CustomeThumbControl ctlThumb = new CustomeThumbControl(clickDeligate);
         ctlThumb.ThumbnailInformation = videoInfoList[j];
         ctlThumb.ThumbName            = videoInfoList[j].VideoName;
         ctlThumb.ThumbUrl             = videoInfoList[j].ThumbnailFilePath;
         ctlThumb.VideoUrl             = videoInfoList[j].VideoFullUrl;
         ctlThumb.LabelWidth           = 118;
         ctlThumb.Size   = new System.Drawing.Size(120, 183);
         ctlThumb.Margin = new Padding(12, 0, 5, 0);
         flowLayoutPanel.Controls.Add(ctlThumb);
     }
 }
Exemplo n.º 5
0
        private void AddVideoThumbnailControls(List <VideoInfo> thumbnailInfoList)
        {
            flowLayoutVideoPanel.Controls.Clear();
            for (int j = 0; j < thumbnailInfoList.Count; j++)
            {
                CustomeThumbControl ctlThumb = new CustomeThumbControl(CtlThumb_Click);
                ctlThumb.ThumbName            = thumbnailInfoList[j].VideoName;
                ctlThumb.ThumbUrl             = thumbnailInfoList[j].ThumbnailFilePath; //Path.Combine(thumbnailSubjectPath, "Subjects_ENGLISH.png");
                ctlThumb.VideoUrl             = thumbnailInfoList[j].VideoFullUrl;
                ctlThumb.ThumbnailInformation = thumbnailInfoList[j];
                //ctlThumb.Click += CtlThumb_Click;
                ctlThumb.LabelWidth = 118;
                ctlThumb.Margin     = new Padding(5, 0, 10, 0);
                ctlThumb.Size       = new System.Drawing.Size(120, 183);

                //ctlThumb
                flowLayoutVideoPanel.Controls.Add(ctlThumb);
            }
        }
Exemplo n.º 6
0
        private void CtlThumb_Click(object sender, EventArgs e)
        {
            try
            {
                CustomeThumbControl ctl = sender as CustomeThumbControl;
                if (_lastPlayedVideoFullUrl.Equals(ctl.VideoUrl) == true)
                {
                    return;
                }

                //this.axWindowsMediaPlayer1.URL = "";
                //_lastPlayedVideoFullUrl = ctl.VideoUrl;
                //this.lblFileName.Text = Path.GetFileNameWithoutExtension(ctl.ThumbName);
                this.EncryptedVideo = true;
                PlayEncryptedVideo(ctl.VideoUrl);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(ex, ex.Message, false);
                throw;
            }
        }
Exemplo n.º 7
0
        private void AddPreviousVideoList()
        {
            for (int i = 0; i < PreviousVideoFileList.Count; i++)
            {
                CustomeThumbControl ctlThumb = new CustomeThumbControl(CtlThumb_Click);
                ctlThumb.ThumbName            = PreviousVideoFileList[i].VideoName;
                ctlThumb.ThumbUrl             = PreviousVideoFileList[i].ThumbnailFilePath; //Path.Combine(thumbnailSubjectPath, "Subjects_ENGLISH.png");
                ctlThumb.VideoUrl             = PreviousVideoFileList[i].VideoFullUrl;
                ctlThumb.ThumbnailInformation = PreviousVideoFileList[i];
                //ctlThumb.Size = new System.Drawing.Size(80, 80);
                ctlThumb.LabelWidth = 90;
                //ctlThumb.Size = new System.Drawing.Size(80, 80);
                ctlThumb.Size   = new System.Drawing.Size(60, 120);
                ctlThumb.Margin = new Padding(0, 5, 15, 0);
                flowLayoutPanelPrevious.Controls.Add(ctlThumb);
            }

            if (PreviousVideoFileList.Count <= 0)
            {
                pnlPreviousVideo.Visible = false;
                pnlSep.Visible           = false;
            }
        }
Exemplo n.º 8
0
        private void CtlMostWatchedVideo_Click(object sender, EventArgs e)
        {
            try
            {
                _skipNodeSelection = true;
                CustomeThumbControl ctl = sender as CustomeThumbControl;
                // Find index of currently selected video in list.
                List <VideoInfo> nextVideoList     = new List <VideoInfo>();
                List <VideoInfo> previousVideoList = new List <VideoInfo>();

                this.treeView1.SelectedNode = this.SelectedNode = FindVideoParentTreeNode(ctl.VideoUrl);

                CreatePreviousAndNextPlaylist(_mostWatchedVideos, ctl.VideoUrl, out nextVideoList, out previousVideoList);

                frmUpCommingVideo upcomingVideoForm = (CommonAppStateDataHelper.FindFormByFormType("frmUpCommingVideo") as frmUpCommingVideo);
                if (upcomingVideoForm == null)
                {
                    upcomingVideoForm = new frmUpCommingVideo();
                }
                upcomingVideoForm.ParentFormControl     = this;
                upcomingVideoForm.ClientInfoObject      = this.ClientInfoObject;
                upcomingVideoForm.EncryptedVideo        = false;
                upcomingVideoForm.NextVideoFileList     = nextVideoList;
                upcomingVideoForm.PreviousVideoFileList = previousVideoList;
                upcomingVideoForm.CurrentVideoInfo      = ctl.ThumbnailInformation; //  new VideoInfo() { VideoName = ctl.ThumbnailInformation.VideoName, ThumbnailFilePath = ctl.ThumbnailInformation.ThumbnailFilePath, VideoFullUrl = ctl.ThumbnailInformation.VideoFullUrl };
                upcomingVideoForm.EncryptedVideo        = true;
                upcomingVideoForm.SelectedNode          = this.treeView1.SelectedNode;
                upcomingVideoForm.DashboardFormControl  = this;
                upcomingVideoForm.Show();
                this.Hide();
            }
            finally
            {
                _skipNodeSelection = false;
            }
        }