示例#1
0
        public void cb3filling()
        {
            buildCmp bcmp = new buildCmp();

            try
            {
                comboBox1.Items.Clear();
                comboBox2.Items.Clear();
                comboBox4.Items.Clear();
                comboBox5.Items.Clear();
                string mother   = comboBox3.Items[comboBox3.SelectedIndex].ToString();
                string ressplit = mother.Substring(mother.IndexOf(" ", 0) + 1);
                check(ressplit, comboBox1, "Processor");
                check(ressplit, comboBox2, "Motherboard");
                check(ressplit, comboBox4, "Power");
                check(ressplit, comboBox5, "RAM");
                //check(ressplit, comboBox6, "HDD");
                comboBox2.Text = comboBox2.Items[0].ToString();
                comboBox1.Text = comboBox1.Items[0].ToString();
                comboBox4.Text = comboBox4.Items[0].ToString();
                comboBox5.Text = comboBox5.Items[0].ToString();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
示例#2
0
        public void cb6filling()
        {
            buildCmp bcmp = new buildCmp();

            try
            {
                string mother   = comboBox6.Items[comboBox6.SelectedIndex].ToString();
                string ressplit = mother.Substring(mother.IndexOf(" ", 0) + 1);
                check(ressplit, comboBox1, "Processor");
                check(ressplit, comboBox2, "Motherboard");
                check(ressplit, comboBox3, "Videocard");
                check(ressplit, comboBox4, "Power");
                check(ressplit, comboBox5, "RAM");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
示例#3
0
        private void buildComputer_Click(object sender, EventArgs e)
        {
            buildCmp f = new buildCmp();

            f.Show();
        }