private void DataToControls()
{
if (_port != null)
{
edtName.Text = _port.name;
string direction = Enum.GetName(typeof (PortDirection), _port.direction);
string type = Enum.GetName(typeof (PortType), _port.type);
cmbPortDirection.SelectedItem = _port.directionSpecified ? direction : null;
cmbPortType.SelectedItem = _port.typeSpecified ? type : null;
}
}