کد زیر برای نشان دادن نام کالا از بانک اطلاعاتی آنلاین هست ( روی هاست )
مشکلی که هست فراخوانی مقدار از بانک اطلاعاتی فقط برای آیتم آخر اتفاق می افته بقیه خالی هستن
این کد افزودن هست
Sub slider_vijeh
'************پانل ویژه
cssview.Initialize2(Colors.RGB(247,247,247),5,1,Colors.White)
panel_vijeh_shadow.Initialize("panel_vijeh_shadow")
panel_vijeh.Initialize("panel_vijeh")
panel_vijeh.Background=cssview
cssview.Initialize2(Colors.LightGray,5,1,Colors.LightGray)
panel_vijeh_shadow.Background=cssview
Dim label_vijeh As Label
label_vijeh.Initialize("label_vijeh")
label_vijeh.Text="پیشنهاد ویژه"
label_vijeh.TextSize=6.5dip
label_vijeh.Typeface=Typeface.LoadFromAssets("IRANSansMobile.ttf")
label_vijeh.Gravity=Gravity.RIGHT
label_vijeh.TextColor=Colors.Black
panel_vijeh.AddView(label_vijeh,0%x,1%y,98%X,5%y)
scrolvijeh.Initialize(356%x,"scrolvijeh")
Dim i As Int
Dim leftvijeh As Int
connect1.Initialize("getdataname",Me)
leftvijeh=0
For i=1 To 8
imgvijeh.Initialize("imgvijeh")
tagvijeh.Initialize("tagvijeh")
tagvijeh.Bitmap=LoadBitmap(File.DirAssets,"vijeh.png")
tagvijeh.Gravity=Gravity.FILL
Picasso1.LoadUrl("http://chbit.ir/components/com_jshopping/files/img_products/20cb2df290e884b370e06d9da29b1767.jpg").IntoImageView(imgvijeh)
imgvijeh.Tag=i+1
panel_dor.Initialize("")
Dim cssdor As ColorDrawable
cssdor.Initialize2(Colors.White,5,2,Colors.LightGray)
panel_dor.Background=cssdor
lblsellvijeh.Initialize("lblsellvijeh")
lblnamevijeh.Initialize("lblnamevijeh")
lblsellvijeh.Text="150000"&" "&"تومان"
lblnamevijeh.Tag=i+1 این هم کد ارسال connect1.PostString ("http://chbit.ir/shop/getdata.php","")
lblsellvijeh.TextColor=Colors.Red
lblnamevijeh.TextColor=Colors.Black
lblsellvijeh.TextSize=7dip
lblnamevijeh.TextSize=7dip
lblsellvijeh.Typeface=Typeface.LoadFromAssets("SHOMA.TTF")
lblnamevijeh.Typeface=Typeface.LoadFromAssets("SHOMA.TTF")
lblsellvijeh.Gravity=Gravity.CENTER_HORIZONTAL
lblnamevijeh.Gravity=Gravity.CENTER_HORIZONTAL
scrolvijeh.Panel.AddView(imgvijeh,PerXToCurrent((i*3.5)+leftvijeh+0.5),3%y,38%x,19%y)
scrolvijeh.Panel.AddView(lblsellvijeh,PerXToCurrent((i*3.5)+leftvijeh),27.5%y,38%x,18%y)
scrolvijeh.Panel.AddView(tagvijeh,PerXToCurrent((i*3.5)+leftvijeh+24),2%y,15%x,7.5%y)
Dim ln As Label
ln.Initialize("")
ln.TextSize=7dip
ln.Text="___________________"
ln.TextColor=Colors.Gray
ln.Gravity=Gravity.CENTER
scrolvijeh.Panel.AddView(ln,PerXToCurrent((i*3.5)+leftvijeh+0.5),24%y,38%x,6%y)
Dim csslblnamevijeh As ColorDrawable
csslblnamevijeh.Initialize(Colors.RGB(28,201,236),10)
'lblnamevijeh.Background=csslblnamevijeh
Dim lnname As StringFunctions
Dim clnname As Int
clnname=lnname.Len(lblnamevijeh.Text)
'If clnname>20 Then
scrolvijeh.Panel.AddView(lblnamevijeh,PerXToCurrent((i*3.5)+leftvijeh+0.5),22%y,38%x,6%y)
'Else
'scrolvijeh.Panel.AddView(lblnamevijeh,PerXToCurrent((i*3.5)+leftvijeh+0.5),23%y,38%x,6%y)
' End If
leftvijeh=leftvijeh+41
Next
panel_vijeh.AddView(scrolvijeh,0%x,5%y,100%x,34%y)
'main_scrol.Panel.AddView(panel_vijeh_shadow,0%x,mheight+PerYToCurrent(42.5),100%x,40%y)
main_scrol.Panel.AddView(panel_vijeh,0%x,mheight+PerYToCurrent(40),100%x,40%y)
سوال
rbageherih 0
سلام
کد زیر برای نشان دادن نام کالا از بانک اطلاعاتی آنلاین هست ( روی هاست )
مشکلی که هست فراخوانی مقدار از بانک اطلاعاتی فقط برای آیتم آخر اتفاق می افته بقیه خالی هستن
این کد افزودن هست
Sub slider_vijeh
'************پانل ویژه
cssview.Initialize2(Colors.RGB(247,247,247),5,1,Colors.White)
panel_vijeh_shadow.Initialize("panel_vijeh_shadow")
panel_vijeh.Initialize("panel_vijeh")
panel_vijeh.Background=cssview
cssview.Initialize2(Colors.LightGray,5,1,Colors.LightGray)
panel_vijeh_shadow.Background=cssview
Dim label_vijeh As Label
label_vijeh.Initialize("label_vijeh")
label_vijeh.Text="پیشنهاد ویژه"
label_vijeh.TextSize=6.5dip
label_vijeh.Typeface=Typeface.LoadFromAssets("IRANSansMobile.ttf")
label_vijeh.Gravity=Gravity.RIGHT
label_vijeh.TextColor=Colors.Black
panel_vijeh.AddView(label_vijeh,0%x,1%y,98%X,5%y)
scrolvijeh.Initialize(356%x,"scrolvijeh")
Dim i As Int
Dim leftvijeh As Int
connect1.Initialize("getdataname",Me)
leftvijeh=0
For i=1 To 8
imgvijeh.Initialize("imgvijeh")
tagvijeh.Initialize("tagvijeh")
tagvijeh.Bitmap=LoadBitmap(File.DirAssets,"vijeh.png")
tagvijeh.Gravity=Gravity.FILL
Picasso1.LoadUrl("http://chbit.ir/components/com_jshopping/files/img_products/20cb2df290e884b370e06d9da29b1767.jpg").IntoImageView(imgvijeh)
imgvijeh.Tag=i+1
panel_dor.Initialize("")
Dim cssdor As ColorDrawable
cssdor.Initialize2(Colors.White,5,2,Colors.LightGray)
panel_dor.Background=cssdor
scrolvijeh.Panel.AddView(panel_dor,PerXToCurrent((i*3.5)+leftvijeh),2%y,39%x,30%y)
lblsellvijeh.Initialize("lblsellvijeh")
lblnamevijeh.Initialize("lblnamevijeh")
lblsellvijeh.Text="150000"&" "&"تومان"
lblnamevijeh.Tag=i+1
این هم کد ارسال connect1.PostString ("http://chbit.ir/shop/getdata.php","")
lblsellvijeh.TextColor=Colors.Red
lblnamevijeh.TextColor=Colors.Black
lblsellvijeh.TextSize=7dip
lblnamevijeh.TextSize=7dip
lblsellvijeh.Typeface=Typeface.LoadFromAssets("SHOMA.TTF")
lblnamevijeh.Typeface=Typeface.LoadFromAssets("SHOMA.TTF")
lblsellvijeh.Gravity=Gravity.CENTER_HORIZONTAL
lblnamevijeh.Gravity=Gravity.CENTER_HORIZONTAL
scrolvijeh.Panel.AddView(imgvijeh,PerXToCurrent((i*3.5)+leftvijeh+0.5),3%y,38%x,19%y)
scrolvijeh.Panel.AddView(lblsellvijeh,PerXToCurrent((i*3.5)+leftvijeh),27.5%y,38%x,18%y)
scrolvijeh.Panel.AddView(tagvijeh,PerXToCurrent((i*3.5)+leftvijeh+24),2%y,15%x,7.5%y)
Dim ln As Label
ln.Initialize("")
ln.TextSize=7dip
ln.Text="___________________"
ln.TextColor=Colors.Gray
ln.Gravity=Gravity.CENTER
scrolvijeh.Panel.AddView(ln,PerXToCurrent((i*3.5)+leftvijeh+0.5),24%y,38%x,6%y)
Dim csslblnamevijeh As ColorDrawable
csslblnamevijeh.Initialize(Colors.RGB(28,201,236),10)
'lblnamevijeh.Background=csslblnamevijeh
Dim lnname As StringFunctions
Dim clnname As Int
clnname=lnname.Len(lblnamevijeh.Text)
'If clnname>20 Then
scrolvijeh.Panel.AddView(lblnamevijeh,PerXToCurrent((i*3.5)+leftvijeh+0.5),22%y,38%x,6%y)
'Else
'scrolvijeh.Panel.AddView(lblnamevijeh,PerXToCurrent((i*3.5)+leftvijeh+0.5),23%y,38%x,6%y)
' End If
leftvijeh=leftvijeh+41
Next
panel_vijeh.AddView(scrolvijeh,0%x,5%y,100%x,34%y)
'main_scrol.Panel.AddView(panel_vijeh_shadow,0%x,mheight+PerYToCurrent(42.5),100%x,40%y)
main_scrol.Panel.AddView(panel_vijeh,0%x,mheight+PerYToCurrent(40),100%x,40%y)
'*********************************************************************'
Sub Jobdone (job As HttpJob)
If job.JobName="getdataname" Then
lblnamevijeh.Text=connect1.GetString
End If
End Sub
ولی مشکلی که هست به این شکل هست
لینک ارسال
به اشتراک گذاری در سایت های دیگر
1 پاسخ به این سوال تاکنون داده شده است
ارسالهای توصیه شده
بایگانی شده
این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.