public override void Tick() { base.Tick(); ReceiveableMan = null; if (Clock.IsDay()) { foreach (Person t in Homeless) { if (Insider.Contains(t)) { if (t.Company) { t.GoJob(); } else if (t.Work) { t.GoWork(); } else if (!t.acting) { ReceiveableMan = t; } } } } }
public virtual void CheckConstruction() { if (ConstructTime < 0) { UnderConstruct = false; Working = true; for (int i = 0; i < Insider.Count; i++) { Insider[i].AddCommand(new ChangeWorkCommand(null)); if (((Person)Insider[i]).Company) { Insider[i].AddCommand(new GoJobCommand()); } else { Insider[i].AddCommand(new GoHomeCommand()); } } Insider.Clear(); ConstructionIndicator.SetActive(false); Model.SetActive(true); } else { ConstructTime -= Time.deltaTime * Insider.Count; } }
public override void Tick() { base.Tick(); ReceiveableMan = null; if (Clock.IsDay()) { foreach (Person t in Officers) { if (Insider.Contains(t) && t.Work) { t.GoWork(); } else { ReceiveableMan = t; } } } else { foreach (Unit t in Officers) { if (Insider.Contains(t)) { t.GoHome(); } } } }
public override void Tick() { base.Tick(); ReceiveableMan = null; if (Clock.IsDay()) { foreach (Human t in Livers) { if (Insider.Contains(t) && !t.acting) { ReceiveableMan = t; } } if (Working && !UnderConstruct && !UnderDeconstruct) { if (Workers.Count > 0) { BirthStatus += BirthSpeed; if (BirthStatus >= BirthCap) { BirthStatus = 0f; Human t = Instantiate(personPrefab); TriIsland.Instance.entities.AddUnit(t); t.Location = Location; t.Home = this; t.AddCommand(new GetInCommand(this)); while (Workers.Count > 0) { (Workers[0] as Human).Work = null; } } } } } }
private bool AttachWithTries(Process process, int times) { bool result; try { LaunchInjector(process); Thread.Sleep(500); result = Insider.IsAlive(); } catch (Exception) { result = false; } if (result) { return(true); } if (times > 0) { Thread.Sleep(1000); return(AttachWithTries(process, times - 1)); } return(false); }
public PartialViewResult EmbeddedArticle(string articlehandle) { ExtronWeb.Models.Article article = new ExtronWeb.Models.Article(); InsiderEntity currentInsider = Insider.GetCurrentInsider(); var model = article.GetArticle(articlehandle, currentInsider); return(PartialView("../Widgets/EmbeddedArticle", model)); }
public ActionResult DeleteConfirmed(int id) { Insider insider = db.Insiders.Find(id); db.Insiders.Remove(insider); db.SaveChanges(); return(RedirectToAction("Index")); }
public IHttpActionResult Get() { InsiderEntity insider = Insider.GetCurrentInsider(); if (insider == null) { return(NotFound()); } return(Ok(insider)); }
public ActionResult Edit([Bind(Include = "InsiderID,UserName,InsiderFirstName,InsiderLastName,AddressID,InsiderEmailAddress,InsiderPhoneNumber")] Insider insider) { if (ModelState.IsValid) { db.Entry(insider).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AddressID = new SelectList(db.Addresses, "AddressID", "StreetAddress", insider.AddressID); return(View(insider)); }
// GET: Article public ActionResult Index(string articlehandle) { ExtronWeb.Models.Article article = new ExtronWeb.Models.Article(); InsiderEntity currentInsider = Insider.GetCurrentInsider(); var model = article.GetArticle(articlehandle, currentInsider); if (model != null) { return(View(model)); } return(Redirect("/")); }
public IHttpActionResult GetPricing(string partnum) { InsiderEntity insider = Insider.GetCurrentInsider(); AvantePricingEntity pricing = Price.GetInsiderPrice(partnum, insider); ProdPricing result = new ProdPricing() { YourPrice = pricing.DealerPrice.GetPrice(), MSRP = pricing.ListPrice.GetPrice() }; return(Ok(result)); }
public override void Tick() { base.Tick(); if (Clock.IsDay()) { foreach (Human t in Homeless) { if (Insider.Contains(t) && !t.acting) { ReceiveableMan = t; } } } }
// GET: Insiders/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Insider insider = db.Insiders.Find(id); if (insider == null) { return(HttpNotFound()); } return(View(insider)); }
// GET: Insiders/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Insider insider = db.Insiders.Find(id); if (insider == null) { return(HttpNotFound()); } ViewBag.AddressID = new SelectList(db.Addresses, "AddressID", "StreetAddress", insider.AddressID); return(View(insider)); }
public override void Tick() { base.Tick(); CommandReceiver = null; if (Clock.IsDay()) { foreach (Person t in Livers) { if (Insider.Contains(t)) { if (t.Company) { t.GoJob(); } else if (t.Work) { t.GoWork(); } else { CommandReceiver = t; } } } if (Working && !UnderConstruct) { if (Workers.Count > 0) { BirthStatus += BirthSpeed; if (BirthStatus >= BirthCap) { BirthStatus = 0f; Person t = Instantiate(personPrefab); TriIsleland.Instance.entities.AddUnit(t); t.Location = Location; t.Home = this; t.AddCommand(new GetInCommand(this)); while (Workers.Count > 0) { (Workers[0] as Person).Work = null; } } } } } }
public JsonResult SubmitTopicFeedback(ExtronWeb.Models.Help.Help.FeedbackEntity feedback) { var model = new TopicViewModel(); InsiderEntity currentInsider = Insider.GetCurrentInsider(); if (currentInsider.Email == null) { feedback.Email = "NO_LOGIN"; } else { feedback.Email = currentInsider.Email; } feedback.UserAgent = HttpContext.Request.UserAgent; feedback.IPAddress = Request.UserHostAddress; if (model.SubmitTopicFeedback(feedback)) { return(Json(feedback)); } return(null); }
public ActionResult Login() { InsiderEntity currentInsider = Insider.GetCurrentInsider(); return(View(currentInsider)); }