Uçak Bileti Satış Programı C#
Uçak Bileti Satış Programı C#
FORM1 İçerisine Yazılıcak Kodlar
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Form2 frm = new Form2();
frm.Show();
this.Hide();
}
private void timer1_Tick(object sender, EventArgs e)
{
if (pictureBox1.Right <= panel1.Left )
{
Random r1 = new Random();
int i = 0;
int[] resim = new int[5];
for (i = 0; i <= 4; i++)
{
resim[i] = r1.Next(1, 15);
}
pictureBox1.Left = pictureBox1.Left + resim[0];
}
else
{
timer1.Enabled = false;
}
}
private void Form1_Load(object sender, EventArgs e)
{
timer1.Enabled = true;
}
}
FORM2'nin İçerisine Yazılacak KODLAR
public partial class Form2 : Form
{
int i, x = 18;
public Form2()
{
InitializeComponent();
}
private void Form2_Load(object sender, EventArgs e)
{
this.button1.BackColor = System.Drawing.Color.White;
this.button2.BackColor = System.Drawing.Color.White;
this.button3.BackColor = System.Drawing.Color.White;
this.button4.BackColor = System.Drawing.Color.White;
this.button5.BackColor = System.Drawing.Color.White;
this.button6.BackColor = System.Drawing.Color.White;
this.button7.BackColor = System.Drawing.Color.White;
this.button8.BackColor = System.Drawing.Color.White;
this.button9.BackColor = System.Drawing.Color.White;
this.button10.BackColor = System.Drawing.Color.White;
this.button11.BackColor = System.Drawing.Color.White;
this.button12.BackColor = System.Drawing.Color.White;
this.button13.BackColor = System.Drawing.Color.White;
this.button14.BackColor = System.Drawing.Color.White;
this.button15.BackColor = System.Drawing.Color.White;
this.button16.BackColor = System.Drawing.Color.White;
this.button17.BackColor = System.Drawing.Color.White;
this.button18.BackColor = System.Drawing.Color.White;
timer1.Enabled = true;
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("boş kaldı");
this.button1.BackColor = System.Drawing.Color.White;
}
else
{
button1.Text = textBox1.Text + " " + textBox2.Text;
this.button1.BackColor = System.Drawing.Color.Blue;
button1.Enabled = false;
textBox1.Text = "";
textBox2.Text = "";
i++;
x--;
label3.Text = "Dolu: " + i.ToString();
label4.Text = "Boş: " + x.ToString();
}
}
private void button2_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("boş kaldı");
this.button2.BackColor = System.Drawing.Color.White;
}
else
{
button2.Text = textBox1.Text + " " + textBox2.Text;
this.button2.BackColor = System.Drawing.Color.Blue;
button2.Enabled = false;
textBox1.Text = "";
textBox2.Text = "";
i++;
x--;
label3.Text = "Dolu: " + i.ToString();
label4.Text = "Boş: " + x.ToString();
}
}
private void button3_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("boş kaldı");
this.button3.BackColor = System.Drawing.Color.White;
}
else
{
button3.Text = textBox1.Text + " " + textBox2.Text;
this.button3.BackColor = System.Drawing.Color.Blue;
button3.Enabled = false;
textBox1.Text = "";
textBox2.Text = "";
i++;
x--;
label3.Text = "Dolu: " + i.ToString();
label4.Text = "Boş: " + x.ToString();
}
}
private void button4_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("boş kaldı");
this.button4.BackColor = System.Drawing.Color.White;
}
else
{
button4.Text = textBox1.Text + " " + textBox2.Text;
this.button4.BackColor = System.Drawing.Color.Blue;
button4.Enabled = false;
textBox1.Text = "";
textBox2.Text = "";
i++;
x--;
label3.Text = "Dolu: " + i.ToString();
label4.Text = "Boş: " + x.ToString();
}
}
private void button5_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("boş kaldı");
this.button5.BackColor = System.Drawing.Color.White;
}
else
{
button5.Text = textBox1.Text + " " + textBox2.Text;
this.button5.BackColor = System.Drawing.Color.Blue;
button5.Enabled = false;
textBox1.Text = "";
textBox2.Text = "";
i++;
x--;
label3.Text = "Dolu: " + i.ToString();
label4.Text = "Boş: " + x.ToString();
}
}
private void button6_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("boş kaldı");
this.button6.BackColor = System.Drawing.Color.White;
}
else
{
button6.Text = textBox1.Text + " " + textBox2.Text;
this.button6.BackColor = System.Drawing.Color.Blue;
button6.Enabled = false;
textBox1.Text = "";
textBox2.Text = "";
i++;
x--;
label3.Text = "Dolu: " + i.ToString();
label4.Text = "Boş: " + x.ToString();
}
}
private void button7_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("boş kaldı");
this.button7.BackColor = System.Drawing.Color.White;
}
else
{
button7.Text = textBox1.Text + " " + textBox2.Text;
this.button7.BackColor = System.Drawing.Color.Blue;
button7.Enabled = false;
textBox1.Text = "";
textBox2.Text = "";
i++;
x--;
label3.Text = "Dolu: " + i.ToString();
label4.Text = "Boş: " + x.ToString();
}
}
private void button8_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("boş kaldı");
this.button8.BackColor = System.Drawing.Color.White;
}
else
{
button8.Text = textBox1.Text + " " + textBox2.Text;
this.button8.BackColor = System.Drawing.Color.Blue;
button8.Enabled = false;
textBox1.Text = "";
textBox2.Text = "";
i++;
x--;
label3.Text = "Dolu: " + i.ToString();
label4.Text = "Boş: " + x.ToString();
}
}
private void button9_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("boş kaldı");
this.button9.BackColor = System.Drawing.Color.White;
}
else
{
button9.Text = textBox1.Text + " " + textBox2.Text;
this.button9.BackColor = System.Drawing.Color.Blue;
button9.Enabled = false;
textBox1.Text = "";
textBox2.Text = "";
i++;
x--;
label3.Text = "Dolu: " + i.ToString();
label4.Text = "Boş: " + x.ToString();
}
}
private void button10_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("boş kaldı");
this.button10.BackColor = System.Drawing.Color.White;
}
else
{
button10.Text = textBox1.Text + " " + textBox2.Text;
this.button10.BackColor = System.Drawing.Color.Blue;
button10.Enabled = false;
textBox1.Text = "";
textBox2.Text = "";
i++;
x--;
label3.Text = "Dolu: " + i.ToString();
label4.Text = "Boş: " + x.ToString();
}
}
private void button11_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("boş kaldı");
this.button11.BackColor = System.Drawing.Color.White;
}
else
{
button11.Text = textBox1.Text + " " + textBox2.Text;
this.button11.BackColor = System.Drawing.Color.Blue;
button11.Enabled = false;
textBox1.Text = "";
textBox2.Text = "";
i++;
x--;
label3.Text = "Dolu: " + i.ToString();
label4.Text = "Boş: " + x.ToString();
}
}
private void button12_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("boş kaldı");
this.button12.BackColor = System.Drawing.Color.White;
}
else
{
button12.Text = textBox1.Text + " " + textBox2.Text;
this.button12.BackColor = System.Drawing.Color.Blue;
button12.Enabled = false;
textBox1.Text = "";
textBox2.Text = "";
i++;
x--;
label3.Text = "Dolu: " + i.ToString();
label4.Text = "Boş: " + x.ToString();
}
}
private void button13_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("boş kaldı");
this.button13.BackColor = System.Drawing.Color.White;
}
else
{
button13.Text = textBox1.Text + " " + textBox2.Text;
this.button13.BackColor = System.Drawing.Color.Blue;
button13.Enabled = false;
textBox1.Text = "";
textBox2.Text = "";
i++;
x--;
label3.Text = "Dolu: " + i.ToString();
label4.Text = "Boş: " + x.ToString();
}
}
private void button14_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("boş kaldı");
this.button14.BackColor = System.Drawing.Color.White;
}
else
{
button14.Text = textBox1.Text + " " + textBox2.Text;
this.button14.BackColor = System.Drawing.Color.Blue;
button14.Enabled = false;
textBox1.Text = "";
textBox2.Text = "";
i++;
x--;
label3.Text = "Dolu: " + i.ToString();
label4.Text = "Boş: " + x.ToString();
}
}
private void button15_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("boş kaldı");
this.button15.BackColor = System.Drawing.Color.White;
}
else
{
button15.Text = textBox1.Text + " " + textBox2.Text;
this.button15.BackColor = System.Drawing.Color.Blue;
button15.Enabled = false;
textBox1.Text = "";
textBox2.Text = "";
i++;
x--;
label3.Text = "Dolu: " + i.ToString();
label4.Text = "Boş: " + x.ToString();
}
}
private void button16_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("boş kaldı");
this.button16.BackColor = System.Drawing.Color.White;
}
else
{
button16.Text = textBox1.Text + " " + textBox2.Text;
this.button16.BackColor = System.Drawing.Color.Blue;
button16.Enabled = false;
textBox1.Text = "";
textBox2.Text = "";
i++;
x--;
label3.Text = "Dolu: " + i.ToString();
label4.Text = "Boş: " + x.ToString();
}
}
private void button17_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("boş kaldı");
this.button17.BackColor = System.Drawing.Color.White;
}
else
{
button17.Text = textBox1.Text + " " + textBox2.Text;
this.button17.BackColor = System.Drawing.Color.Blue;
button17.Enabled = false;
textBox1.Text = "";
textBox2.Text = "";
i++;
x--;
label3.Text = "Dolu: " + i.ToString();
label4.Text = "Boş: " + x.ToString();
}
}
private void button18_Click(object sender, EventArgs e)
{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("boş kaldı");
this.button18.BackColor = System.Drawing.Color.White;
}
else
{
button18.Text = textBox1.Text + " " + textBox2.Text;
this.button18.BackColor = System.Drawing.Color.Blue;
button18.Enabled = false;
textBox1.Text = "";
textBox2.Text = "";
i++;
x--;
label3.Text = "Dolu: " + i.ToString();
label4.Text = "Boş: " + x.ToString();
}
}
private void pictureBox3_Click(object sender, EventArgs e)
{
}
private void label3_Click(object sender, EventArgs e)
{
}
private void timer1_Tick(object sender, EventArgs e)
{
if (pictureBox3.Right <= panel1.Left &amp;&amp; pictureBox4.Right <= panel2.Left)
{
Random r1 = new Random(); // random ile değişkenler
int i = 0;
int[] resim = new int[5]; // değişkenimiz 5 kadar
for (i = 0; i <= 4; i++) // for döngüsü sokuyoruz
{
resim[i] = r1.Next(1, 15); // resimlerin hareketi
}
pictureBox3.Left = pictureBox3.Left + resim[0];
pictureBox4.Left = pictureBox4.Left + resim[1];
}
else
{
timer1.Enabled = false;
}
}
}
Projeyi İNDİR
Rica: Sitemizin Google'da Ön Sıralarda Çıkması İçin Lütfen Alttaki Google+ Butonuna Tıklayınız , Sayfamızı Facebookta Beğeniniz veya yazıları Twitter,Facebookta paylaşınız.









Mehaba
Bana bu programini test olarak yollaya bilirmisiniz.
Kendim musterilerime ucak bileti ve otel reservasyonlari kesiyorum.
Tsk
Osman temirhan
Yukarıdan kodlarını alıp kullanabilirsin.Programın kendisini bilgisayarımda bulamadım.Silmişim galiba.