BACnet.Explorer.Core.Controls.EthernetPortSettings.EthernetPortSettings C# (CSharp) Метод

EthernetPortSettings() публичный Метод

public EthernetPortSettings ( EthernetPortProcess process ) : System
process BACnet.Explorer.Core.Models.EthernetPortProcess
Результат System
        public EthernetPortSettings(EthernetPortProcess process)
        {
            _process = process;

            _name = new TextBox();
            _name.Bind(
                tb => tb.Text,
                _process,
                proc => proc.Name,
                DualBindingMode.TwoWay);

            _processId = new NumericUpDown();
            _processId.Bind(
                nud => nud.Value,
                _process,
                proc => proc.ProcessId,
                DualBindingMode.TwoWay);

            _deviceName = new ComboBox();
            _deviceName.DataStore = LibPcapLiveDeviceList.Instance.Where(dev => dev.Interface != null);
            _deviceName.KeyBinding = new PropertyBinding<string>("Name");
            _deviceName.TextBinding = new PropertyBinding<string>("Description");
            _deviceName.SelectedValueChanged += _deviceNameChanged;

            this.BeginVertical();
            this.AddRow(new Label() { Text = Constants.ProcessNameLabel }, _name);
            this.AddRow(new Label() { Text = Constants.ProcessIdLabel }, _processId);
            this.AddRow(new Label() { Text = Constants.DeviceNameLabel }, _deviceName);
            this.EndVertical();

            this.AddRow();
        }