Example #1
0
        private AppearanceService CreateAppearanceService()
        {
            var userId  = Guid.Parse(User.Identity.GetUserId());
            var service = new AppearanceService(userId);

            return(service);
        }
Example #2
0
        // GET: Appearance
        public ActionResult Index()
        {
            var userId  = Guid.Parse(User.Identity.GetUserId());
            var service = new AppearanceService(userId);
            var model   = service.GetAppearances();

            return(View(model));
        }
Example #3
0
 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);
 }
Example #4
0
        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);
        }
Example #5
0
        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"));
        }