Example #1
0
        private Option LoadOption()
        {
            string confFile = CUR_DIR + "/CONFIG.ini";
            Option option   = new Option();

            option.AutoConn      = Boolean.Parse(IniFileOperator.ReadIniData("OPTION", "AUTOCONN", "true", confFile));
            option.SigSwitchPath = IniFileOperator.ReadIniData("OPTION", "SIGPATH", "", confFile);
            option.XtAddress     = IniFileOperator.ReadIniData("OPTION", "ADDRESS", "", confFile);///

            return(option);
        }
Example #2
0
        private string loadDBConfig()
        {
            DBConf dbConf   = new DBConf();
            string confFile = CUR_DIR + "/CONFIG.ini";

            dbConf.Serverip = IniFileOperator.ReadIniData("DBCONFIG", "SERVERIP", "172.0.0.1", confFile);
            dbConf.DbName   = IniFileOperator.ReadIniData("DBCONFIG", "DBNAME", "signal", confFile);
            dbConf.Userid   = IniFileOperator.ReadIniData("DBCONFIG", "USERID", "video", confFile);
            dbConf.Passwd   = IniFileOperator.ReadIniData("DBCONFIG", "PASSWD", "video", confFile);
            dbConf.Charset  = IniFileOperator.ReadIniData("DBCONFIG", "CHARSET", "utf8", confFile);
            dbConf.Timeout  = IniFileOperator.ReadIniData("DBCONFIG", "TIMEOUT", "60", confFile);

            //string connstr = "Max Pool Size=512; database=" + dbname + ";server=" + dbip + ";user id=" + userid + "; pwd=" + passwd + ";charset=" + charset + ";Connect Timeout=" + timeout + "";
            return(dbConf.getConnStr());
        }