Exemple #1
0
        // Button calls DownloadImages().
        private void buttonDownloadWallpapers_Click(object sender, EventArgs e)
        {
            DownloadInputBox testDialog = new DownloadInputBox();

            if (sm.GetDefaultFolder() == "")
            {
                InfoLabel.Text = "Select Folder!";
            }
            else
            {
                testDialog.Text = "Enter subreddit names. www.reddit.com/r/THISTEXT";
                string subReddits;
                testDialog.SetDefaultTextBoxText("wallpaper+wallpapers");
                List <string> subRedditSuggestions = new List <string>();
                subRedditSuggestions.Add("wallpaper+wallpapers");
                subRedditSuggestions.Add("MinimalWallpaper");
                subRedditSuggestions.Add("BigWallpapers");
                subRedditSuggestions.Add("wallpaper");
                subRedditSuggestions.Add("wallpapers");
                testDialog.SetComboBoxDataSource(subRedditSuggestions);
                // Show testDialog as a modal dialog and determine if DialogResult = OK.
                if (testDialog.ShowDialog(this) == DialogResult.OK && !testDialog.Input.Contains(' '))
                {
                    subReddits = testDialog.Input;
                }
                else
                {
                    subReddits = "wallpaper+wallpapers";
                }

                DownloadImages(subReddits);
            }
        }
Exemple #2
0
        // Button calls DownloadImages().
        private void buttonDownloadWallpapers_Click(object sender, EventArgs e)
        {
            DownloadInputBox testDialog = new DownloadInputBox();
            if (sm.GetDefaultFolder() == "")
            {
                InfoLabel.Text = "Select Folder!";
            }
            else
            {
                testDialog.Text = "Enter subreddit names. www.reddit.com/r/THISTEXT";
                string subReddits;
                testDialog.SetDefaultTextBoxText("wallpaper+wallpapers");
                List<string> subRedditSuggestions = new List<string>();
                subRedditSuggestions.Add("wallpaper+wallpapers");
                subRedditSuggestions.Add("MinimalWallpaper");
                subRedditSuggestions.Add("BigWallpapers");
                subRedditSuggestions.Add("wallpaper");
                subRedditSuggestions.Add("wallpapers");
                testDialog.SetComboBoxDataSource(subRedditSuggestions);
                // Show testDialog as a modal dialog and determine if DialogResult = OK.
                if (testDialog.ShowDialog(this) == DialogResult.OK && !testDialog.Input.Contains(' '))
                {
                    subReddits = testDialog.Input;
                }
                else
                {
                    subReddits = "wallpaper+wallpapers";
                }

                DownloadImages(subReddits);
            }
        }