Exemple #1
0
        public static DotHmbotConfigurationFile Create(string filename)
        {
            DotHmbotConfigurationFile x = new DotHmbotConfigurationFile {
                filename = filename
            };

            x.save();

            return(x);
        }
Exemple #2
0
        public static DotHmbotConfigurationFile Create(string filename, string serverHostname, uint serverPort,
                                                       string username, string password, string schema)
        {
            DotHmbotConfigurationFile x = new DotHmbotConfigurationFile {
                filename = filename
            };

            x[MYSQL_SERVER]   = serverHostname;
            x[MYSQL_PORT]     = serverPort.ToString();
            x[MYSQL_USERNAME] = username;
            x[MYSQL_PASSWORD] = password;
            x[MYSQL_SCHEMA]   = schema;

            x.save();

            return(x);
        }
Exemple #3
0
        public static DotHmbotConfigurationFile Open(string filename)
        {
            DotHmbotConfigurationFile x = new DotHmbotConfigurationFile {
                filename = filename
            };


            StreamReader sr      = new StreamReader(filename);
            string       lineone = sr.ReadLine();

            sr.Close();

            if (lineone.Contains("<?xml"))
            {
                x.readXmlConfigFile();
            }
            else
            {
                x.readVer1ConfigFile();
            }

            return(x);
        }
        public static DotHmbotConfigurationFile Open(string filename)
        {
            DotHmbotConfigurationFile x = new DotHmbotConfigurationFile {filename = filename};

            StreamReader sr = new StreamReader(filename);
            string lineone = sr.ReadLine();
            sr.Close();

            if (lineone.Contains("<?xml"))
            {
                x.readXmlConfigFile();
            }
            else
            {
                x.readVer1ConfigFile();
            }

            return x;
        }
        public static DotHmbotConfigurationFile Create(string filename)
        {
            DotHmbotConfigurationFile x = new DotHmbotConfigurationFile {filename = filename};

            x.save();

            return x;
        }
        public static DotHmbotConfigurationFile Create(string filename, string serverHostname, uint serverPort,
            string username, string password, string schema)
        {
            DotHmbotConfigurationFile x = new DotHmbotConfigurationFile {filename = filename};
            x[MYSQL_SERVER] = serverHostname;
            x[MYSQL_PORT] = serverPort.ToString();
            x[MYSQL_USERNAME] = username;
            x[MYSQL_PASSWORD] = password;
            x[MYSQL_SCHEMA] = schema;

            x.save();

            return x;
        }