Exemplo n.º 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            this.Log = new List <string>();
            Control.CheckForIllegalCrossThreadCalls = false;
            this.AddLog("Program loading...");

            this.AddLog("Keywords loading...");
            KeywordContext.Load();
            this.AddLog("WebSites loading...");
            WebSiteContext.Load();
            this.UpdateKeywordList();
            this.AddLog("UI Components loading...");
            this.LoadDataGrids();
            this.AddLog("Bot settings are loaded, Bot is diseabled!");
            this.BotIsActive = false;


            cbWebSite.DataSource    = WebSiteContext.Sites;
            cbWebSite.DisplayMember = "Name";
            cbWebSite.ValueMember   = "Id";

            cbBotStatus.DataSource = Enum.GetValues(typeof(BotStatusEnum));

            BotTimer.Interval = 15000;
            BotTimer.Tick    += new EventHandler(timer_Tick);
            BotTimer.Start();

            this.AddLog("Program succesfully loaded!");
        }