Ejemplo n.º 1
0
        public void  run(AreaDbContext DB)
        {
            List <WoWCharacterModel> characters = DB.wowcharactermodels.ToList();

            if (WoW.getIndex() == 6)
            {
                List <WoWCharacterModel> new_characters = WoW.getCharacters();
                foreach (var character in new_characters)
                {
                    if (!WoW.alreadyExists(characters, character))
                    {
                        DB.wowcharactermodels.Add(character);
                        DB.SaveChanges();
                        Twitter.postReaction(WoW.getCharacterAction(character));
                    }
                }
            }
            else
            {
                foreach (var character in characters)
                {
                    if (WoW.checkAndUpdateCharacter(character, DB))
                    {
                        Twitter.postReaction(WoW.getCharacterAction(character));
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public void run(AreaDbContext DB)
        {
            string music = spotify.getAction();

            if (music == null || music == last_event)
            {
                return;
            }
            last_event      = music;
            area.last_event = music;
            DB.areas.Update(area);
            DB.SaveChanges();
            twitter.postReaction("Currently play: " + music);
        }
Ejemplo n.º 3
0
        public void run(AreaDbContext DB)
        {
            string info = facebook.getAction();

            if (info == null || info == last_event)
            {
                return;
            }
            last_event      = info;
            area.last_event = info;
            DB.areas.Update(area);
            DB.SaveChanges();
            twitter.postReaction(info);
        }