Jump to content

Kopyalama İşlemindeki Progress Sorunu


PColik
 Share

Recommended Posts

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 by PColik
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...