void TestStationControl_Validating(object sender, CancelEventArgs e)
{
TestStationDescription testStationDescription = TestStationDescription;
if (testStationDescription != null)
{
testStationDescriptionInstrumentListControl1.HasErrors = false;
errorProvider.SetError(testStationDescriptionInstrumentListControl1, "");
if (testStationDescription.Instruments == null || testStationDescription.Instruments.Count == 0)
{
errorProvider.SetError(testStationDescriptionInstrumentListControl1,
Resources.errMsg_You_must_add_at_least_one_instrument );
tabInstruments.ToolTipText = Resources.errMsg_You_must_add_at_least_one_instrument;
testStationDescriptionInstrumentListControl1.HasErrors = true;
e.Cancel = true;
OnError(sender, errorProvider.GetError(testStationDescriptionInstrumentListControl1));
}
}
}