Dj Demir Posted June 29, 2013 Share Posted June 29, 2013 Merhaba arkadaşlar. Ufak bir uygulama yapmaya çalışıyorum. Uygulama bir kaç sayfadan oluşuyor. Benim yapmak istediğim şu; Kullanıcı MenuBar'dan sayfa seçince; Page.Jump komutuyla sayfayı göstertiyorum. Ancak programı kapatıp açtığı zaman yine o sayfada kalması için yapılacak bir şey var mı? Bilgisi olan arkadaşlar yardımcı olabilirse sevinirim. Teşekkürler. Quote Link to comment Share on other sites More sharing options...
Sistemci Posted June 29, 2013 Share Posted June 29, 2013 s.a kardeşim ini ye kaydetip açılışta iniden veriyi çekip kapattığın sayfadan çekebilirsin. Quote Link to comment Share on other sites More sharing options...
HalilYanar Posted June 29, 2013 Share Posted June 29, 2013 Bak şimdi kardeş Her pagenin on show'una yada menu bardaki sayfa olarak atlattığın id lerin kodlarının herbirine kafa göre ini ye veri aktarıcaksın yani olay şöyle olucak ; Page1 Onshow : IniFile.SetValue(_TempFolder.."\\deneme.ini", "Kontrol", "Secim", "1"); Page2 Onshow : IniFile.SetValue(_TempFolder.."\\deneme.ini", "Kontrol", "Secim", "2"); Page3 Onshow : IniFile.SetValue(_TempFolder.."\\deneme.ini", "Kontrol", "Secim", "3"); Şimdi kaydımızı bu şekilde yaptırdık başlangıçtada seçiliyi açması için. Page1 On show : nAl = IniFile.GetValue(_TempFolder.."\\deneme.ini", "Kontrol", "Secim"); if nAl == "1" then Page.Jump("Page1"); elseif nAl == "2" then Page.Jump("Page2"); elseif nAl == "3" then Page.Jump("Page3"); end Benim mantığım bu. Ama yanımda ams yok ben mantığı göstermeye çalıştım. Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted June 29, 2013 Author Share Posted June 29, 2013 Teşekkürler kardeş. Ancak ben yeni başlıyorum ams'ye ve bu cevap için bir kaç soru soracam. 1.ilk 3 komut ini'yi oluşturup temp klasörüne atıp içeriğini id ve seçim ile mi dolduruyor. 2.Global Function kısmına herhangi bir komut yazılmıyor değil mi? Sayfaların On Show evrelerine yazılması gerekiyor. Quote Link to comment Share on other sites More sharing options...
HalilYanar Posted June 29, 2013 Share Posted June 29, 2013 Evet : ilk 3 komut ini'yi oluşturup temp klasörüne atıp içeriğini id ve seçim ile mi dolduruyor. Yazılmıyor : Global Function kısmına herhangi bir komut yazılmıyor değil mi? Evet Sayfaların On Show evrelerine. Quote Link to comment Share on other sites More sharing options...
reyiz Posted June 29, 2013 Share Posted June 29, 2013 Kodları gerekli şekilde değiştirirsen Global'a da yazabilirsin. Ben Ini yerine kayit defterinden depolama yapmanı öneririm. Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted June 29, 2013 Author Share Posted June 29, 2013 (edited) Lakin ben kodları girdiğim zaman hata alıyorum. Hata şu şekilde. [/img] http://m1306.hizliresim.com/1b/x/pqtul.jpg [/img] Gösterdiği Satır; verdiğiniz kodların başladığı satır. Edited June 29, 2013 by Dj Demir Quote Link to comment Share on other sites More sharing options...
reyiz Posted June 29, 2013 Share Posted June 29, 2013 Girdiğiniz kod nedir? Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted June 29, 2013 Author Share Posted June 29, 2013 IniFile.SetValue(_TempFolder.."\\Ayarlar.ini", "1", "11", "1"); IniFile.SetValue(_TempFolder.."\\Ayarlar.ini", "22", "2", "2"); IniFile.SetValue(_TempFolder.."\\Ayarlar.ini", "33", "3", "3"); nAl = IniFile.GetValue(_TempFolder.."\\Ayarlar.ini", "11", "1"); if nAl == "1" then Page.Jump("Tema1"); elseif nAl == "2" then Page.Jump("Tema2"); elseif nAl == "3" then Page.Jump("Tema3"); end Quote Link to comment Share on other sites More sharing options...
reyiz Posted June 29, 2013 Share Posted June 29, 2013 Bu şekilde değeri yazacaksınız: INIFile.SetValue(_TempFolder.."\\ayar.ini", "ayarlar", "sayfa", "1"); Böyle bir ini dosyası oluşacak: [ayarlar] sayfa=1 Aşağıdaki değer ile ini dosyasını kontrol edip başka bir sayfaya atlayacaksınız:Global ve On Show'a yazabilirsiniz. if kontrol == 1 then Page.Jump("sayfa"); end Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted June 29, 2013 Author Share Posted June 29, 2013 Teşekkür ederim Ancak komutları yazıyorum (Global'da da denedim On Show'da da denedim.) Hata yok. ini dosyası oluşuyor. Lakin programda sayfa değiştiriyorum, ardından kapatıyorum programı Tekrar açtığımda o sayfadan gelmiyor. ilk sayfadan başlıyor uygulama. Size zahmet olmasa ufacık bir apz örneği ile gösterebilir misiniz? Tekrar teşekkür ederim. Quote Link to comment Share on other sites More sharing options...
reyiz Posted June 29, 2013 Share Posted June 29, 2013 INIFile.GetValue fonksiyonunu vermeyi unutmuşum. Örnek APZ: [attachment=1117:ini.zip] Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted June 29, 2013 Author Share Posted June 29, 2013 Çok teşekkür ederim hocam Çok makbule geçti. Quote Link to comment Share on other sites More sharing options...
HalilYanar Posted July 2, 2013 Share Posted July 2, 2013 Ben söylemiştim ama anlamamış olabilirsin. Yanımda ams yok dedim. Yani buda kodlar doğru olamayabilir demek. Doğrusu INIFile'miş :) Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted July 2, 2013 Author Share Posted July 2, 2013 Sorun değil kardeşim sana laf söylemedim zaten:) Sağ olasın var olasın yardımcı olduğun için 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.