Example #1
0
        private void TwitterCheck_Tick(object sender, EventArgs e)
        {
            /* MailReader rep = new MailReader("imap.gmail.com", 993, true, @"*****@*****.**", "piczorocks101"); //Text to Command
             * foreach (ActiveUp.Net.Mail.Message email in rep.GetUnreadMails("JarvisCommand"))
             * {
             *    System.IO.File.WriteAllText(@"C:\Users\nick\Documents\Visual Studio 2012\Projects\Jarvis V2\Jarvis V2\bin\Debug\Data\email.txt", email.BodyText.TextStripped);
             *    // Response.Write(string.Format("<p>{0}: {1}</p><p>{2}</p>", email.From, email.Subject, email.BodyHtml.Text));
             *    //command.processCommand(email.BodyHtml.Text, this);
             * }
             */
            t1.TwitterLoad(); //Tweet to command
            JarvisData.load();
            if (JarvisData.lastTweet != Twitter.LatestTweet)
            {
                command.processCommand(Twitter.LatestTweet, this);
            }
            JarvisData.lastTweet = Twitter.LatestTweet;
            JarvisData.save();
            this.log.Items.Add(Twitter.LatestTweet + "- Twitter Feed");

            if (log.Items.Count > 50)
            {
                log.Items.Clear();
            }
        }
Example #2
0
        void Commands(object sender, SpeechRecognizedEventArgs e) //Voice to command
        {
            if (e.Result.Text.StartsWith("jarvis"))
            {
                JarvisData.isOff = "false";
                JarvisData.save();
            }

            command.processCommand(e.Result.Text, this);
            JarvisData.load();
        }
Example #3
0
        private void TwitterCheck_Tick(object sender, EventArgs e)
        {
            t1.TwitterLoad(); //Tweet to command
            JarvisData.load();
            if (JarvisData.lastTweet != Twitter.LatestTweet)
            {
                command.processCommand(Twitter.LatestTweet, this);
            }
            JarvisData.lastTweet = Twitter.LatestTweet;
            JarvisData.save();
            this.log.Items.Add(Twitter.LatestTweet + "- Twitter Feed");

            if (log.Items.Count > 50)
            {
                log.Items.Clear();
            }
        }
Example #4
0
 private void sleepTimer_Tick(object sender, EventArgs e)
 {
     JarvisData.isOff = "true";
     JarvisData.save();
     this.log.Items.Add("Going to sleep");
 }