public NetworkDatabaseSettings(NetworkDatabaseProcess 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);

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

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

            this.AddRow();
        }
示例#2
0
        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();
        }
        public ForeignDevicePortSettings(ForeignDevicePortProcess 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);

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

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

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

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

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

            this.BeginVertical();
            this.AddRow(new Label() { Text = Constants.LocalHostLabel }, _localHost,
                new Label() { Text = Constants.LocalPortLabel }, _localPort);
            this.AddRow(new Label() { Text = Constants.BbmdHostLabel }, _bbmdHost,
                new Label() { Text = Constants.BbmdPortLabel }, _bbmdPort);
            this.EndVertical();

            this.AddRow();
        }
示例#4
0
        public SessionSettings(Session session)
        {
            _session = session;

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

            this.AddRow(new Label() { Text = Constants.SessionNameLabel }, _name);

            this.AddRow();
        }
示例#5
0
        public RouterSettings(RouterProcess 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);

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

            GridView gv = new GridView();
            gv.DataStore = process.PortMappings;

            gv.Columns.Add(new GridColumn()
            {
                HeaderText = "Port Id",
                DataCell = new TextBoxCell("PortId"),
                Editable = true
            });
            gv.Columns.Add(new GridColumn()
            {
                HeaderText = "Network Number",
                DataCell = new TextBoxCell("Network"),
                Editable = true
            });

            this.BeginVertical();
            this.AddRow(gv);
            this.EndVertical();

            this.AddRow();
        }
示例#6
0
        public PortManagerSettings(PortManagerProcess 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);

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

            this.AddRow();
        }
示例#7
0
		Control ServerName ()
		{
			var control = new TextBox ();
			control.Bind ("Text", "Name", DualBindingMode.OneWay);
			return control;
		}