private AppearanceService CreateAppearanceService() { var userId = Guid.Parse(User.Identity.GetUserId()); var service = new AppearanceService(userId); return(service); }
// GET: Appearance public ActionResult Index() { var userId = Guid.Parse(User.Identity.GetUserId()); var service = new AppearanceService(userId); var model = service.GetAppearances(); return(View(model)); }
private void BuildAllServices() { RandomService = new RandomService(RootState.PlayState); StatusService = new StatusService(RootState.PlayState); CalendarService = new CalendarService(RootState.PlayState); AppearanceService = new AppearanceService(RootState.PlayState, StatusService); TalkService = new TalkService(RootState.PlayState, StatusService, RandomService); ScheduleService = new ScheduleService(RootState.PlayState, StatusService, RandomService); }
private void UpdateCharacterSubsystem() { AppearanceService.Update(); KaraResources.LoadSprite(GetComponent <Image>("CharacterBody"), RootState.PlayState, p => p.CurrentBodyImage); KaraResources.LoadSprite(GetComponent <Image>("CharacterDress"), RootState.PlayState, p => p.CurrentDressImage); KaraResources.LoadSprite(GetComponent <Image>("CharacterFace"), RootState.PlayState, p => p.CurrentFaceImage); }
public ActionResult Create(AppearanceCreate model) { if (!ModelState.IsValid) { return(View(model)); } AppearanceService service = CreateAppearanceService(); service.CreateAppearance(model); ViewBag.ActorId = new SelectList(service.Actors(), "ActorId", "Name", model.ActorId); ViewBag.MovieId = new SelectList(service.Movies(), "MovieId", "Title", model.MovieId); return(RedirectToAction("Index")); }