Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 Projekt_RW
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void label3_Click(object sender, EventArgs e)
- {
- }
- private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) // typ
- {
- if ((string)comboBox1.SelectedItem == "ubrania dolne")
- {
- comboBox2.Enabled = true; comboBox2.SelectedItem = null; // rozmiar
- comboBox3.Enabled = true; comboBox3.DataSource = new List<string>() { "spódnica","spodnie", "buty" }; comboBox3.SelectedItem = null; // rodzaj
- comboBox4.Enabled = true; // kolor
- comboBox5.Enabled = true; // materiał
- comboBox6.Enabled = false; // długość rękawa
- comboBox7.Enabled = false; // sposób zakładania
- comboBox8.Enabled = false; // rodzaj dekoltu
- comboBox9.Enabled = false; // ilość guzików
- comboBox10.Enabled = true; // stan
- comboBox11.Enabled = false; // długość nogawki
- comboBox12.Enabled = false; // sezon
- comboBox13.Enabled = false; // wysokość
- }
- if ((string)comboBox1.SelectedItem == "ubrania górne")
- {
- comboBox2.Enabled = true; // rozmiar
- comboBox3.Enabled = true; comboBox3.DataSource = new List<string>() { "marynarka", "bluzka", "sweter" }; comboBox3.SelectedItem = null; // rodzaj
- comboBox4.Enabled = true; // kolor
- comboBox5.Enabled = true; // materiał
- comboBox6.Enabled = true; // długość rękawa
- //comboBox7.Enabled = true; // sposób zakładania
- //comboBox8.Enabled = true; // rodzaj dekoltu
- //comboBox9.Enabled = true; // ilość guzików
- comboBox10.Enabled = true; // stan
- comboBox11.Enabled = false; // długość nogawki
- comboBox12.Enabled = false; // sezon
- comboBox13.Enabled = false; // wysokość
- }
- }
- private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
- {
- if ((string)comboBox3.SelectedItem == "buty")
- {
- comboBox2.DataSource = new List<int>() { 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 };
- comboBox2.SelectedItem = null;
- comboBox12.Enabled = true;
- comboBox13.Enabled = true;
- }
- else
- {
- comboBox2.DataSource = new List<int>() { 32, 34, 36, 38, 40, 42, 44, 46 };
- comboBox2.SelectedItem = null;
- comboBox12.Enabled = false;
- comboBox13.Enabled = false;
- }
- if ((string)comboBox3.SelectedItem == "spodnie")
- comboBox11.Enabled = true;
- else
- comboBox11.Enabled = false;
- if ((string)comboBox3.SelectedItem == "marynarka")
- comboBox9.Enabled = true;
- else
- comboBox9.Enabled = false;
- if ((string)comboBox3.SelectedItem == "sweter")
- {
- comboBox7.Enabled = true;
- comboBox8.Enabled = true;
- }
- else
- {
- comboBox7.Enabled = false;
- comboBox8.Enabled = false;
- }
- if ((string)comboBox3.SelectedItem == "bluzka")
- comboBox8.Enabled = true;
- else
- comboBox8.Enabled = false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement