Ejemplo n.º 1
0
        private void btnDownloadPool_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(txtPoolId.Text))
            {
                MessageBox.Show("Please specify pool ID to download.");
                return;
            }
            string ID = txtPoolId.Text;

            if (apiTools.IsValidPoolLink(ID))
            {
                ID = ID.Split('/')[4].Split('?')[0];
            }

            PoolDownloadInfo NewInfo = new PoolDownloadInfo(txtPoolId.Text);

            NewInfo.OpenAfter                = chkPoolOpenAfter.Checked;
            NewInfo.MergeGraylistedPages     = chkPoolMergeGraylisted.Checked;
            NewInfo.DownloadBlacklistedPages = chkPoolDownloadBlacklistedImages.Checked;
            NewInfo.MergeBlacklistedPages    = chkPoolMergeBlacklisted.Checked;
            frmPoolDownloader Downloader = new frmPoolDownloader();

            Downloader.DownloadInfo = NewInfo;
            Downloader.Show();
        }
Ejemplo n.º 2
0
            public static bool DownloadPool(string PoolId, bool UseDialog = true)
            {
                try {
                    frmPoolDownloader PoolDL = new frmPoolDownloader();
                    PoolDL.DownloadInfo = new PoolDownloadInfo(PoolId);
                    switch (UseDialog)
                    {
                    case true:
                        PoolDL.ShowDialog();
                        break;

                    case false:
                        PoolDL.Show();
                        break;
                    }
                    return(true);
                }
                catch {
                    throw;
                }
            }