PColik Posted September 25, 2011 Share Posted September 25, 2011 (edited) arkadaşlar ben bir butona kopyalama kodu verdim. butona tıklayınca iki dosya masaüstüne kopyalanıyor. fakat progress bar 2 defa doluyor birincisi ilk dosya için ikincisi ise ikinci dosya için. ben bu ikisinin işlemini tek dolumluk yapabilirmiyim. yani 2 dosyadan 1'i kopyalanınca progress bar %50 olacak. butona yazdığım kod ise şu; function CopyCallback (Source,Destination,Copied,Total) Progress.SetCurrentPos("Progress1", (Copied / Total) * 100); yuzde = Math.Floor((Copied / Total) * 100); Progress.SetText("Progress1", "%"..yuzde..""); end File.Copy("AutoPlay\\Docs\\Adobe Flash Player 11 RC1 For Internet Explorer.exe", _DesktopFolder, true, true, false, true, CopyCallback); File.Copy("AutoPlay\\Docs\\Adobe Flash Player 11 RC1 For Other Browsers.exe", _DesktopFolder, true, true, false, true, CopyCallback); error = Application.GetLastError(); if error ~= 0 then Dialog.Message("Hata!", "Kopyalanma Sırasında Bir Hata Oluştu!", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1); end result = Dialog.Message("Başarılı!", "Adobe® Flash Player® Kurulum Dosyaları Başarıyla Masaüstüne Kopyalandı", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); result = DialogEx.Close(0); ŞİMDİDEN TEŞEKKÜRLER... Edited September 25, 2011 by PColik Quote Link to comment Share on other sites More sharing options...
PColik Posted September 26, 2011 Author Share Posted September 26, 2011 cevap verebilecek kimse yokmu. Quote Link to comment Share on other sites More sharing options...
MostWanted Posted September 27, 2011 Share Posted September 27, 2011 function CopyCallback (Source,Destination,Copied,Total) Progress.SetCurrentPos("Progress1", (Copied / Total) * 50); yuzde = Math.Floor((Copied / Total) * 50); Progress.SetText("Progress1", "%"..yuzde..""); end function CopyCallbacs (Source,Destination,Copied,Total) Progress.SetCurrentPos("Progress1", 50 + ((Copied / Total) * 50)); yuzde = Math.Floor(50 + ((Copied / Total) * 50)); Progress.SetText("Progress1", "%"..yuzde..""); end File.Copy("AutoPlay\\Docs\\Adobe Flash Player 11 RC1 For Internet Explorer.exe", _DesktopFolder, true, true, false, true, CopyCallback); File.Copy("AutoPlay\\Docs\\Adobe Flash Player 11 RC1 For Other Browsers.exe", _DesktopFolder, true, true, false, true, CopyCallbacs); error = Application.GetLastError(); if error ~= 0 then Dialog.Message("Hata!", "Kopyalanma Sırasında Bir Hata Oluştu!", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1); end result = Dialog.Message("Başarılı!", "Adobe® Flash Player® Kurulum Dosyaları Başarıyla Masaüstüne Kopyalandı", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); result = DialogEx.Close(0); Denemedim ama sanırım doğru. Quote Link to comment Share on other sites More sharing options...
PColik Posted September 28, 2011 Author Share Posted September 28, 2011 olmadı. pardon oldu. ben bir yerde hata yapmışım peki şöyle yapabilirmiyiz. 2 adet progress olucak. biri mevcut dosyanın ilerlemesini, biride toplam ilerlemeyi gösterecek. [color="#FF0000"][b]Bilinchard : Flood Yapmayınız.[/b][/color] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.