private void cbMeasureType_SelectedIndexChanged(object sender, EventArgs e) { measureType = cbMeasureType.SelectedItem as MeasureType; if (measureType != null) { nudMeasureValue.Minimum = measureType.Min; nudMeasureValue.Maximum = measureType.Max; } setAddMeasureEnabled(); }
private void Form1_Load(object sender, EventArgs e) { MeasureType type = new MeasureType(); type.Name = "Еритроцити"; type.Min = 4; type.Max = 7; cbMeasureType.Items.Add(type); type = new MeasureType(); type.Name = "Леукоцити"; type.Min = 2000; type.Max = 16000; cbMeasureType.Items.Add(type); }