Beispiel #1
0
 public MainBot()
 {
     EveAction = new Dictionary <long, ChatActivity>();
     config    = new ConfigJson();
     dataBase  = new DataBase(config);
     BW        = new BackgroundWorker();
 }
Beispiel #2
0
 public DataBase(ConfigJson config)
 {
     this.config = config;
     connection  = new MySqlConnection(
         string.Format(
             "Database={0};Data Source={1};User Id={2};Password={3}",
             config.DbName, config.DataSource, config.DbUser, config.DbPass
             )
         );
     _semaphoreSlim = new SemaphoreSlim(1);
 }