Esempio n. 1
0
        static void Main(string[] args)
        {
            #region Load Settings
            _dir = Environment.CurrentDirectory;
            LogConsole._Load();

            try
            {
                if (File.Exists(_dir + _file_config))
                {
                    ini = new Systems.Ini(_dir + _file_config);

                    s_timer   = ini.GetValue("Timer", "minutes", 10);
                    max_count = ini.GetValue("Timer", "max", 100);
                    delay     = ini.GetValue("Timer", "delay", 10000);
                    infi      = ini.GetValue("Timer", "infi", false);

                    _db_user = ini.GetValue("MYSQL", "user", "root");
                    _db_pass = ini.GetValue("MYSQL", "pass", "123456");
                    _db_ipsv = ini.GetValue("MYSQL", "ipsv", "127.0.0.1");
                    _db_name = ini.GetValue("MYSQL", "data", "rakion");
                    _db_port = ini.GetValue("MYSQL", "port", 3306);

                    debug = ini.GetValue("CONSOLE", "debug", false);
                    ini   = null;
                    LogConsole.Show("Has loaded your settings successfully");
                }
                else
                {
                    LogConsole.Show("Settings.ini could not be found, using default setting");
                }
            }
            catch (Exception)
            {
                return;
            }
            #endregion

            _SQL.Init(_db_ipsv, _db_user, _db_pass, _db_name, _db_port);
            TimerX _t = new TimerX(s_timer, max_count, infi, delay);
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            #region Load Settings
            _dir = Environment.CurrentDirectory;
            LogConsole._Load();

            try
            {
                if (File.Exists(_dir + _file_config))
                {
                    ini = new Systems.Ini(_dir + _file_config);

                    s_timer = ini.GetValue("Timer", "minutes", 10);
                    max_count = ini.GetValue("Timer", "max", 100);
                    delay = ini.GetValue("Timer", "delay", 10000);
                    infi = ini.GetValue("Timer", "infi", false);

                    _db_user = ini.GetValue("MYSQL", "user", "root");
                    _db_pass = ini.GetValue("MYSQL", "pass", "123456");
                    _db_ipsv = ini.GetValue("MYSQL", "ipsv", "127.0.0.1");
                    _db_name = ini.GetValue("MYSQL", "data", "rakion");
                    _db_port = ini.GetValue("MYSQL", "port", 3306);

                    debug = ini.GetValue("CONSOLE", "debug", false);
                    ini = null;
                    LogConsole.Show("Has loaded your settings successfully");
                }
                else
                {
                    LogConsole.Show("Settings.ini could not be found, using default setting");
                }
            }
            catch (Exception)
            {
                return;
            }
            #endregion

            _SQL.Init(_db_ipsv, _db_user, _db_pass, _db_name, _db_port);
            TimerX _t = new TimerX(s_timer, max_count, infi, delay);
        }