Jump to content

If Komutunda Problem


El-Arabi
 Share

Recommended Posts

Listboxtan seçtiğim verinin durmunda sadece bir tanesini gösteriyor iki sinide göstermek istiyorum Örn:services.msc den bir servisin durumunu ve çalışma şeklini alıyorum ama sadece durumunu yazdırıyor.Verilerin alınıp alınmadıgını kontrol ettim dogru geliyor. Edited by El-Arabi
Link to comment
Share on other sites

Registry'den dönen değerler string'dir siz number kullanmışsınız. ListBox OnDoubleClick evresindeki kodları şunlarla değiştirin:

[codebox]sec = ListBox.GetSelected("ListBox1");
item = ListBox.GetItemData("ListBox1", sec[1]);
result = Service.Query("", item);
if result == 1 then
calisma = "Durdurulmuş";
elseif result == 4 then
calisma = "Çalışıyor";
elseif result == 7 then
calisma = "Duraklatılmış";
end

start = Registry.GetValue(HKEY_LOCAL_MACHINE,"SYSTEM\\CurrentControlSet\\Services\\"..item, "Start", true);

if start == "1" then
baslangic = "Sistem";
elseif start == "2" then
baslangic = "Otomatik";
elseif start == "3" then
baslangic = "Elle";
elseif start == "4" then
baslangic = "Devre Dışı";
end

Paragraph.SetText("Paragraph1", "Çalışma Durumu : "..calisma.."\r\n".."Sistem Durumu :"..baslangic);
[/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...