السلام عليكم ورحمة الله وبركاته
كيف يمكن عمل عداد للوقت بحيث يحسب الوقت الذي مر منذ فتح البرنامج
كيف يمكن عمل عداد للوقت بحيث يحسب الوقت الذي مر منذ فتح البرنامج
Page.StartTimer(100, 10);
z = Label.GetText("Label8");
s = Label.GetText("Label1");
m = Label.GetText("Label2");
h = Label.GetText("Label3");
if e_ID==10 then
if tonumber(z) == 9 then
Label.SetText("Label8", 0);
Page.StartTimer(1000,20);
elseif tonumber(z) < 10 then
Label.SetText("Label8", tonumber(z)+1);
end
end
----------
if e_ID==20 then
if tonumber(s)==59 then
Label.SetText("Label2", tonumber(m)+1);
Label.SetText("Label1", 0);
Page.StartTimer(60000,30);
elseif tonumber(s)<60 then
Label.SetText("Label1", tonumber(s)+1);
end
end
------------
if e_ID==30 then
if tonumber(m)==59 then
Label.SetText("Label2", 0);
Label.SetText("Label3", tonumber(h)+1);
elseif tonumber(m) < 60 then
Label.SetText("Label2", tonumber(m)+1);
end
end
Page.StartTimer(100, 10);
z = Label.GetText("Label8");
s = Label.GetText("Label1");
m = Label.GetText("Label2");
h = Label.GetText("Label3");
if e_ID==10 then
if tonumber(z) == 9 then
Label.SetText("Label8", 0);
Page.StartTimer(1000,20);
elseif tonumber(z) < 10 then
Label.SetText("Label8", tonumber(z)+1);
end
end
----------
if e_ID==20 then
if tonumber(s)==59 then
Label.SetText("Label2", tonumber(m)+1);
Label.SetText("Label1", 0);
Page.StartTimer(60000,30);
elseif tonumber(s)<60 then
Label.SetText("Label1", tonumber(s)+1);
end
end
------------
if e_ID==30 then
if tonumber(m)==59 then
Label.SetText("Label2", 0);
Label.SetText("Label3", tonumber(h)+1);
elseif tonumber(m) < 60 then
Label.SetText("Label2", tonumber(m)+1);
end
end
هنا يكون الشرط فعال جدا ........ التطبيق هو خير معلم وصديق .
هههههههههه لما لقيت مفيش فايدة فى تسريع التايمر بالقدر الازم قولت ألجأ للتحايل علية فقررت أن يكون التايمر 1000 مللى ثانية "يعنى 1 ثانية" أى يكون كود الصفحة فى "On Show" :Page.StartTimer(1000, 10);
--
if e_ID==10 then
l = Label.GetText("Label8");
s = Label.GetText("Label1");
m = Label.GetText("Label2");
h = Label.GetText("Label3");
if tonumber(m)<59 then
if tonumber(s)<59 then
if tonumber(l)<999 then
for i=0,998 do
Label.SetText("Label8", i);
end
Label.SetText("Label1", tonumber(s)+1);
Label.SetText("Label8", 0);
end
elseif tonumber(s)==59 then
Label.SetText("Label2", tonumber(m)+1);
Label.SetText("Label1", 0);
end
elseif tonumber(m)==59 then
Label.SetText("Label3", tonumber(h)+1);
Label.SetText("Label2", 0);
end
end
ههههههههه
تعليق