Example #1
0
        // add download tab
        private void AddDownloadTab()
        {
            DownloadTab dlTab = new DownloadTab();
            TabPage     tab   = new TabPage("Download");

            tab.Controls.Add(dlTab);
            // add tab
            tabContainer.Controls.Add(tab);
            // resize tab
            tabContainer.TabPages[tabContainer.SelectedIndex].Controls[0].Size = tabContainer.TabPages[0].Size;
        }
Example #2
0
        // add download tab
        private void AddDownloadTab()
        {
            DownloadTab dlTab = new DownloadTab();
            TabPage tab = new TabPage("Download");

            tab.Controls.Add(dlTab);
            // add tab
            tabContainer.Controls.Add(tab);
            // resize tab
            tabContainer.TabPages[tabContainer.SelectedIndex].Controls[0].Size = tabContainer.TabPages[0].Size;
        }
Example #3
0
        private void AddToDownloadList()
        {
            if (dgvResult.SelectedRows.Count == 0)
            {
                return;
            }

            TabControl  tabContainer = (TabControl)Parent.Parent;
            DownloadTab dlTab        = (DownloadTab)tabContainer.TabPages[0].Controls[0];

            for (int i = 0; i < dgvResult.SelectedRows.Count; i++)
            {
                DataGridViewCellCollection cellCol = dgvResult.SelectedRows[i].Cells;

                BeatInfo beatInfo = new BeatInfo();
                beatInfo.Site   = searchSite;
                beatInfo.Title  = cellCol[0].Value.ToString();
                beatInfo.Artist = cellCol[1].Value.ToString();
                beatInfo.Link   = cellCol[3].Value.ToString();

                dlTab.AddRow(beatInfo);
            }
            tabContainer.SelectTab(0);
        }