Esempio n. 1
0
        private void Initialization()
        {
            InitCodePage();

            clientSocketParams = SocketOutboundAdapterConfigMgt.SocketOutAdapterConfig.ClientSocketParams;
            channelSet         = SocketOutboundAdapterConfigMgt.SocketOutAdapterConfig.OutboundChanels;
            LUTableSet         = SocketOutboundAdapterConfigMgt.SocketOutAdapterConfig.LookupTables;

            #region ClientSocketParameters
            this.txtCallbackIP.Text       = clientSocketParams.CallbackIP.ToString();
            this.txtCallbackPort.Value    = clientSocketParams.CallbackPort;
            this.txtServerIP.Text         = clientSocketParams.ServerIP.ToString();
            this.txtServerPort.Text       = clientSocketParams.ServerPort.ToString();
            this.txtInterval.Text         = SocketOutboundAdapterConfigMgt.SocketOutAdapterConfig.OutGeneralParams.TimerInterval.ToString();
            this.txtConnectTimeout.Text   = clientSocketParams.ConnectTimeout.ToString();
            this.txtTryCount.Text         = clientSocketParams.ConnectTryCount.ToString();
            this.txtReceiveTimeout.Text   = clientSocketParams.RecTimeout.ToString();
            this.txtSendTimeout.Text      = clientSocketParams.SendTimeout.ToString();
            this.cbCodePage.SelectedIndex = EncodingPage.GetIndex(clientSocketParams.CodePageName);
            #endregion
            #region Channel
            if (channelSet != null)
            {
                if (channelSet.Count != 0)
                {
                    ShowChannelSetInformation();
                }     //It sign that there is no channel in the channelset
            }
            else
            {
                //Never occur as SocketOutAdapterConfigMgt.SocketOutAdapterConfig was be constuctured
                channelSet = new XCollection <SocketOutChannel>();
            }
            #endregion
            #region Look up tables
            if (LUTableSet != null)
            {
                if (LUTableSet.Count != 0)
                {
                    ShowLUTableSetInformation();
                }
            }
            else
            {
                //Never occur as SocketOutAdapterConfigMgt.SocketOutAdapterConfig was be constuctured
                LUTableSet = new XCollection <LookupTable>();
            }
            #endregion
        }
Esempio n. 2
0
        private void Initialization()
        {
            InitCodePage();

            ServerSocketParams = SocketInboundAdapterConfigMgt.SocketInAdapterConfig.ListenServerSocketParams;
            channelSet         = SocketInboundAdapterConfigMgt.SocketInAdapterConfig.InboundChanels;
            LUTableSet         = SocketInboundAdapterConfigMgt.SocketInAdapterConfig.LookupTables;

            #region ServerSocketParameters
            this.txtIP.Text               = ServerSocketParams.ListenIP;
            this.txtPort.Text             = ServerSocketParams.ListenPort.ToString();
            this.txtConnectTimeout.Text   = ServerSocketParams.ConnectTimeout.ToString();
            this.txtTryCount.Text         = ServerSocketParams.ConnectTryCount.ToString();
            this.txtReceiveTimeout.Text   = ServerSocketParams.RecTimeout.ToString();
            this.txtSendTimeout.Text      = ServerSocketParams.SendTimeout.ToString();
            this.cbCodePage.SelectedIndex = EncodingPage.GetIndex(ServerSocketParams.CodePageName);
            #endregion
            #region Channel
            if (channelSet != null)
            {
                if (channelSet.Count != 0)
                {
                    ShowChannelSetInformation();
                }    //It sign that there is no channel in the channelset
            }
            else
            {
                //Never occur as SocketInAdapterConfigMgt.SocketInAdapterConfig was be constuctured
                channelSet = new XCollection <SocketInChannel>();
            }
            #endregion
            #region Look up tables
            if (LUTableSet != null)
            {
                if (LUTableSet.Count != 0)
                {
                    ShowLUTableSetInformation();
                }    //It sign that there is no channel in the channelset
            }
            else
            {
                //Never occur as SocketInAdapterConfigMgt.SocketInAdapterConfig was be constuctured
                LUTableSet = new XCollection <LookupTable>();
            }
            #endregion
        }
Esempio n. 3
0
        private void InitCodePage()
        {
            this.cbcCodePage.Items.Clear();
            for (int i = 0; i < EncodingPage.GetAllCodePages().Length; i++)
            {
                EncodingInfo ei = EncodingPage.GetAllCodePages()[i];
                cbcCodePage.Items.Add(ei.DisplayName + " (" + ei.CodePage.ToString() + ")");
            }
            cbcCodePage.SelectedIndex = EncodingPage.GetIndex("utf-8");

            this.cbsCodePage.Items.Clear();
            for (int i = 0; i < EncodingPage.GetAllCodePages().Length; i++)
            {
                EncodingInfo ei = EncodingPage.GetAllCodePages()[i];
                cbsCodePage.Items.Add(ei.DisplayName + " (" + ei.CodePage.ToString() + ")");
            }

            cbsCodePage.SelectedIndex = EncodingPage.GetIndex("utf-8");
        }