private void DataToControls()
{
if (_datum != null)
{
Initializing = true;
chkResolution.Checked = _datum.ResolutionSpecified;
if (chkResolution.Checked)
edtResolution.Value = Convert.ToDecimal(_datum.Resolution);
chkConfidence.Checked = _datum.ConfidenceSpecified;
if (chkConfidence.Checked)
edtConfidence.Value = Convert.ToDecimal(_datum.Confidence);
edtNonStandardUnit.Value = _datum.nonStandardUnit;
standardUnitControl.StandardUnit = _datum.standardUnit;
qualifierComboBox.SelectedItem = _datum.unitQualifier;
ATMLModelLibrary.model.common.Datum.SetDatumType(cmbDatumType, _datum);
edtDatum.DatumType = _datum;
errorLimitControl.Limit = _datum.ErrorLimits;
errorLimitControl.DefaultLimitType = edtDatum.DatumTypeIndex;
errorLimitControl.DefaultStandardUnit = _datum.standardUnit;
errorLimitControl.DefaultComparitor = _defaultComparitor;
errorLimitControl.DefaultValue = edtDatum.Value;
rangeLimitControl.Limit = _datum.Range;
rangeLimitControl.DefaultLimitType = edtDatum.DatumTypeIndex;
rangeLimitControl.DefaultComparitor = _defaultComparitor;
rangeLimitControl.DefaultStandardUnit = _datum.standardUnit;
rangeLimitControl.DefaultValue = edtDatum.Value;
SetControlStates();
Initializing = false;
//cmbDatumType.Enabled = false; //--- Do not allow to edit the type ---//
cmbDatumType.Enabled =
edtNonStandardUnit.Enabled =
standardUnitControl.Enabled = !LockTypes;
}
}