MostWanted Posted April 24, 2010 Share Posted April 24, 2010 (edited) CheckBox Anlatımı 4 CheckBox Anlatımı 3 dersinin devamı niteliğindedir.Yeni video yoktur. Açıklama; Uzun zamandır forumu takip ediyorum ve buna bağlı olarak yeni bir ders değil de önceki dersin devamı niteliğinde fakat onu düzeltecek daha güzelleştirecek bi ders yapmayı uygun gördüm.Bunun için tekrar tekrar video çekmedim.Şimdi bütün olayı teker teker aşağıda anlatıyorum.. KODLAR Global Functions --[[Bu fonksiyonlar MostWanted (talha_252) tarafından yazılmıştır.. Lütfen editlemeyiniz..]]-- --================================================================ --================================================================ parca=0 tamami=0 function sifirla() parca=0 tamami=0 end function secme(yazim) sonuc = CheckBox.GetChecked(yazim) if not (sonuc) then talha = {}; talha.FontBold = false talha.FontWeight = 100 CheckBox.SetProperties(yazim, talha); else talha = {}; talha.FontBold = true talha.FontWeight = 700 CheckBox.SetProperties(yazim, talha); end end function okuyucu(yazim) sonuc = CheckBox.GetChecked(yazim) if (sonuc) then tamami=tamami+1 end end function yaz() parca=parca+1 end function progress() return Math.Ceil((parca/tamami)*100) end function kurulum(checkboxadi, progadi, progexe) secilim = CheckBox.GetChecked(checkboxadi); if (secilim) then StatusDlg.SetMessage(progadi.." sisteminize kurulurken lütfen bekleyin."); result = File.Run("AutoPlay\\Docs\\"..progexe, "", "", SW_SHOWNORMAL, true); error = Application.GetLastError(); if (error ~= 0) then Dialog.Message("Error - "..progexe, _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1); end yaz() StatusDlg.SetTitle("%"..progress().." kurulum tamamlandı.."); end end function hepsinioku(oku) for i=1, oku do okuyucu("CheckBox"..i) end end --================================================================ --================================================================ On Timer StatusDlg.SetMeterPos(progress()); Kur butonu Kodları sifirla() --Artık tek tek yazmak yok.Eğer Checkboxlarınız CheckBox1, CheckBox2 .. şeklindeyse bunu kullanabilirsiniz.. hepsinioku("4") Page.StartTimer(100) StatusDlg.Show(MB_ICONNONE, false); StatusDlg.SetTitle("%0 kurulum tamamlandı.."); Window.Hide(Application.GetWndHandle()); -- pencereyi gizler kurulum("CheckBox1", "Winrar", "winrar.exe") kurulum("CheckBox2", "Winamp", "winamp.exe") kurulum("CheckBox3", "Ccleaner", "ccleaner.exe") kurulum("CheckBox4", "AMS", "ams.exe") StatusDlg.SetMessage("Kurulum Sonlandırılıyor.."); Application.Sleep(1000) StatusDlg.Hide(); Window.Show(Application.GetWndHandle()); -- pencereyi gösterir Burdaki en önemli özellik "kurulum" komutudur.Bu komut sizin daha önce manuel olarak yaptıklarınız tek satırda yapacak.Tek yapmanız gereken; "kurulum("CheckBox'un ismi", "Programın Exesi", "Programın exesinin adı") " Burda dikkat edilmesi gereken yapılmış olan katılımsız kurulumların exesi Docs klasöründe olmalı ve exe'nin isminin doğru yazılmasıdır.Böylece işler çok kolaylaşmış olacak. Örnek Dosya: http://rapidshare.com/files/379724860/chcekbox.anlatimi.4.apz NOT: Bu dersin iyi anlaşılabilmesi için Checkbox Anlatımı 3 dersinin izlenilmiş olması gerekmektedir. Sorularınız için burdayım.. Edited June 3, 2011 by talha_252 Quote Link to comment Share on other sites More sharing options...
xarax Posted May 1, 2010 Share Posted May 1, 2010 yeniden düzenlenmiş kodlar daha iyi olmuş.Teşekkürler. Quote Link to comment Share on other sites More sharing options...
MostWanted Posted May 1, 2010 Author Share Posted May 1, 2010 Kesinlikle bir değişim gerekiyordu.Kodlar uzadıkça uzuyordu acemiler karıştırdıkça karıştırıyordu.Bende böyle bi kod yapayım dedim.Asıl beni şaşırtan bunu daha önce nasıl düşünemediğim.. Quote Link to comment Share on other sites More sharing options...
murathassoy Posted May 11, 2010 Share Posted May 11, 2010 Heyecandan olsa Gerek Quote Link to comment Share on other sites More sharing options...
MostWanted Posted July 6, 2010 Author Share Posted July 6, 2010 http://rapidshare.com/files/405191525/checkbox.anlatimi4.edit.apz.html Apz dosyasını editledim..Bu apz dosyasında StatusDlg değil de normal progress kullanıldı..İsteyenler indirip inceleyebilirler.. Quote Link to comment Share on other sites More sharing options...
kamuran731 Posted July 6, 2010 Share Posted July 6, 2010 Daha evvel başka kodlar kullanlan değişik wpı ler kullanmıştım. Bu dosyayı indirip kullandım çok beğendim. Gerçekten çok güzel bir çalışma Ellerine sağlık Talha_252 Teşekkür ederim Quote Link to comment Share on other sites More sharing options...
sunrice_33 Posted July 8, 2010 Share Posted July 8, 2010 üstadım kodlarını denedim güzel çalışıyor. Kod yazması daha kolay hale gelmiş. DOCS klasörünün altında bir klasör yapıp onun içine programları atmak istesek nerede ne gibi değişiklikler yapmamız gerekir? Quote Link to comment Share on other sites More sharing options...
MostWanted Posted July 9, 2010 Author Share Posted July 9, 2010 Globel kısmında Function kurulum(vs vs vs) adında bi başlık vardır.Ona gel Ordaki result = File.Run("AutoPlay\\Docs\\neklasörüistiyosan\\"..progexe, "", "", SW_SHOWNORMAL, true); yaparsan artık Doc klasörü içinde hangi klasöre atarsan orda çalışır.Ama diyosan ki a.exe'si şurda olsun b.exe si şu klasörde olsun o zaman kur butonuna yazdığın kurulum komutunu şöyle yapacaksın; kurulum("CheckBox1", "Winrar", "aklasörüexesi\\deneme.exe") böyle yaparsan Docs klasörü altındaki aklasörüexesi içindeki deneme.exe yi çalıştırır Kısaca anlayacağın komple değiştirmek istiyosan Global'i ama diyosan ki şu exe şurda olacak bu exe burda o zaman ikinci yolu.. Quote Link to comment Share on other sites More sharing options...
sunrice_33 Posted July 9, 2010 Share Posted July 9, 2010 benim yapmak istediğim 2 kısımdaki gibidir. Bir sorum daha olacak. 2 sayfada checkbox olsun kur butonuna basınca diger sayfadaki checkbox bilgisinide alsın. Bunu nasıl yapabiliriz? Not: Forumda diger sayfadan checkbox verilerini çekme anlatılmış. Ama ordaki kodlar checkbox 3 göre anlatılmış, yazılan checkbox 4 farklı olduğu için birşey yapamadım. Quote Link to comment Share on other sites More sharing options...
MostWanted Posted July 9, 2010 Author Share Posted July 9, 2010 Bunda biraz sakat o iş..Zahmetli... Quote Link to comment Share on other sites More sharing options...
KintaRo Posted July 9, 2010 Share Posted July 9, 2010 (edited) daha önceden bir arkadaş için bir örnek hazırlamıştım. belki buna entegre edersiniz. Global Functions: nCheck1 = 0; nCheck2 = 0; Page1 On Preload: if nCheck1 == 1 then CheckBox.SetChecked("CheckBox1", true) nCheck1 = 1; else CheckBox.SetChecked("CheckBox1", false) nCheck1 = 0; end Page2 Preload: if nCheck2 == 1 then CheckBox.SetChecked("CheckBox2", true) nCheck2 = 1; else CheckBox.SetChecked("CheckBox2", false) nCheck2 = 0; end CheckBox1 On Click: sKontrol = CheckBox.GetChecked(this) if sKontrol then nCheck1 = 1; else nCheck1 = 0; end CheckBox2 On Click: sKontrol = CheckBox.GetChecked(this) if sKontrol then nCheck2 = 1; else nCheck2 = 0; end Kur On Click: if nCheck1 == 1 then Dialog.Message("Mesaj", "1. Program seçildi ve kuruldu") end if nCheck2 == 1 then Dialog.Message("Mesaj", "2. Program seçildi ve kuruldu") end Edited July 9, 2010 by KintaRo Quote Link to comment Share on other sites More sharing options...
MostWanted Posted July 9, 2010 Author Share Posted July 9, 2010 Kintaro onu arkadaşta demiş zaten o örneği gördüm (bende benzer bi örnek yaptım) Ama tam entegre istiyor yani bnm kodlarıma..Kodlarımı baştan yazmam gerekiyodu ben de zahmetli dedim.Ama tabiki dediğin yolu kullanabilir.. Quote Link to comment Share on other sites More sharing options...
KintaRo Posted July 9, 2010 Share Posted July 9, 2010 yapılmış birşeye ekleme yapmak gerçekten çok zor haklısın. uğraşacak babayiğit varsa buyursun ne diyelim yol bizden, gerisi onlardan Quote Link to comment Share on other sites More sharing options...
sunrice_33 Posted July 9, 2010 Share Posted July 9, 2010 O zaman diğer yöntemi kullanmak en güzeli olur sanırım. Bu işlemi de tek sayfalık programlarda kullanırım. İlginiz için teşekkür ederim. Quote Link to comment Share on other sites More sharing options...
MostWanted Posted July 10, 2010 Author Share Posted July 10, 2010 Bu işlemi sadece bir sayfadaki için kullanabilirsin.Daha sonrada diğer sayfadakileri daha önce anlatılan yöntemle yaparsın Quote Link to comment Share on other sites More sharing options...
Abdullah 37 Posted July 14, 2010 Share Posted July 14, 2010 Hocam bir sorum var checkboxları tek tek hepsini işaretlesek hepsi işaretlenince Tümünü Seç Checkboxu nun otomatikmen işaretlenmesini nasıl sağlayabiliriz. Quote Link to comment Share on other sites More sharing options...
KintaRo Posted July 14, 2010 Share Posted July 14, 2010 şu şekilde olabilir. 10 tane checkboxın oldugunu varsayıyorum: Global Functions kodu: nCheck = 0; Page On Show kodu: Page.StartTimer(100) Page On Timer kodu: if nCheck == 10 then CheckBox.SetChecked("tumunusec_checkboxi", true) else CheckBox.SetChecked("tumunusec_checkboxi", false) end ve her Checkboxin On Click kodu: sGet = CheckBox.GetChecked(this) if sGet then nCheck = nCheck+1 else nCheck = nCheck-1 end Quote Link to comment Share on other sites More sharing options...
Abdullah 37 Posted July 14, 2010 Share Posted July 14, 2010 şu şekilde olabilir. 10 tane checkboxın oldugunu varsayıyorum: Global Functions kodu: nCheck = 0; Page On Show kodu: Page.StartTimer(100) Page On Timer kodu: if nCheck == 10 then CheckBox.SetChecked("tumunusec_checkboxi", true) else CheckBox.SetChecked("tumunusec_checkboxi", false) end ve her Checkboxin On Click kodu: sGet = CheckBox.GetChecked(this) if sGet then nCheck = nCheck+1 else nCheck = nCheck-1 end hocam denedim ama saçmalıyor bazen işaretliyor bazen işaretlemiyor Quote Link to comment Share on other sites More sharing options...
KintaRo Posted July 15, 2010 Share Posted July 15, 2010 (edited) haklısın kodlar hatalı doğrusu şu şekilde olacak: Page on show kodu: Page.StartTimer(100) Page On Timer kodu: sGet1 = CheckBox.GetChecked("CheckBox1") sGet2 = CheckBox.GetChecked("CheckBox2") sGet3 = CheckBox.GetChecked("CheckBox3") sGet4 = CheckBox.GetChecked("CheckBox4") sGet5 = CheckBox.GetChecked("CheckBox5") sGet6 = CheckBox.GetChecked("CheckBox6") sGet7 = CheckBox.GetChecked("CheckBox7") sGet8 = CheckBox.GetChecked("CheckBox8") sGet9 = CheckBox.GetChecked("CheckBox9") sGet10 = CheckBox.GetChecked("CheckBox10") if sGet1 and sGet2 and sGet3 and sGet4 and sGet5 and sGet6 and sGet7 and sGet8 and sGet9 and sGet10 then CheckBox.SetChecked("tumunusec", true) else CheckBox.SetChecked("tumunusec", false) end sadece bunlarla işini görebilirsin. istersen tümünü seç checkboxı içinde şu kodları kullanabilirsin: sGet = CheckBox.GetChecked(this) if sGet then ilk=1 son=10 adim=1 for adim=ilk,son do CheckBox.SetChecked("CheckBox"..adim, true) end else ilk=1 son=10 adim=1 for adim=ilk,son do CheckBox.SetChecked("CheckBox"..adim, false) end end Not: son=10 sayısını checkbox sayına gore duzeltirsin. Edited July 15, 2010 by KintaRo Quote Link to comment Share on other sites More sharing options...
MostWanted Posted July 15, 2010 Author Share Posted July 15, 2010 Kintaro bi gün giremedim hemen cvpları sen devralmışsın Bu arada cvpa bi alternatif sunmak istiyorum.. sGet = CheckBox.GetChecked(this) if sGet then nCheck = nCheck+1 else nCheck = nCheck-1 end if nCheck == 10 then CheckBox.SetChecked("tumunusec_checkboxi", true) else CheckBox.SetChecked("tumunusec_checkboxi", false) end On timer'e gerek yok.Zaten sadece checkboxlara tıklanıldığında işlem olacağı için..bu arada globale nChwck=0; yazmayı unutmuyosun tabi Quote Link to comment Share on other sites More sharing options...
KintaRo Posted July 15, 2010 Share Posted July 15, 2010 ee napalim usta müşteri beklemeye gelmez :-) senin teknik de iyiymiş evet Quote Link to comment Share on other sites More sharing options...
MostWanted Posted July 26, 2010 Author Share Posted July 26, 2010 if String.ToNumber(Label.GetText("Talhas")) == 0 then Dialog.Message("Hata!", "Lütfen bir program seçiniz!") else --geri kalan kodlar end Bu kodu hepsinioku komutundan sonra kullanırsanız eğer kullanıcı program seçmediyse hata vererek program seçmesini ister! Quote Link to comment Share on other sites More sharing options...
whitedeath Posted August 19, 2010 Share Posted August 19, 2010 (edited) slm beyler bi sorum olacaktı ya bu Global Function nerde bi türlü bulamadım gitti bunu videolu yada resimli anlatamazmısınız Edited August 19, 2010 by whitedeath Quote Link to comment Share on other sites More sharing options...
MostWanted Posted August 19, 2010 Author Share Posted August 19, 2010 O kadar anlatımda nerden girildiğini göremedin mi?En basitinden Checkbox anlatımı 3 e bak Quote Link to comment Share on other sites More sharing options...
whitedeath Posted August 20, 2010 Share Posted August 20, 2010 dediklerinin aynısını yaptım programlarıda docsa attım ama program seçip kur diyorum kurulum sonlandırılıyor diyip 2 saniyede kapanıyo program isimleri ve exe isimleri hepsi doğru 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.