I bob. Nazariy qism zamonaviy dasturlash tillari


Download 1.1 Mb.
bet19/20
Sana08.01.2022
Hajmi1.1 Mb.
#244731
1   ...   12   13   14   15   16   17   18   19   20
Bog'liq
Dasturlash namuna

ILOVA


Dasturning asosiy kodi.

namespace funksiya_grafigi

{

public partial class Form1 : Form



{

public Form1()

{

InitializeComponent();



}

Graphics g;

private void button1_Click(object sender, EventArgs e)

{

g = pictureBox1.CreateGraphics();



g.Clear(Color.White);

Pen p=new Pen(Color.Black,3);

Pen pp = new Pen(Color.Blue, 5);
Point p1=new Point(200,0);

Point p2=new Point(200,400);

Point p3 = new Point(0,200);

Point p4 = new Point(400,200);

g.DrawLine(p, p3, p4);

g.DrawLine(p, p1, p2);


int k, b;

k = Convert.ToInt32(textBox1.Text);

b = Convert.ToInt32(textBox2.Text);

Point p5 = new Point(0, k*400+b*10);

Point p6 = new Point(400, b * 10);

g.DrawLine(pp, p6, p5);

}
private void label1_Click(object sender, EventArgs e)

{

}


private void button2_Click(object sender, EventArgs e)

{

textBox1.Clear();



textBox2.Clear();

private void imkoniyatlariToolStripMenuItem_Click(object sender, EventArgs e)

{

MessageBox.Show("Ushbu dastur y=k*x+b funksiya grafigini chizish imkoniyatiga ega ");



}

private void muallifToolStripMenuItem_Click(object sender, EventArgs e)

{

MessageBox.Show("Dastur mu'allifi Xalilov Abdulaziz Abdumutalib o'g'li");



}

private void dasturdanChiqishToolStripMenuItem_Click(object sender, EventArgs e)

{

Close();


}

private void Form1_Load(object sender, EventArgs e)

{
}

private void k0ToolStripMenuItem_Click(object sender, EventArgs e)

{

Form a = new Form2();



a.Show();

}

private void bToolStripMenuItem_Click(object sender, EventArgs e)



{

Form b = new Form3();

b.Show();

}
private void k0BolsaToolStripMenuItem_Click(object sender, EventArgs e)

{

Form c = new Form4();



c.Show();

}

private void k0BolsaToolStripMenuItem1_Click(object sender, EventArgs e)



{

Form d = new Form5();

d.Show();

}

}



}

2-chi dastur ko’d qismi.



        void
Download 1.1 Mb.

Do'stlaringiz bilan baham:
1   ...   12   13   14   15   16   17   18   19   20




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling