示例#1
0
        public NetAutoClientControl(NetAutoClientDocument document)
        {
            _document = document;

            InitializeComponent();
            proxyClientControl.Client = _document.Client;
            layerEditorControl.Layers = _document.Layers;
            textBoxHost.Text = _document.Destination;
            numTcpPort.Value = _document.Port;
            checkBoxIpv6.Checked = _document.IPv6;
            checkBoxSpecifyTimeout.Checked = _document.SpecifyTimeout;
            numericTimeout.Enabled = _document.SpecifyTimeout;
            if (_document.Udp)
            {
                radioButtonUdp.Checked = true;
            }
            else
            {
                radioButtonTcp.Checked = true;
            }
            numericTimeout.Value = _document.TimeOutMilliSeconds;
            numericMaxConns.Value = _document.ConcurrentConnections;
            if (document.ClientFactory != null)
            {
                dataEndpointSelectionControl.Factory = _document.ClientFactory;
            }
            checkBoxLimitConns.Checked = _document.LimitConnections;
            numericTotalConns.Enabled = _document.LimitConnections;
            numericTotalConns.Value = _document.TotalConnections;
        }
示例#2
0
            public AutoNetworkListener(NetAutoClientDocument document, Logger logger)
            {
                _document = document;

                if (_document._factory == null)
                {
                    throw new NetServiceException(CANAPE.Documents.Properties.Resources.NetAutoClientDocument_NoFactory);
                }

                _connsLeft       = document._totalConnections < 0 ? 0 : document._totalConnections;
                _logger          = logger;
                _timer           = new Timer(10);
                _timer.AutoReset = false;
                _timer.Elapsed  += new ElapsedEventHandler(_timer_Elapsed);
            }
示例#3
0
            public AutoNetworkListener(NetAutoClientDocument document, Logger logger)
            {
                _document = document;

                if (_document._factory == null)
                {
                    throw new NetServiceException(CANAPE.Documents.Properties.Resources.NetAutoClientDocument_NoFactory);
                }

                _connsLeft = document._totalConnections < 0 ? 0 : document._totalConnections;
                _logger = logger;
                _timer = new Timer(10);
                _timer.AutoReset = false;
                _timer.Elapsed += new ElapsedEventHandler(_timer_Elapsed);
            }