Uploaded by oybekanvarbekov404

c# dan qayta o'zlashtirish uchun testlar

advertisement
Testlar
1. Nuqtalar o’rnini to’ldiring.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
trackBar1. … +=trackBar1_Scroll;
}
private void trackBar1_Scroll(object sender, EventArgs e)
{
label1. … = String.Format("Joriy qiymat: {0}", trackBar1.Value);
}
}
A) Label
B) Text
C) Scroll / Text
D) Text / Scroll
Javob: Scroll / Text
2. Kodga izoh bering.
TrackBar tbar = newTrackBar();
tbar.Height = 40;
tbar.Width = 300;
Controls.Add(tbar);
A) O’lchami o’zgartirilmoqda
B) Yangi trackbar yartilmoqda
C) Yangi trackbar yartilmoqda va bo’yi va eni sozlanmoqda
D) Trackbarga qiymat berilmoqda
Javob: Yangi trackbar yartilmoqda
3. Kodga izoh bering.
void TrackBar1_TickFormatting(object sender, TickFormattingEventArgs e)
{
e.TickElement.Line1.BackColor = Color.Red;
}
A) Trackbar qiymatini o’zgartirish
B) Trackbarni chiziqlarni rangini o’zgartirish.
C) Trackbarni joylashuvini kiritish.
D) Trackbarni rangini o’zgartirish
E) Javob: Trackbarni chiziqlarni rangini o’zgartirish.
4. Trackbarning TickFrequency xususiyati nima vazifa bajaradi ?
A) Minimal va maksimal qiymatlar orasidagi TrackBar-dagi belgilar sonini
ifodalaydi.
B) Chiziqlarni kattta yoki kichikligini ifodalaydi.
C) Trackbarni joylashuvini.
D) Trackbar qiymatini.
Javob: Minimal va maksimal qiymatlar orasidagi TrackBar-dagi belgilar
sonini ifodalaydi.
5. Trackbarning Orientation xususiyati nima vazifa bajaradi ?
A) Trackbar yo'nalishni o'rnatadi - gorizontal yoki vertical.
B) Joylashuvni o’rnatadi.
C) x / y o’qi bo’yicha joylashuvini taminlaydi.
D) O’lchamini o’rnatadi.
Javob: yo'nalishni o'rnatadi - gorizontal yoki vertical.
6. Trackbarning TickStyle xususiyati nima vazifa bajaradi ?
A) Trackbar belgilarining o'rnini o'rnatadi.
B) Trackbarni joylashuvini sozlash.
C) Trackbarni kata yoki kichikligini sozlash
D) Trackbarni rangini o’zgartirish
Javob: Trackbar belgilarining o'rnini o'rnatadi.
7. Trackbarning Value xususiyati nima vazifa bajaradi ?
A) Trackbarning boshlang’ich qiymatini o’rnatadi.
B) Joriy qiymat.
C) Absolut qiymat.
D) Oraliq qiymat.
Javob: Joriy qiymat.
8. Kodni to’ldiring.
private void TrackBar1_AutoSizeChanged(Object sender, EventArgs e) {
MessageBox. … ("Siz TrackBar.AutoSizeChanged hodisasidasiz.");
}
A) Show
B) Dialog
C) ShowDiolog
D) To’g’ri javob yo’q
Javob: Show
9. Kodga izoh bering.
private void TrackBar1_ValueChanged(object sender, System.EventArgs e)
{
TextBox1.Text=(System.Math.Round(TrackBar1.Value/10.0)).ToString();
}
A) TextBox qiymatini o’zgartirish.
B) Textboxga qiymat berish.
C) Trackbarga qiymat kiritsh.
D) Trackbarning qiymatini o’zgartirish hodisasi.
Javob: Trackbarning qiymatini o’zgartirish hodisasi.
10.Kodga izoh bering.
TrackBar1.Minimum = 10;
TrackBar1.Maximum = 100;
A) Trackbarning katta yoki kichik qiymatini kiritish.
B) Trackbarga minimal va maksimal qiymat berish.
C) Trackbarning bo’yi va enini o’zgartirish.
D) To’g’ri javob yo’q.
Javob: Trackbarga minimal va maksimal qiymat berish.
11.Kod nima vazifa bajaradi ?
trackBar1.TickFrequency = 5;
A) Minimal va maksimal qiymatlar orasidagi belgilar sonini kiritish.
B) Chiziqlar sonini kiritish.
C) Boshlang’ich qiymat.
D) Oxirgi qiymatni kiritish.
Javob: Minimal va maksimal qiymatlar orasidagi belgilar sonini kiritish.
12. Kodga izoh bering.
private void trackBar1_Scroll(object sender, System.EventArgs e)
{
textBox1.Text = "" + trackBar1.Value;
}
A) Trackbarni textbox ichiga joylash.
B) Trackbarning qiymatini texboxda chiqarish.
C) Trackbar qiymatini textbox qiymatiga tenglash.
D) Trackbarni scroll hodisasini joriy etish.
Javob: Trackbarning qiymatini texboxda chiqarish.
13. Trackbarning LargeChange xususiyati nima vazifa bajaradi ?
A) Trackbarni tashqarida sichqonchani bir marta bosish bilan amalga
oshiriladigan qiymat o'zgarishini oladi yoki o'rnatadi.
B) Trackbarning yozuv turini o’zgartiradi.
C) Trackbarning o’lchamini sozlaydi.
D) Barcha javoblar to’g’ri.
Javob: Trackbarni tashqarida sichqonchani bir marta bosish bilan amalga
oshiriladigan qiymat o'zgarishini oladi yoki o'rnatadi.
14.Nuqtalar o’rnini to’ldiring.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void trackBar1_Scroll(object sender, EventArgs e)
{
label1. … = String.Format("Joriy qiymat: {0}", trackBar1.Value);
}
}
A) Value
B) String
C) Char
D) Text
Javob: Text
15. Kodni to’ldiring.
private void InitializeTrackBar()
{
this.TrackBar1 = new System.Windows.Forms.TrackBar();
TrackBar1. … = new System.Drawing.Point(75, 30);
TrackBar1. … = TickStyle.Both;
TrackBar1.Minimum = 10;
TrackBar1.Maximum = 100;
TrackBar1.TickFrequency = 10;
TrackBar1.ValueChanged +=
new System.EventHandler(TrackBar1_ValueChanged);
this.Controls. … (this.TrackBar1);
}
private void TrackBar1_ValueChanged(object sender, System.EventArgs e)
{
TextBox1. … = (System.Math.Round(TrackBar1.Value/10.0)).ToString();
}
A) Location / TickStyle / Add / Text
B) Location / Add / Text / TickStyle
C) Location / TickSytle / Add
D) A va B javoblar to’g’ri.
Download