မဟာဘုတ္​ ​​ေ​ဗဒင္​ project

မဟာဘုတ္​ ​​ေ​ဗဒင္​ project
မူရင္​းcode ​ေတြကို​ေတာ့ ဆရာညီညီလြင္​ဆီကရတာပါ ျမန္​မာခုႏွစ္​က​ေန အဂၤလိပ္​ခုႏွစ္​ ရ​ေအာင္​တြက္​နည္​းcodeထပ္​ျဖည္​့ၿပီး ​ေဟာကိန္​း ​ေတြကို ​​ေလာကီၫြန္​႔​ေပါင္​းက်မ္​းထဲက​ေနျမန္​မာလိုျပန္​ထားပါတယ္​ color ​ေတြလဲထည့္​့ထားပါတယ္​ :-) :-)
MAIN
########
AddLabel("lb1",2.6%x,1.4%y,47.6%x,8.6%y,"")
AddEditText("edt1",53.1%x,1.3%y,44.2%x,8.6%y,"")
AddLabel("lb2",2.7%x,11.5%y,36.4%x,8.2%y,"")
AddSpinner("spn1",42.4%x,11.4%y,54.5%x,8.5%y,"")
AddButton("btn1",2.5%x,22.5%y,49.4%x,8.9%y,"")
AddButton("btn2",54.6%x,22.4%y,42.1%x,8.9%y,"")
AddScrollView("sv1",0%x,33.9%y,100%x,66.1%y,"")
SetText("lb1","ျမန္​မာ​ေမြးႏွစ္​ထည္​့ရန္​" )
SetText("lb2","​ေမြး​ေန႔​ေရြးခ်ယ္​ပါ" )
SetInputType("edt1",2)
Add( "spn1","တနဂၤ​ေႏြ")
Add( "spn1","တနၤလာ")
Add( "spn1","အဂၤါ")
Add( "spn1","​ဗုဒၶဟူး")
Add( "spn1","ၾကာသပ​ေတး")
Add( "spn1","​ေသာၾကာ")
Add( "spn1","စ​ေန")
SetText( "btn1","တြက္​ခ်က္​မယ္​")
SetText( "btn2","ဖ်က္​မယ္​")
GetPanel("sv1","pnl")
AddLabel("lb3",2%x,0%y,96%x,100%y,"pnl")
dim h(7)
mhbdata
SetActivityTitle("မဟာဘုတ္ေဗဒင္")
AddMenuItem("about")
AddEditText("ed",1%x,75%y,100%x,15%y,"")
SetHint("ed","ျမန္​​မာ​ေမြးႏွစ္​မသိပါက အဂၤလိပ္​ခုႏွစ္​ထည္​့၍တြက္​ပါ")
AddButton("m",10%x,90%y,80%x,10%y,"")
SetText("m","ျမန္​မာ​ေမြးႏွစ္​တြက္​မယ္​")
########
EVENT
########
Sub Button_Click(who)
Select who
Case "btn1"
y=GetText("edt1")
out=y
y=y mod 7
if y=0 then
y=7
end if
e=Getselectedindex("spn1")+1
out=out & "/" & getselectEdItem("spn1") & " --> "
if y=e then
house="ဘဂၤ" & " == " & h(0)
else if y=e+3 or y=e-4 then
house="အဓိပတိ" & " == " & h(6)
else if y=e+6 or y=e-1 then
house="ပုတိ" & " == " & h(5)
else if y=e+2 or y=e-5 then
house="ရာဇ" & " == " & h(4)
else if y=e+5 or y=e-2 then
house="သိုက္​" & " == " & h(3)
else if y=e+1 or y=e-6 then
house="အထြန္​း" & " == " & h(2)
else if y=e+4 or y=e-3 then
house="မရဏ" & " == " & h(1)
end if
SetText("lb3",out & house)
AdjustLabelHeight("lb3")
SetHeight("pnl",GetHeight("lb3"))
Case "btn2"
SetText("lb3","")
SetText("edt1","")
Case"m"
q=GetText("ed")
ans=q-638
SetText("edt1",ans)
End Select
End Sub
============
"data" module
==========
Sub mhbdata
h(0)="ဘဂၤဖြားမွာ ပ်က္​ျပားစြာ ​ေမြးကာ လာရမည္​ ၾကံစည္​ျပဳကာ ပ်က္​တတ္​တာ ​ေသခ်ာမွတ္​ရမည္​"
h(1)="မရဏဖြားမွာ ​ေ၀ဒနာ ​ေမြးကာမ်ားလတ္​မည္​ မ​ေလ​ေၾကလတ္​ မင္​းျဖစ္​တတ္​ မုခ်မွတ္​ရမည္​"
h(2)="အထြန္​းဖြားမွာ ထင္​႐ွားစြာ ​ေမြးကာလာတတ္​သည္​
နာမည္​ သတင္​း ထင္​႐ွားျခင္​း မယြင္​းျဖစ္​လတ္​မည္​"
h(3)="သိုက္​ဖြားသူမွာ ကုသလာ ျပဳကာဖြားလတ္​မည္​ ​ေဏာင္​း၀ယ္​​ေဖာက္​ကား ကုန္​သြယ္​စား မမွားျဖစ္​ရမည္​"
h(4)="ရာဇဖြားမွာ ထက္​ျမတ္​စြာ စိတ္​မွာလ်င္​ရမည္​ ပန္​းခ်ီပန္​းပု ႏႈတ္​မႈ လက္​မႈ တတ္​မႈစံုလိမ္​့မည္​"
h(5)="ပုတိဖြားမွာ ၿငိဳျငင္​စြာ ​ေမြးကာ ဖြားလတ္​မည္​ ​ေ၀းရပ္​ျခားရြာ အိမ္​​ေထာင္​မွာ ျပဳကာ​ေနရမည္​ ႏွ​ေျမာတြန္​႔တို ၀န္​လဲတို စိတ္​တို ဆတ္​လိမ္​့မည္​"
h(6)="အဓိပတိဖြား လူအမ်ား မမွား အုပ္​စ္ိုးမည္​ ရဟန္​း႐ွင္​လူအမ်ားလူ ၾကည္​ျဖဴၫြတ္​ခမည္​"
End Sub
Sub Label_Click(Who)
End Sub
Sub Spinner_ItemClick(who, pos, value)
End Sub
Sub Edit_Change(Who, Old, New)
End Sub
Sub Edit_Enterpressed(who)
End Sub
Sub Menu_Click(Which)
MsgBox("This apk is created by balabala","")
End Sub

No automatic alt text available.

Comments