Esempio n. 1
0
        private void OnDownloadAll(object sender, EventArgs e)
        {
            DownloadForm form = new DownloadForm();

            form.DestinationPath = System.Environment.GetEnvironmentVariable("APPDATA") + "\\Images\\";
            foreach (KeyValuePair <int, KeyValuePair <string, string> > item in onlineStorage)
            {
                string sUrl   = item.Value.Key;
                string sTitle = item.Value.Value;

                form.Add(sUrl, sTitle);
            }

            form.ShowDialog();
        }
Esempio n. 2
0
        private void OnDownloadSelected(object sender, EventArgs e)
        {
            DownloadForm form = new DownloadForm();

            form.DestinationPath = System.Environment.GetEnvironmentVariable("APPDATA") + "\\Images\\";
            foreach (ListViewItem listItem in listView1.Items)
            {
                if (listItem.Checked)
                {
                    ImageListViewItem imgItem = (ImageListViewItem)listItem;

                    string sUrl   = onlineStorage[imgItem.Id].Key;
                    string sTitle = onlineStorage[imgItem.Id].Value;

                    form.Add(sUrl, sTitle);
                }
            }

            form.ShowDialog();
        }