public Compartment(int height, string mainColor, bool door, string doorColor, Cupboard cupboard) { this.height = height; this.mainColor = mainColor; this.door = door; this.doorColor = doorColor; this.cupboard = cupboard; }
private void Next_Click(object sender, EventArgs e) { if (comboBoxDim.Text != "") { string[] dim = comboBoxDim.Text.Split('x'); Cupboard Cupboard = new Cupboard(Int32.Parse(dim[0]), Int32.Parse(dim[1])); parent.Cup = Cupboard; parent.Next(); } else { MessageBox.Show("Enter a valid dimention pls"); } }