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();
}