public static async Task Main(string[] args) { TweetGenerator tweetGenerator = new TweetGenerator(); try { await tweetGenerator.Run(); System.Console.WriteLine("Started Main()!"); System.Console.ReadLine(); } catch (Exception exception) { System.Console.WriteLine(exception); } finally { await tweetGenerator.Stop(); System.Console.WriteLine("Finished Main()!"); } System.Console.WriteLine("Program Done!"); System.Console.ReadLine(); }
public ActionResult DeleteConfirmed(string id) { TweetGenerator tweetGenerator = db.TweetGenerators.Find(id); db.TweetGenerators.Remove(tweetGenerator); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Username,Firstname,Lastname,Likes,Retweets,Text")] TweetGenerator tweetGenerator) { if (ModelState.IsValid) { db.Entry(tweetGenerator).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tweetGenerator)); }
private void Start() { // query for Twitter Access token TwitterApiAccessToken = WebHelper.GetTwitterApiAccessToken(TwitterApiConsumerKey, TwitterApiConsumerSecret); // assign TweetGenerator Component tg = GetComponent <TweetGenerator>(); // get Debug Text game object //debugText = GameObject.Find("DebugText").GetComponent<Text>(); }
public ActionResult Create([Bind(Include = "Username,Firstname,Lastname,Likes,Retweets,Text")] TweetGenerator tweetGenerator) { if (ModelState.IsValid) { db.TweetGenerators.Add(tweetGenerator); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tweetGenerator)); }
// GET: TweetGenerators/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TweetGenerator tweetGenerator = db.TweetGenerators.Find(id); if (tweetGenerator == null) { return(HttpNotFound()); } return(View(tweetGenerator)); }
// Start is called before the first frame update private void Start() { agent = GetComponent <NavMeshAgent>(); // get singleton instances tweetGenerator = TweetGenerator.Instance; // get renderers of npc model components renderers = GetComponentsInChildren <Renderer>(); colours = new Color[renderers.Length]; // cache original color for (int i = 0; i < renderers.Length; i++) { colours[i] = renderers[i].material.color; } // update pathing destination every 10 seconds InvokeRepeating("ChangeDestination", 0, 10f); }
public ActionResult RandomTweet() { TweetGenerator tm = db.TweetGenerators.Find("Shdwslayer22"); return(View(tm)); }