コード例 #1
0
        private bool CheckAllDownloadComplete()
        {
            bool state = true;

            Control.ControlCollection ctrlColl = this.flpDownloadList.Controls;

            foreach (Control ctrl in ctrlColl)
            {
                if (ctrl.GetType().Equals(typeof(ucDownloadInfoBox)))
                {
                    ucDownloadInfoBox downInfoBox = ctrl as ucDownloadInfoBox;

                    if (downInfoBox.GetCheckState())
                    {
                        if (downInfoBox.DownloadComlete)
                        {
                            state &= true;
                        }
                        else
                        {
                            state = false;
                        }
                    }
                    else
                    {
                        state &= true;
                    }
                }
            }

            return(state);
        }
コード例 #2
0
        private void Download()
        {
            this.Cursor = Cursors.WaitCursor;
            this.mDownCheckTimer.Start();
            this.SetControlEnabled(true);

            Control.ControlCollection ctrlColl = this.flpDownloadList.Controls;

            foreach (Control ctrl in ctrlColl)
            {
                if (ctrl.GetType().Equals(typeof(ucDownloadInfoBox)))
                {
                    ucDownloadInfoBox downInfoBox = ctrl as ucDownloadInfoBox;

                    if (downInfoBox.GetCheckState())
                    {
                        downInfoBox.Download();
                    }
                }
            }
        }
コード例 #3
0
        private int GetCheckDownloadListCount()
        {
            int checkCnt = 0;

            Control.ControlCollection ctrlColl = this.flpDownloadList.Controls;

            foreach (Control ctrl in ctrlColl)
            {
                if (ctrl.GetType().Equals(typeof(ucDownloadInfoBox)))
                {
                    ucDownloadInfoBox downInfoBox = ctrl as ucDownloadInfoBox;

                    if (downInfoBox.GetCheckState())
                    {
                        checkCnt++;
                    }
                }
            }

            return(checkCnt);
        }
コード例 #4
0
        private void DeleteCheckDownloadList()
        {
            List <ucDownloadInfoBox> delList = new List <ucDownloadInfoBox>();

            Control.ControlCollection ctrlColl = this.flpDownloadList.Controls;

            foreach (Control ctrl in ctrlColl)
            {
                if (ctrl.GetType().Equals(typeof(ucDownloadInfoBox)))
                {
                    ucDownloadInfoBox downInfoBox = ctrl as ucDownloadInfoBox;

                    if (downInfoBox.GetCheckState())
                    {
                        delList.Add(downInfoBox);
                    }
                }
            }

            foreach (ucDownloadInfoBox downInfoBox in delList)
            {
                this.flpDownloadList.Controls.Remove(downInfoBox);
            }
        }
コード例 #5
0
        private bool CheckExistDownloadList()
        {
            int count    = 0;
            int checkCnt = 0;

            Control.ControlCollection ctrlColl = this.flpDownloadList.Controls;

            foreach (Control ctrl in ctrlColl)
            {
                if (ctrl.GetType().Equals(typeof(ucDownloadInfoBox)))
                {
                    count++;

                    ucDownloadInfoBox downInfoBox = ctrl as ucDownloadInfoBox;

                    if (downInfoBox.GetCheckState())
                    {
                        checkCnt++;
                    }
                }
            }

            if (count < 1)
            {
                MessageBox.Show(this, "리스트에 추가된 동영상이 존재하지 않습니다.", ConstValue.MSGBOX_TITLE, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return(false);
            }

            if (checkCnt < 1)
            {
                MessageBox.Show(this, "리스트에 체크된 동영상이 존재하지 않습니다.", ConstValue.MSGBOX_TITLE, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return(false);
            }

            return(true);
        }