public void cutVag(Veg v) { if (v.needCut) { v.needCut = false; } }
private void button11_Click(object sender, EventArgs e) { veg = new Veg[Convert.ToInt32(numericUpDown2.Value)]; for (int i = 0; i < veg.Length; i++) { veg[i] = new Veg(); } for (int i = 0; i < veg.Length; i++) { veg[i].isDirty = true; } meat = new Meat[Convert.ToInt32(numericUpDown1.Value)]; for (int i = 0; i < meat.Length; i++) { meat[i] = new Meat(); } for (int i = 0; i < meat.Length; i++) { meat[i].needCut = true; } numericUpDown2.Enabled = false; numericUpDown1.Enabled = false; ready = true; }
public void washVeg(Veg v) { if (v.isDirty) { v.isDirty = false; } }