سلام دوستان کسی می تونه به برنامه لیمیت بده سورس پایین می زارم
#Region Project Attributes
#ApplicationLabel: پیامک کده
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#AdditionalRes:C:\Users\hassanmohammadi\Desktop\New folder\Google play service-low size\google-play-services-base-7.5.0\res, com.google.android.gms
#AdditionalRes:C:\Users\hassanmohammadi\Desktop\New folder\Google play service-low size\google-play-services-gcm-7.5.0\res, com.google.android.gms
#AdditionalRes:C:\Users\hassanmohammadi\Desktop\New folder\res, co.ronash.pushe
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: False
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim sql1 As SQL
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim timer1 As Timer
Dim sm As SlidingMenu
Private listFeh As ListView
Private lblhead As Label
Private imgpc As ImageView
Private Btnlike As ImageView
Private btncopy As Button
Private btnShare As Button
Private lblpayamaktest As Label
Private pnlpayamak As Panel
Dim lv As CustomListView
Dim su As StringUtils
Dim cb As BClipboard
Private lblsample As Label
Dim pagenume As Int=1
Dim p As Pushe
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("lsplash")
If File.Exists(File.DirInternal,"pm.db")=False Then
File.Copy(File.DirAssets,"pm.db",File.DirInternal,"pm.db")
End If
sql1.Initialize(File.DirInternal,"pm.db",True)
timer1.Initialize("timer1",2000)
timer1.Enabled=True
p.initialize(True)
End Sub
Sub timer1_Tick
Activity.RemoveAllViews
Activity.LoadLayout("lmain")
timer1.Enabled=False
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub img1_Click
Activity.RemoveAllViews
Activity.LoadLayout("bankpayamak")
pagenume=2
Dim imgback As BitmapDrawable
imgback.Initialize(LoadBitmap(File.DirAssets,"item.png"))
listFeh.SingleLineLayout.Background=imgback
listFeh.SingleLineLayout.ItemHeight=10%y
listFeh.SingleLineLayout.Label.Gravity=Gravity.CENTER
listFeh.SingleLineLayout.Label.TextSize=15
listFeh.SingleLineLayout.Label.TextColor=Colors.White
listFeh.SingleLineLayout.Label.Typeface=Typeface.LoadFromAssets("BYekan.ttf")
Dim cur As Cursor
cur=sql1.ExecQuery("SELECT * FROM Tblfehrest ")
Dim i As Int
For i=0 To cur.RowCount-1
cur.Position=i
listFeh.AddSingleLine2(cur.GetString("Name"),cur.GetString("ID"))
Next
End Sub
Sub listFeh_ItemClick (Position As Int, Value As Object)
Activity.RemoveAllViews
Activity.LoadLayout("payamak")
pagenume=3
Dim cur As Cursor
cur=sql1.ExecQuery2("SELECT *FROM Tblfehrest Where ID=?",Array As String(Value))
cur.Position=0
lblhead.Text=cur.GetString("Name")
imgpc.SetBackgroundImage(LoadBitmapSample(File.DirAssets,cur.GetString("Ax"),imgpc.Width,imgpc.Height))
lv.Initialize(Me,"lv")
Activity.AddView(lv.AsView,1%X,16%Y,98%X,80%Y)
Dim cur As Cursor
cur=sql1.ExecQuery2("SELECT * FROM Tblpayamak WHERE FehID=?",Array As String(Value))
Dim i As Int
For i=6 To cur.RowCount-1
cur.Position=i
Dim pl As Panel
pl.Initialize("pl")
lblsample.Text=cur.GetString("Matn")
lv.Add(pl,su.MeasureMultilineTextHeight(lblsample,lblsample.Text)+70dip,"")
pl.LoadLayout("temp")
pnlpayamak.Height=su.MeasureMultilineTextHeight(lblsample,lblsample.Text)+btncopy.Height+30dip
lblpayamaktest.Text=cur.GetString("Matn")
lblpayamaktest.Height=su.MeasureMultilineTextHeight(lblpayamaktest,lblpayamaktest.Text)
lblpayamaktest.Top=pnlpayamak.Top+10dip
btncopy.Top=lblpayamaktest.Top+lblpayamaktest.Height+15dip
btnShare.Top=lblpayamaktest.Top+lblpayamaktest.Height+15dip
Btnlike.Top=lblpayamaktest.Top+lblpayamaktest.Height+15dip
btnShare.Tag=cur.GetString("Matn")
btncopy.Tag=cur.GetString("Matn")
Btnlike.Tag=cur.GetString("ID")
If checkalaqe(cur.GetString("ID"))=False Then
Btnlike.SetBackgroundImage(LoadBitmap(File.DirAssets,"like.png"))
Else
Btnlike.SetBackgroundImage(LoadBitmap(File.DirAssets,"like - copy.png"))
End If
Next
End Sub
Sub BtnShare_Click
Dim obj As View
obj=Sender
Dim share As Intent
share.Initialize(share.ACTION_SEND,"")
share.SetType("text/plain")
share.PutExtra("android.intent.extra.TEXT",obj.Tag)
share.WrapAsIntentChooser("متن از چه طریقی ارسال شود؟")
StartActivity(share)
End Sub
Sub btncopy_Click
Dim obj As View
obj=Sender
cb.setText(obj.Tag)
ToastMessageShow("متن پیامک در حافظه موقت کپی شد",False)
End Sub
Sub Btnlike_Click
Dim obj As View
obj=Sender
If checkalaqe(obj.Tag)=False Then
sql1.ExecNonQuery2("UPDATE Tblpayamak SET alaqe=1 WHERE ID=?",Array As String (obj.Tag))
obj.SetBackgroundImage(LoadBitmap(File.DirAssets,"like - copy.png"))
ToastMessageShow("پیامک مورد نظر شما به علاقه مندی ها اضافه شد",False)
Else
sql1.ExecNonQuery2("UPDATE Tblpayamak SET alaqe=0 WHERE ID=?",Array As String (obj.Tag))
obj.SetBackgroundImage(LoadBitmap(File.DirAssets,"like.png"))
ToastMessageShow("پیامک مورد نظر شما از لیست علاقمندی حذف شد",False)
End If
End Sub
Sub checkalaqe (PayamakID As Int)As Boolean
Dim cur As Cursor
cur=sql1.ExecQuery2("SELECT * FROM Tblpayamak WHERE ID=?",Array As String(PayamakID))
cur.Position=0
If cur.GetString("alaqe")=1 Then
Return True
Else
Return False
End If
End Sub
Sub Activity_KeyPress (KeyCode As Int) As Boolean 'Return True to consume the event
If KeyCode=KeyCodes.KEYCODE_BACK Then
Select pagenume
Case 1
If Msgbox2("آیا از خروج اطمینان دارید؟","خروج","بله","خیر","",Null)=DialogResponse.POSITIVE Then
ExitApplication
Else
Return True
End If
Case 2
Activity.RemoveAllViews
Activity.LoadLayout("lmain")
pagenume=1
Return True
Case 3
img1_Click
Return True
End Select
End If
End Sub
Sub img2_Click
Activity.RemoveAllViews
Activity.LoadLayout("payamak")
pagenume=2
lblhead.Text="لیست علاقه مندی ها"
imgpc.SetBackgroundImage(LoadBitmapSample(File.DirAssets,"cool.png",imgpc.Width,imgpc.Height))
lv.Initialize(Me,"lv")
Activity.AddView(lv.AsView,1%X,16%Y,98%X,80%Y)
Dim cur As Cursor
cur=sql1.ExecQuery("SELECT *FROM Tblpayamak WHERE alaqe=1")
Dim i As Int
For i=0 To cur.RowCount-1
cur.Position=i
Dim pl As Panel
pl.Initialize("pl")
lblsample.Text=cur.GetString("Matn")
lv.Add(pl,su.MeasureMultilineTextHeight(lblsample,lblsample.Text)+70dip,"")
pl.LoadLayout("temp")
pnlpayamak.Height=su.MeasureMultilineTextHeight(lblsample,lblsample.Text)+btncopy.Height+30dip
lblpayamaktest.Text=cur.GetString("Matn")
lblpayamaktest.Height=su.MeasureMultilineTextHeight(lblpayamaktest,lblpayamaktest.Text)
lblpayamaktest.Top=pnlpayamak.Top+10dip
btncopy.Top=lblpayamaktest.Top+lblpayamaktest.Height+15dip
btnShare.Top=lblpayamaktest.Top+lblpayamaktest.Height+15dip
Btnlike.Top=lblpayamaktest.Top+lblpayamaktest.Height+15dip
btnShare.Tag=cur.GetString("Matn")
btncopy.Tag=cur.GetString("Matn")
Btnlike.Tag=cur.GetString("ID")
If checkalaqe(cur.GetString("ID"))=False Then
Btnlike.SetBackgroundImage(LoadBitmap(File.DirAssets,"like.png"))
Else
Btnlike.SetBackgroundImage(LoadBitmap(File.DirAssets,"like - copy.png"))
End If
Next
End Sub
Sub img3_Click
Dim cafebazar As Intent
cafebazar.Initialize(cafebazar.Action_edit,"bazaar://details?id=com.mobilestudio.payamakbank")
StartActivity(cafebazar)
End Sub
Sub img4_Click
Msgbox2("ایمیل پشتیبانی:[email protected]"& CRLF&"کانال تلگرام:telegram.me/mobilestudio415","ارتباط با ما","باشه","","",Null)
End Sub
Sub img5_Click
Msgbox2("کاری از گروه برنامه نویسی موبایل استودیو"& CRLF&"برنامه نویس:حسن محمدی","درباره ما","باشه","","",Null)
End Sub
Sub btnUpdate_Click
Dim ht As HttpJob
ht.Initialize("update",Me)
ProgressDialogShow("updating")
ht.Download("")
End Sub
Sub JobDone(Job As HttpJob)
ProgressDialogHide
If Job.Success Then
If Job.JobName = "update" Then
Dim ou As OutputStream
File.Delete(File.DirInternal,"pm.db")
ou = File.OpenOutput(File.DirInternal,"pm.db",False)
File.Copy2(Job.GetInputStream,ou)
ou.Close
ToastMessageShow("بانک پیامک اپدیت شد لطلفا برنامه را ببندید ودوباره اجرا کنید",False)
End If
End If
End Sub
سوال
hassan543 2
سلام دوستان کسی می تونه به برنامه لیمیت بده سورس پایین می زارم
لینک ارسال
به اشتراک گذاری در سایت های دیگر
11 پاسخ به این سوال تاکنون داده شده است
ارسالهای توصیه شده
بایگانی شده
این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.