예제 #1
0
 static void Main(string[] args)
 {
     config = new ConfigManager();
     config.Initialize();
     localization = new ConfigManager(@"strings.ini");
     localization.Initialize();
     logger = new Logger(config.execLocation);
     logger.Initalize();
     rawIrc = new Logger(config.execLocation, "rawirc.log");
     rawIrc.Initalize();
     ConsoleNotifications.writeNotify("Starting TrelloBot");
     commandsStack = new IrcCommandsSender();
     bool configEdited = config.readBool("configEdited", false);
     if (!configEdited)
     {
         ConsoleNotifications.writeWarning(@"Config is probably new!!! set ""configEdited"" to ""true"" after you are done modifying config!!!");
         Thread.Sleep(1000);
     }
     ircConnection = new IrcClient(config, commandsStack);
     ircThread = new Thread(new ThreadStart(() => ircConnection.startClient()));
     ConsoleNotifications.writeNotify("Irc Client started!");
     trelloClient = new TrelloApiClient(config, ircConnection);
     trelloThread = new Thread(new ThreadStart(() => trelloClient.start()));
     ircThread.Start();
     Thread.Sleep(50);
     trelloThread.Start();
     Thread.Sleep(2000);
     while (trelloThread.IsAlive && ircThread.IsAlive)
     {
         ConsoleNotifications.writeDebug("Threads alive!!!");
         Thread.Sleep(150000);
     }
 }
예제 #2
0
 public IrcClient(ConfigManager _config, IrcCommandsSender _messagesStack)
 {
     config = _config;
     messagesStack = _messagesStack;
 }
예제 #3
0
 //--
 public TrelloApiClient(ConfigManager _config, IrcClient _conn)
 {
     ircConn = _conn;
     config = _config;
     getCurrentTime();
 }