Example #1
0
        private async void StartGitLostBot()
        {
            if (gitlostHandler.state != BotState.Running)
            {
                gitlostHandler = new GitLostHandler();

                btnStartGitLostBot.Enabled = false;
                btnStopGitLostBot.Enabled  = true;

                await gitlostHandler.Start(GitLostLog);
            }
        }
Example #2
0
        public Gitlost_bot()
        {
            InitializeComponent();
            LoadFeedChannels();

            txtGitLostLog.ReadOnly     = true;
            btnStartGitLostBot.Enabled = true;
            btnStopGitLostBot.Enabled  = false;

            poststate = PostState.FirstBoot;
            lastPost  = null;

            gitlostHandler = new GitLostHandler();
            gitlostchecker = new GitLostTimedChecker(30000, NewPostFound_Tick);
            gitlostchecker.Start();

            btnStartGitLostBot.Click += (s, e) => StartGitLostBot();
            btnStopGitLostBot.Click  += (s, e) => StopGitLostBot();

            this.Load += (s, e) => StartGitLostBot();
        }