Jump to content

pairs

Editor
  • Posts

    2516
  • Joined

  • Last visited

  • Days Won

    24

Posts posted by pairs

  1. --####Global function###--
    function CopyCallback (Source,Destination,Copied,Total)
    Progress.SetCurrentPos("Progress1", (Copied / Total) * 100);
    Label.SetText("Label1", String.SplitPath(Destination).Filename..""..String.SplitPath(Destination).Extension)
    Label.SetText("Label3", String.GetFormattedSize(Copied, FMTSIZE_MB, true))
    Label.SetText("Label4", String.GetFormattedSize(Total, FMTSIZE_MB, true))
    yuzde = Math.Floor((Copied / Total) * 100);
    Progress.SetText("Progress1", "%"..yuzde.."");
    end
    --#####################--



    DragAndDrop.SetDataFormat(DataFormat.FileDrop);
    DragAndDrop.Start(Application.GetWndHandle());
    nFile = DragAndDrop.GetDataObject();

    for i,v in pairs(nFile) do
    if String.SplitPath(v).Extension == ".exe" then
    File.Copy(v,_SourceFolder.."\\AutoPlay\\Docs\\Programlar", 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
    sys.init();
    end
    end
  2. Evet vardır

    [code] if x < 75 then
    Progress.SetProperties("Progress4", {BarColor = Math.HexColorToNumber("99CC00")});
    elseif x > 75 and x < 90 then
    Progress.SetProperties("Progress4", {BarColor = Math.HexColorToNumber("FFFF00")});
    elseif x > 90 then
    Progress.SetProperties("Progress4", {BarColor = Math.HexColorToNumber("FF0000")});
    end

    [/code]

    bu örnek işini görecektir.Color değerleri yanlış olabilir html renk kodlarına bakıp netten koyabilirsin.
×
×
  • Create New...