دوستان چنین کدی رو چجوری میتونیم خلاصه تر بنویسیم؟ ( هرکاری میکنم نمیشه )
Dim lo1 As JavaObject = Label14.Background
Dim lo2 As JavaObject = Label15.Background
Dim lo3 As JavaObject = Label16.Background
Dim lo4 As JavaObject = Label17.Background
Dim lo5 As JavaObject = Label20.Background
Dim lo6 As JavaObject = label10.Background
Dim lo7 As JavaObject = Label9.Background
Dim lo8 As JavaObject = Label23.Background
Dim lo9 As JavaObject = Label24.Background
Dim lo10 As JavaObject = Label27.Background
Dim lo11 As JavaObject = Label28.Background
Dim lo12 As JavaObject = Label31.Background
Dim lo As JavaObject = Label13.Background
lo.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10)))
lo1.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10)))
lo2.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10)))
lo3.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10)))
lo4.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10)))
lo5.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10)))
lo6.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10)))
lo7.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10)))
lo8.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10)))
lo9.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10)))
lo10.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10)))
lo11.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10)))
lo12.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10)))
سوال
ilan 1
دوستان چنین کدی رو چجوری میتونیم خلاصه تر بنویسیم؟ ( هرکاری میکنم نمیشه )
Dim lo1 As JavaObject = Label14.Background Dim lo2 As JavaObject = Label15.Background Dim lo3 As JavaObject = Label16.Background Dim lo4 As JavaObject = Label17.Background Dim lo5 As JavaObject = Label20.Background Dim lo6 As JavaObject = label10.Background Dim lo7 As JavaObject = Label9.Background Dim lo8 As JavaObject = Label23.Background Dim lo9 As JavaObject = Label24.Background Dim lo10 As JavaObject = Label27.Background Dim lo11 As JavaObject = Label28.Background Dim lo12 As JavaObject = Label31.Background Dim lo As JavaObject = Label13.Background lo.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10))) lo1.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10))) lo2.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10))) lo3.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10))) lo4.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10))) lo5.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10))) lo6.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10))) lo7.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10))) lo8.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10))) lo9.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10))) lo10.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10))) lo11.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10))) lo12.RunMethod("setCornerRadii", Array As Object(Array As Float(10dip, 10dip, 0dip, 0dip, 0, 0, 10, 10)))
لینک ارسال
به اشتراک گذاری در سایت های دیگر
3 پاسخ به این سوال تاکنون داده شده است
ارسالهای توصیه شده
بایگانی شده
این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.