ATMLCommonLibrary.controls.connector.ConnectorForm.ControlsToData C# (CSharp) Метод

ControlsToData() защищенный Метод

protected ControlsToData ( ) : void
Результат void
        protected void ControlsToData()
        {
            if (_connector != null)
            {
                String type = "";
                String matingType = "";
                if (cmbTypeSex.SelectedItem == null)
                {
                    cmbTypeSex.SelectedIndex = 0;
                    cmbMatingTypeSex.SelectedIndex = 1;
                }
                _connector.Identification = identificationControl.Identification;
                if (-1 != cbConnectorType.SelectedIndex)
                    type = cbConnectorType.SelectedItem + " " + cmbTypeSex.SelectedItem;
                else if (!string.IsNullOrWhiteSpace( cbConnectorType.Text ))
                    type = cbConnectorType.Text + " " + cmbTypeSex.SelectedItem;
                if (-1 != cbConnectorMatingType.SelectedIndex)
                    matingType = cbConnectorMatingType.SelectedItem + " " + cmbMatingTypeSex.SelectedItem;
                else if (!string.IsNullOrWhiteSpace( cbConnectorMatingType.Text ))
                    type = cbConnectorMatingType.Text + " " + cmbMatingTypeSex.SelectedItem;

                PromptForNewConnector( type, cbConnectorType, cbConnectorMatingType );
                PromptForNewConnector( matingType, cbConnectorMatingType, cbConnectorType );

                _connector.matingConnectorType = matingType;
                _connector.type = type;
                _connector.version = edtVersion.GetValue<string>();
                _connector.name = edtName.GetValue<string>();
                _connector.ID = edtConnectorID.GetValue<string>();
                _connector.location = (ConnectorLocationEnum) cmbConnectorLocation.SelectedItem;
                _connector.Description = edtDescription.GetValue<string>();
                _connector.Pins = connectorPinList.ConnectorPins;
                //TODO: Address when/if we handle extensions
                _connector.Extension = null;
            }
        }