Örneğin Kodları :
Form1:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Menü_strip
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
{
}
private void uzunToolStripMenuItem_Click(object sender, EventArgs e)
{
pictureBox1.Image = Image.FromFile("c:\\uzun1.jpg");
pictureBox2.Image = Image.FromFile("c:\\uzun2.jpg");
pictureBox3.Image = Image.FromFile("c:\\uzun3.jpg");
label1.Text = "29,90 TL";
label2.Text = "59,90 TL";
label3.Text = "44,90 TL";
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
checkBox1.Visible = true;
checkBox2.Visible = true;
checkBox3.Visible = true;
}
private void kısaToolStripMenuItem_Click(object sender, EventArgs e)
{
pictureBox1.Image = Image.FromFile("c:\\kısa1.jpg");
pictureBox2.Image = Image.FromFile("c:\\kısa2.jpg");
pictureBox3.Image = Image.FromFile("c:\\kısa3.jpg");
label1.Text = "39,90 TL";
label2.Text = "49,90 TL";
label3.Text = "74,90 TL";
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
checkBox1.Visible = true;
checkBox2.Visible = true;
checkBox3.Visible = true;
}
private void yazlıkToolStripMenuItem1_Click(object sender, EventArgs e)
{
pictureBox1.Image = Image.FromFile("c:\\yazlık1.jpg");
pictureBox2.Image = Image.FromFile("c:\\yazlık2.png");
pictureBox3.Image = Image.FromFile("c:\\yazlık3.jpg");
label1.Text = "19,90 TL";
label2.Text = "39,90 TL";
label3.Text = "24,90 TL";
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
checkBox1.Visible = true;
checkBox2.Visible = true;
checkBox3.Visible = true;
}
private void kışlıkToolStripMenuItem1_Click(object sender, EventArgs e)
{
pictureBox1.Image = Image.FromFile("c:\\kışlık1.jpg");
pictureBox2.Image = Image.FromFile("c:\\kışlık2.jpg");
pictureBox3.Image = Image.FromFile("c:\\kışlık3.jpg");
label1.Text = "19,90 TL";
label2.Text = "40,00 TL";
label3.Text = "20,00 TL";
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
checkBox1.Visible = true;
checkBox2.Visible = true;
checkBox3.Visible = true;
}
private void ayakkabıToolStripMenuItem_Click(object sender, EventArgs e)
{
pictureBox1.Image = Image.FromFile("c:\\ayakkabı1.jpg");
pictureBox2.Image = Image.FromFile("c:\\ayakkabı2.jpg");
pictureBox3.Image = Image.FromFile("c:\\ayakkabı3.jpg");
label1.Text = "79,90 TL";
label2.Text = "80,00 TL";
label3.Text = "68,00 TL";
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
checkBox1.Visible = true;
checkBox2.Visible = true;
checkBox3.Visible = true;
}
private void pantolonToolStripMenuItem_Click(object sender, EventArgs e)
{
pictureBox1.Image = Image.FromFile("c:\\pantolon1.jpg");
pictureBox2.Image = Image.FromFile("c:\\pantolon2.jpg");
pictureBox3.Image = Image.FromFile("c:\\pantolon3.jpg");
label1.Text = "84,90 TL";
label2.Text = "65,00 TL";
label3.Text = "100,00 TL";
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
checkBox1.Visible = true;
checkBox2.Visible = true;
checkBox3.Visible = true;
}
private void bluzToolStripMenuItem_Click(object sender, EventArgs e)
{
pictureBox1.Image = Image.FromFile("c:\\bluz1.jpg");
pictureBox2.Image = Image.FromFile("c:\\bluz2.jpg");
pictureBox3.Image = Image.FromFile("c:\\bluz3.jpg");
label1.Text = "54,90 TL";
label2.Text = "65,00 TL";
label3.Text = "10,00 TL";
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
checkBox1.Visible = true;
checkBox2.Visible = true;
checkBox3.Visible = true;
}
private void montToolStripMenuItem2_Click(object sender, EventArgs e)
{
pictureBox1.Image = Image.FromFile("c:\\mnt1.jpg");
pictureBox2.Image = Image.FromFile("c:\\mnt2.jpg");
pictureBox3.Image = Image.FromFile("c:\\mnt3.jpg");
label1.Text = "64,90 TL";
label2.Text = "60,00 TL";
label3.Text = "15,00 TL";
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
checkBox1.Visible = true;
checkBox2.Visible = true;
checkBox3.Visible = true;
}
private void kotToolStripMenuItem_Click(object sender, EventArgs e)
{
pictureBox1.Image = Image.FromFile("c:\\kot1.jpg");
pictureBox2.Image = Image.FromFile("c:\\kot2.png");
pictureBox3.Image = Image.FromFile("c:\\kot3.jpg");
label1.Text = "64,90 TL";
label2.Text = "60,00 TL";
label3.Text = "15,00 TL";
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
checkBox1.Visible = true;
checkBox2.Visible = true;
checkBox3.Visible = true;
}
private void ketenToolStripMenuItem_Click(object sender, EventArgs e)
{
pictureBox1.Image = Image.FromFile("c:\\keten1.jpg");
pictureBox2.Image = Image.FromFile("c:\\keten2.jpg");
pictureBox3.Image = Image.FromFile("c:\\keten3.jpg");
label1.Text = "64,90 TL";
label2.Text = "60,00 TL";
label3.Text = "15,00 TL";
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
checkBox1.Visible = true;
checkBox2.Visible = true;
checkBox3.Visible = true;
}
private void gömlekToolStripMenuItem_Click(object sender, EventArgs e)
{
pictureBox1.Image = Image.FromFile("c:\\gömlek1.jpg");
pictureBox2.Image = Image.FromFile("c:\\gömlek2.jpg");
pictureBox3.Image = Image.FromFile("c:\\gömlek3.jpg");
label1.Text = "31,90 TL";
label2.Text = "50,00 TL";
label3.Text = "95,00 TL";
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
checkBox1.Visible = true;
checkBox2.Visible = true;
checkBox3.Visible = true;
}
private void kunduraToolStripMenuItem_Click(object sender, EventArgs e)
{
pictureBox1.Image = Image.FromFile("c:\\kundura1.jpg");
pictureBox2.Image = Image.FromFile("c:\\kundura2.jpg");
pictureBox3.Image = Image.FromFile("c:\\kundura3.jpg");
label1.Text = "111,90 TL";
label2.Text = "90,00 TL";
label3.Text = "100 TL";
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
checkBox1.Visible = true;
checkBox2.Visible = true;
checkBox3.Visible = true;
}
private void sporToolStripMenuItem_Click(object sender, EventArgs e)
{
pictureBox1.Image = Image.FromFile("c:\\spor1.jpg");
pictureBox2.Image = Image.FromFile("c:\\spor2.jpg");
pictureBox3.Image = Image.FromFile("c:\\spor3.jpg");
label1.Text = "71,90 TL";
label2.Text = "50,00 TL";
label3.Text = "85,00 TL";
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
checkBox1.Visible = true;
checkBox2.Visible = true;
checkBox3.Visible = true;
}
private void montToolStripMenuItem1_Click(object sender, EventArgs e)
{
pictureBox1.Image = Image.FromFile("c:\\mont1.jpg");
pictureBox2.Image = Image.FromFile("c:\\mont2.jpg");
pictureBox3.Image = Image.FromFile("c:\\mont3.jpg");
label1.Text = "61,90 TL";
label2.Text = "60,00 TL";
label3.Text = "45,00 TL";
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
checkBox1.Visible = true;
checkBox2.Visible = true;
checkBox3.Visible = true;
}
private void pantolonToolStripMenuItem2_Click(object sender, EventArgs e)
{
pictureBox1.Image = Image.FromFile("c:\\1.jpg");
pictureBox2.Image = Image.FromFile("c:\\2.jpg");
pictureBox3.Image = Image.FromFile("c:\\3.jpg");
label1.Text = "11,90 TL";
label2.Text = "25,00 TL";
label3.Text = "5,00 TL";
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
checkBox1.Visible = true;
checkBox2.Visible = true;
checkBox3.Visible = true;
}
private void tişortToolStripMenuItem_Click(object sender, EventArgs e)
{
pictureBox1.Image = Image.FromFile("c:\\cocuk1.jpg");
pictureBox2.Image = Image.FromFile("c:\\cocuk2.jpg");
pictureBox3.Image = Image.FromFile("c:\\cocuk3.png");
label1.Text = "9,90 TL";
label2.Text = "15,00 TL";
label3.Text = "5,00 TL";
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
checkBox1.Visible = true;
checkBox2.Visible = true;
checkBox3.Visible = true;
}
private void kazakToolStripMenuItem2_Click(object sender, EventArgs e)
{
pictureBox1.Image = Image.FromFile("c:\\a.jpg");
pictureBox2.Image = Image.FromFile("c:\\b.jpg");
pictureBox3.Image = Image.FromFile("c:\\c.jpg");
label1.Text = "45,90 TL";
label2.Text = "16,00 TL";
label3.Text = "5,00 TL";
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
checkBox1.Visible = true;
checkBox2.Visible = true;
checkBox3.Visible = true;
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (checkBox1.Checked == true )
{
listBox1.Items.Add(label1.Text);
checkBox1.Checked = false;
groupBox1.Visible = true;
}
}
private void kadınToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void checkBox2_CheckedChanged(object sender, EventArgs e)
{
if (checkBox2.Checked == true)
{
listBox1.Items.Add(label2.Text);
checkBox2.Checked = false;
groupBox1.Visible = true;
}
}
private void checkBox3_CheckedChanged(object sender, EventArgs e)
{
if (checkBox3.Checked == true)
{
listBox1.Items.Add(label3.Text);
checkBox3.Checked = false;
groupBox1.Visible = true;
}
}
private void erkekToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
}
private void checkBox4_CheckedChanged(object sender, EventArgs e)
{
if (checkBox4.Checked == true)
{
button1.Enabled = true;
}
}
private void button1_Click(object sender, EventArgs e)
{
Form2 frm = new Form2();
this.Hide();
frm.Show();
}
private void Form1_Load(object sender, EventArgs e)
{
}
//Erdoğan GENÇTÜRK.
}
}
Form2:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Menü_strip
{
public partial class Form2 : Form
{
int max = 250;
public Form2()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("Sayın "+textBox1.Text+" " +textBox2.Text+" " + "Alışverişinizi bizden yaptığınız için teşekkürler :D Siparişiniz en kısa zamanda yazılan adrese gönderilecektir"+"Bize mesaj bırakmak için mesaj butonuna tıklayınız");
groupBox1.Enabled = false;
}
private void button3_Click(object sender, EventArgs e)
{
MessageBox.Show("mesajınız alınmıştır teşekkür ederiz");
groupBox1.Enabled = false;
}
private void button2_Click(object sender, EventArgs e)
{
groupBox2.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
}
private void textBox7_TextChanged(object sender, EventArgs e)
{
if (textBox7.TextLength < 251)
{
progressBar1.Value = Convert.ToInt32(textBox7.TextLength);
label8.Visible = true;
label8.Text = "kalan " + (max - textBox7.TextLength).ToString();
}
if (textBox7.TextLength == 251)
{
textBox7.Enabled = false;
}
}
private void button4_Click(object sender, EventArgs e)
{
textBox7.Text = "";
}
private void textBox3_TextChanged(object sender, EventArgs e)
{
if (textBox3.TextLength == 11)
{
textBox3.Enabled = false;
}
}
private void Form2_Load(object sender, EventArgs e)
{
// Erdoğan GENÇTÜRK.
}
}
}
Hiç yorum yok:
Yorum Gönder