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

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

private SetControlStates ( ) : void
Результат void
        private void SetControlStates()
        {
            dateTimeValue.Enabled = dateTimeValue.Visible = false;
            edtValue.Enabled = edtValue.Visible = false;
            edtImaginary.Enabled = edtImaginary.Visible = false;
            edtReal.Enabled = edtReal.Visible = false;
            rbFalse.Enabled = rbFalse.Visible = false;
            rbTrue.Enabled = rbTrue.Visible = false;

            if (_datumType is binary)
            {
                edtValue.Enabled = true;
                edtValue.Visible = true;
                edtValue.TextAlign = HorizontalAlignment.Left;
                SetLabelText("Binary");
            }
            else if (_datumType is boolean)
            {
                rbFalse.Enabled = true;
                rbFalse.Visible = true;
                rbTrue.Visible = true;
                SetLabelText("Boolean");
            }
            else if (_datumType is complex)
            {
                edtImaginary.Enabled = true;
                edtImaginary.Visible = true;
                edtReal.Visible = true;
                SetLabelText("Real/Imaginary");
            }
            else if (_datumType is dateTime)
            {
                dateTimeValue.Enabled = true;
                dateTimeValue.Visible = true;
                SetLabelText("Date Time");
            }
            else if (_datumType is @double)
            {
                edtValue.Enabled = true;
                edtValue.Visible = true;
                edtValue.TextAlign = HorizontalAlignment.Right;
                SetLabelText("Double");
            }
            else if (_datumType is hexadecimal)
            {
                edtValue.Enabled = true;
                edtValue.Visible = true;
                edtValue.TextAlign = HorizontalAlignment.Left;
                SetLabelText("Hexadecimal");
            }
            else if (_datumType is integer)
            {
                edtValue.Enabled = true;
                edtValue.Visible = true;
                edtValue.TextAlign = HorizontalAlignment.Right;
                SetLabelText("Integer");
            }
            else if (_datumType is @long)
            {
                edtValue.Enabled = true;
                edtValue.Visible = true;
                edtValue.TextAlign = HorizontalAlignment.Right;
                SetLabelText("Long");
            }
            else if (_datumType is octal)
            {
                edtValue.Enabled = true;
                edtValue.Visible = true;
                edtValue.TextAlign = HorizontalAlignment.Left;
                SetLabelText("Octal");
            }
            else if (_datumType is @string)
            {
                edtValue.Enabled = true;
                edtValue.Visible = true;
                edtValue.TextAlign = HorizontalAlignment.Left;
                SetLabelText("String");
            }
            else if (_datumType is unsignedInteger)
            {
                edtValue.Enabled = true;
                edtValue.Visible = true;
                edtValue.TextAlign = HorizontalAlignment.Right;
                SetLabelText("Unsigned Integer");
            }
            else if (_datumType is unsignedLong)
            {
                edtValue.Enabled = true;
                edtValue.Visible = true;
                edtValue.TextAlign = HorizontalAlignment.Right;
                SetLabelText("Unsigned Long");
            }
        }