示例#1
0
 public static DatabaseSettings ReadSettings(string path)
 {
     string[] tmpString = File.ReadAllLines(path);
     DatabaseSettings tmpSettings = new DatabaseSettings();
     tmpSettings.Ip = tmpString[0].Split(':')[1];
     tmpSettings.Port = Convert.ToInt32(tmpString[1].Split(':')[1]);
     tmpSettings.DatabaseName = tmpString[2].Split(':')[1];
     tmpSettings.User = tmpString[3].Split(':')[1];
     tmpSettings.Password = tmpString[4].Split(':')[1];
     return tmpSettings;
 }
示例#2
0
 public static void Connect(DatabaseSettings settings)
 {
     Connect(settings.Ip, settings.Port, settings.DatabaseName, settings.User, settings.Password);
 }
示例#3
0
 public static void Connect(DatabaseSettings settings)
 {
     Connect(settings.Ip, settings.Port, settings.DatabaseName, settings.User, settings.Password);
 }