Exemplo n.º 1
0
        /// <summary>
        /// Initializes the settings.
        /// </summary>
        public override void Initialize()
        {
            string result = MyConfig.GetConfigValue(Constants.CONFIG_SECTION_GENERAL, Constants.CONFIG_KEY_CLOSEMODE);

            closeMode = result;

            result             = MyConfig.GetConfigValue(Constants.CONFIG_SECTION_GENERAL, Constants.CONFIG_KEY_MAXCONNECTIONCOUNT);
            maxConnectionCount = Utils.StringToInteger(result);

            result            = MyConfig.GetConfigValue(Constants.CONFIG_SECTION_GENERAL, Constants.CONFIG_KEY_MAXSESSIONTIMEOUT);
            maxSessionTimeout = Utils.StringToInteger(result);

            result     = MyConfig.GetConfigValue(Constants.CONFIG_SECTION_GENERAL, Constants.CONFIG_KEY_SERVERPORT);
            serverPort = Utils.StringToInteger(result);

            if (closeMode.Equals("0"))
            {
                this.rbMin.Checked = true;
            }
            else
            {
                this.rbQuit.Checked = true;
            }

            this.numMaxConnCount.Value = (decimal)maxConnectionCount;
            this.numMaxTimeout.Value   = (decimal)maxSessionTimeout;
            this.numServerPort.Value   = (decimal)serverPort;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes the settings.
        /// </summary>
        public override void Initialize()
        {
            fileCatalog = MyConfig.GetConfigValue(Constants.CONFIG_SECTION_CATALOG, Constants.CONFIG_KEY_FILECATALOG);

            this.txtFileCatalog.Text = fileCatalog;
        }