ATMLModelLibrary.model.common.Datum.SetDatumType C# (CSharp) Method

SetDatumType() public static method

public static SetDatumType ( ComboBox combo, DatumType datum ) : void
combo System.Windows.Forms.ComboBox
datum DatumType
return void
        public static void SetDatumType(ComboBox combo, DatumType datum)
        {
            if (datum is binary)
                combo.SelectedIndex = (int) DatumTypes.BINARY;
            if (datum is boolean)
                combo.SelectedIndex = (int) DatumTypes.BOOL;
            if (datum is dateTime)
                combo.SelectedIndex = (int) DatumTypes.DATETIME;
            if (datum is @double)
                combo.SelectedIndex = (int) DatumTypes.DOUBLE;
            if (datum is hexadecimal)
                combo.SelectedIndex = (int) DatumTypes.HEX;
            if (datum is integer)
                combo.SelectedIndex = (int) DatumTypes.INT;
            if (datum is @long)
                combo.SelectedIndex = (int) DatumTypes.LONG;
            if (datum is octal)
                combo.SelectedIndex = (int) DatumTypes.OCT;
            if (datum is @string)
                combo.SelectedIndex = (int) DatumTypes.STRING;
            if (datum is unsignedInteger)
                combo.SelectedIndex = (int) DatumTypes.UINT;
            if (datum is unsignedLong)
                combo.SelectedIndex = (int) DatumTypes.ULONG;
        }