Jump to content

Progressbar Problemi


efk_715
 Share

Recommended Posts

Aıo çalışmamda progresbar kullanmak istiyorum ama checkboxlarla nasıl ilişkilendirebilirim bilmiyorum.

butona yazdığım kod bu :
[code]c1=CheckBox.GetChecked("CheckBox1")
c2=CheckBox.GetChecked("CheckBox2")
c3=CheckBox.GetChecked("CheckBox3")

if c1 then
File.Run("AutoPlay\\Docs\\seven.exe", "", "", SW_HIDE, true);
Paragraph.SetText("Paragraph1","SEVENKGKFD kurulumu tamamlandi")
end

if c2 then
File.Run("AutoPlay\\Docs\\iso.exe", "", "",SW_HIDE, true);
Paragraph.SetText("Paragraph1","ULTRAISOOSO kurulumu tamamlandi")
end

if c3 then
File.Run("AutoPlay\\Docs\\ins.exe", "", "",SW_HIDE, true);
Paragraph.SetText("Paragraph1","INSTAL kurulumu tamamlandi")
end[/code]
Link to comment
Share on other sites

evet @Baba_ 'nın verdiği konu ile aynı kodlar şu şekilde yaparsan olur:

[codebox]c1=CheckBox.GetChecked("CheckBox1")
c2=CheckBox.GetChecked("CheckBox2")
c3=CheckBox.GetChecked("CheckBox3")

--###### Progress Ayarları ##########
nToplam = 0;
for i=1,33 do
if CheckBox.GetChecked("CheckBox" .. i) then
nToplam = nToplam+1
end
end

Progress.SetRange("Progress1", 0, nToplam)
Progress.SetCurrentPos("Progress1", 0)

--#####################################

if c1 then
nPos = Progress.GetCurrentPos("Progress1")
Progress.SetCurrentPos("Progress1", nPos+1)
File.Run("AutoPlay\\Docs\\seven.exe", "", "", SW_HIDE, true);
Paragraph.SetText("Paragraph1","SEVENKGKFD kurulumu tamamlandi")
end

if c2 then
nPos = Progress.GetCurrentPos("Progress1")
Progress.SetCurrentPos("Progress1", nPos+1)
File.Run("AutoPlay\\Docs\\iso.exe", "", "",SW_HIDE, true);
Paragraph.SetText("Paragraph1","ULTRAISOOSO kurulumu tamamlandi")
end

if c3 then
nPos = Progress.GetCurrentPos("Progress1")
Progress.SetCurrentPos("Progress1", nPos+1)
File.Run("AutoPlay\\Docs\\ins.exe", "", "",SW_HIDE, true);
Paragraph.SetText("Paragraph1","INSTAL kurulumu tamamlandi")
end[/codebox]

Link to comment
Share on other sites

[codebox]c1=CheckBox.GetChecked("CheckBox1")
c2=CheckBox.GetChecked("CheckBox2")
c3=CheckBox.GetChecked("CheckBox3")



--###### Progress Ayarları ##########
nToplam = 0;
for i=1,33 do
if CheckBox.GetChecked("CheckBox" .. i) then
nToplam = nToplam+1
end
end

Progress.SetRange("Progress1", 0, nToplam)
Progress.SetCurrentPos("Progress1", 0)

nAralik = 100/nToplam
nSira=0
--#####################################

if c1 then
nPos = Progress.GetCurrentPos("Progress1")
Progress.SetCurrentPos("Progress1", nPos+1)
File.Run("AutoPlay\\Docs\\seven.exe", "", "", SW_HIDE, true);
Paragraph.SetText("Paragraph1","SEVENKGKFD kurulumu tamamlandi")
nSira=nSira+1
Progress.SetText("Progress1", "%" .. Math.Round(nAralik*nSira, 0))
Application.Sleep(2000)
end

if c2 then
nPos = Progress.GetCurrentPos("Progress1")
Progress.SetCurrentPos("Progress1", nPos+1)
File.Run("AutoPlay\\Docs\\iso.exe", "", "",SW_HIDE, true);
Paragraph.SetText("Paragraph1","ULTRAISOOSO kurulumu tamamlandi")
nSira=nSira+1
Progress.SetText("Progress1", "%" .. Math.Round(nAralik*nSira, 0))
Application.Sleep(2000)
end

if c3 then
nPos = Progress.GetCurrentPos("Progress1")
Progress.SetCurrentPos("Progress1", nPos+1)
File.Run("AutoPlay\\Docs\\ins.exe", "", "",SW_HIDE, true);
Paragraph.SetText("Paragraph1","INSTAL kurulumu tamamlandi")
nSira=nSira+1
Progress.SetText("Progress1", "%" .. Math.Round(nAralik*nSira, 0))
Application.Sleep(2000)
end
[/codebox]

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...