简体   繁体   中英

c# idm using 'batch download from clipboard'(one of idm's functions)

I want to make a program using C# (Windows Forms App) that if I click a button, assume that there are some addresses that I want to download in my clipboard already, then using 'batch download from clipboard' function, start downloading with IDM.

Anybody please help me to make it.

Batch download from clipboard

从剪贴板批量下载

you should let operating system to decide which program to run. it will open a default browser and if the address has some file to download it will open your IDM.in "if" section, you can add some checking to see if the address ends with the extension you wanna download . The code-behind will be something like this

        private void button1_Click(object sender, EventArgs e)
    {
           var  clipboard = Clipboard.GetText();
            if (clipboard.StartsWith("http://"))
            {
                System.Diagnostics.Process.Start(clipboard);
            }
    }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM