Exemple #1
0
        private void DownloadImage(Uri url)
        {
            if (Internet.IsConnected())
            {
                try
                {
                    WriteOnPicture(pcr_picture, "Lütfen Bekleyiniz...");

                    EnabledButtons(new Control[] { btn_wallpaper, btn_save, btn_link, btn_back }, false);

                    Uri downloadUrl = Wallhaven.GetDownloadUrl(url);

                    Download(downloadUrl, wallpaperPath);
                }
                catch
                {
                }
            }
            else
            {
                MessageBox.Show("İnternet Bağlantınızı Kontrol Edin", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            }
        }
Exemple #2
0
        private void btn_refresh_Click(object sender, EventArgs e)
        {
            pictureWebSiteLink = Wallhaven.GetRandomUrl(); //Random Resim Urlsini al

            DownloadImage(pictureWebSiteLink);
        }