Dj Demir Posted July 3, 2013 Share Posted July 3, 2013 Tekrardan merhaba arkadaşlar. Ams'ye yeni yeni başlıyorum bu aralar Sürekli soru soruyorum. Rahatsız ediyorsam affola. Malum yeniyim daha tam çözemedim. Ams'de seçilen radio butonuna göre bir işlemi nasıl yaptırabilirim. Quote Link to comment Share on other sites More sharing options...
reyiz Posted July 3, 2013 Share Posted July 3, 2013 Örnek: https://www.box.com/s/wpngotzhtaq8fggb2q9k Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted July 3, 2013 Author Share Posted July 3, 2013 ilginiz için teşekkürler. Pardon eksik yazmışım fark etmemişim. Örneğinizdeki haliyle yapabiliyorum. Eksik yazdığım kısım şu Belli bir koşul olup ardından işlem gerçekleşmeli Örnek vermek gerekirse ; kontrol = RadioButton.GetChecked("RadioButton1"); if kontrol == true then Dialog.Message("Bilgi", "1. seçeneği seçtiniz", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); end bu komutu şöyle yapmaya çalıştım olmadı kontrol = RadioButton.GetChecked("RadioButton1"); if kontrol == true and == Label1 == Label2 then Dialog.Message("Bilgi", "1. seçeneği seçtiniz", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); end yani radio button seçili ise ve label1 label2'ye eşit olursa bu işlemi yap demeye çalıştım olmadı Quote Link to comment Share on other sites More sharing options...
reyiz Posted July 3, 2013 Share Posted July 3, 2013 Böyle olması gerekiyor: if kontrol == true and kontrol == Label1 and kontrol == Label2 then Dialog.Message("Bilgi", "1. seçeneği seçtiniz", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); end Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted July 3, 2013 Author Share Posted July 3, 2013 Hocam bu şekilde de denedim ama yine olmadı Neden acaba? Quote Link to comment Share on other sites More sharing options...
reyiz Posted July 3, 2013 Share Posted July 3, 2013 (edited) Koşullandırma da kullandığınız Label1 değişkeni ile Label1'de yazılı olanı çekmeye mi çalışıyorsunuz? Edited July 3, 2013 by reyiz Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted July 3, 2013 Author Share Posted July 3, 2013 evet hocam ayne öyle. ve label1'in yazısını label2'ye çektiriyorum ikisi eşit olmuş oluyor. Bu koşul sağlanmasına rağmen ardından yapılması gereken işlemi yapmıyor. Quote Link to comment Share on other sites More sharing options...
reyiz Posted July 3, 2013 Share Posted July 3, 2013 (edited) Label'da yazanı Label.GetText() fonksiyonu ile alıyoruz. Projenizi gönderirseniz daha iyi yardımcı olabilirim. Edited July 4, 2013 by reyiz Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted July 3, 2013 Author Share Posted July 3, 2013 (edited) Proje dosyası biraz ağır hocam içinde başka başka şeyler var O yüzden işin o kısmı ile ilgili ufak bir apz hazırlayıp yükledim http://www.mediafire.com/?hzp0b3d87k2jbgt Edited July 3, 2013 by Dj Demir Quote Link to comment Share on other sites More sharing options...
reyiz Posted July 3, 2013 Share Posted July 3, 2013 İyice aklım karıştı. Verdiğiniz proje üzerinden giderek, ayrıntılı bir şekilde neler yapılacağını gösterir misiniz? Resimli olarak gösterirseniz daha iyi olur. Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted July 3, 2013 Author Share Posted July 3, 2013 (edited) hocam projede gördüğünüz gibi comboboxlar sayesinde bir saat belirleniyor. zaten projenin sol tarafında sistemin kendi saati işliyor. comboboxlar ile belirlenen saat, sağ taraftaki labele, uygula butonu ile aktarılıyor. ve ardından sistem saati ile belirlenen saat bir süre sonra eşit olduğu zaman herhangi bir işlem yapılıyor. buraya kadar kolay. Ama benim için işin zor kısmı Bunların radiobutonu seçili iken yapılması Edited July 3, 2013 by Dj Demir Quote Link to comment Share on other sites More sharing options...
reyiz Posted July 3, 2013 Share Posted July 3, 2013 Şimdi ne demeye çalıştığınızı anladım. RadioButton seçili değilse o kısımları disable yapabilirsin aslında. Koşullandırma seçilen zamana gelinip gelinmediğini bulmak için tek başına yetmez. Bir döngü kurmanız gerekiyor. Döngü gereksiz yere programı meşgul edeceğinden sol taraftaki saati güncellemek için kullandığımız koda koşullandırma kurmamız lazım. Örneği hazırlıyorum şimdi. Ama bir soru daha sormam lazım. Projede başka RadioButton kullanacak mısınız? Yani RadioButton tıklandığı zaman seçili hale geliyor ve başka bir RadioButton'a tıklanmadığı sürece pasif hale geliyor. Başka RadioButton kullanmayacaksanız Aktif - Pasif gibi, RadioButton'u kaldırıp CheckBox koyacağım. Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted July 3, 2013 Author Share Posted July 3, 2013 Başka Radio Butonları da olacak hocam. O yüzden CheckBox değil de Radio Butonu için hazırladım. Quote Link to comment Share on other sites More sharing options...
reyiz Posted July 3, 2013 Share Posted July 3, 2013 (edited) Hazırladım. İstediğiniz gibi seçilen zamana gelince eylem gerçekleşiyor. Örnek olması açısından seçilen zamana gelince çalışan bir Dialog koydum. RadioButton seçili değilken işlem yapmaması için seçenekleri devre dışı bırakan bir komut koydum. Dakika ve saniye bölümüne 60 koymuşsunuz, bu hatayı da düzelttim :p https://www.box.com/s/pfmngmx1f9yf82u40gdx Edited July 3, 2013 by reyiz Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted July 3, 2013 Author Share Posted July 3, 2013 (edited) Hocam çok teşekkürler. Deneyip bildiririm . Çok sağ olun o kadar yardımcı oldunuz Edit: Bilgilendirme Hocam istediğim oldu çok sağ olun. Demek ki orada eşitlenmesi gerekenler labeller değilmiş. Sayenizde bunu da öğrendim Ben labelleri eşitlemeye çalışıyordum yemiyordu:) Çok faydalı oldunuz hocam . Mantığı anlatmanız da ayrıca taktire şayan Edited July 3, 2013 by Dj Demir Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted July 4, 2013 Author Share Posted July 4, 2013 Hocam yeni fark ettim . Diğer RadioButtonuna basınca farklı bir işlem yapamıyorum. Yani radio biri seçince oluyor ama radio iki seçince pasif olmasının dışında onun içinde farklı bir işlem yaptıramıyorum Seçilen radio butonuna göre işlem yapmak istiyorum ben. Belki fazla oluyorum ama işte :) Quote Link to comment Share on other sites More sharing options...
reyiz Posted July 4, 2013 Share Posted July 4, 2013 https://www.box.com/s/z25sy6weoja3b5sskmjq 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.