ATMLCommonLibrary.controls.datum.DatumTextBox.ControlsToData C# (CSharp) Метод

ControlsToData() приватный Метод

private ControlsToData ( ) : void
Результат void
        private void ControlsToData()
        {
            if (_datumType != null)
            {
                if (_datumType is binary)
                    ((binary) _datumType).value = edtValue.GetValue<string>();
                else if (_datumType is boolean)
                    ((boolean) _datumType).value = rbTrue.Checked;
                else if (_datumType is complex)
                {
                    ((complex) _datumType).real = edtReal.GetValue<double>();
                    ((complex) _datumType).imaginary = edtImaginary.GetValue<double>();
                }
                else if (_datumType is dateTime)
                    ((dateTime) _datumType).value = dateTimeValue.Value;
                else if (_datumType is @double)
                    ((@double) _datumType).value = edtValue.GetValue<double>();
                else if (_datumType is hexadecimal)
                    ((hexadecimal) _datumType).value = edtValue.GetValue<string>();
                else if (_datumType is integer)
                    ((integer) _datumType).value = edtValue.GetValue<int>();
                else if (_datumType is @long)
                    ((@long) _datumType).value = edtValue.GetValue<long>();
                else if (_datumType is octal)
                    ((octal) _datumType).value = edtValue.GetValue<string>();
                else if (_datumType is @string)
                    ((@string) _datumType).Value = edtValue.GetValue<string>();
                else if (_datumType is unsignedInteger)
                    ((unsignedInteger) _datumType).value = edtValue.GetValue<uint>();
                else if (_datumType is unsignedLong)
                    ((unsignedLong) _datumType).value = edtValue.GetValue<ulong>();
            }
        }