﻿
{"id":2597,"date":"2014-03-29T09:54:24","date_gmt":"2014-03-29T09:54:24","guid":{"rendered":"http:\/\/www.gencayyildiz.com\/blog\/?p=2597"},"modified":"2014-03-29T09:54:24","modified_gmt":"2014-03-29T09:54:24","slug":"c-ile-internetten-dosya-indirme","status":"publish","type":"post","link":"https:\/\/www.gencayyildiz.com\/blog\/c-ile-internetten-dosya-indirme\/","title":{"rendered":"C# \u0130le \u0130nternetten Dosya \u0130ndirme"},"content":{"rendered":"<div id=\"fb-root\"><\/div>\n<p>C# ile geli\u015ftirdi\u011finiz projelerinizde internetten dosya indirme ihtiyac\u0131n\u0131z olabilir.Tabi b\u00f6yle bir ihtiyaca binlerce \u00e7\u00f6z\u00fcm bulabilir veya size uygun bir teknikte geli\u015ftirebilirsiniz.\u0130\u015fte size o binlerce \u00e7\u00f6z\u00fcmden biriside al\u0131n benden&#8230; \ud83d\ude42<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n        public void DosyaIndir(string URL, string IndirilecekDizin, string DosyaAdi)\r\n        {\r\n            WebClient webClient = new WebClient();\r\n            webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed);\r\n            webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(ProgressChanged);\r\n            webClient.DownloadFileAsync(new Uri(URL), IndirilecekDizin + &quot;\/&quot; + DosyaAdi);\r\n        }\r\n        private static void ProgressChanged(object sender, DownloadProgressChangedEventArgs e)\r\n        {\r\n            Console.WriteLine(&quot;Dosya indiriliyor: %{0}&quot;, e.ProgressPercentage);\r\n            Console.Read();\r\n        }\r\n        private static void Completed(object sender, AsyncCompletedEventArgs e)\r\n        {\r\n            Console.WriteLine(&quot;Dosya indirme tamamland\u0131.&quot;);\r\n            Console.Read();\r\n        }\r\n<\/pre>\n<p>Yukar\u0131daki s\u0131n\u0131f sayesinde internetten rahatl\u0131kla dosya indirebilirsiniz.&#8221;ProgressChanged&#8221; olay\u0131 ile dosyan\u0131n indirilme durumunu y\u00fczdelik olarak hesaplayabilir, &#8220;Completed&#8221; olay\u0131 ile indirme i\u015flemi bittikten sonra i\u015flemler ger\u00e7ekle\u015ftirebilirsiniz.<\/p>\n<p>\u0130yi \u00e7al\u0131\u015fmalar dilerim&#8230;<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>C# ile geli\u015ftirdi\u011finiz projelerinizde internetten dosya indirme ihtiyac\u0131n\u0131z olabilir.Tabi b\u00f6yle bir ihtiyaca binlerce \u00e7\u00f6z\u00fcm bulabilir veya size uygun bir teknikte geli\u015ftirebilirsiniz.\u0130\u015fte size o binlerce \u00e7\u00f6z\u00fcmden biriside al\u0131n benden&#8230; \ud83d\ude42 public void DosyaIndir(string URL, string&#46;&#46;&#46;<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,338],"tags":[27],"class_list":["post-2597","post","type-post","status-publish","format-standard","hentry","category-c-sharp-c","category-c-5-0","tag-c"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/2597","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/comments?post=2597"}],"version-history":[{"count":0,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/2597\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/media?parent=2597"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/categories?post=2597"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/tags?post=2597"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}