Ejemplo n.º 1
0
    void Awake()
    {
        mInstance = this;

        light.SetActive(false);
        mPhotoCam.aspect        = 1;
        mPhotoCam.clearFlags    = CameraClearFlags.Color;
        mPhotoCam.targetTexture = new RenderTexture(128, 128, 16, RenderTextureFormat.ARGB32);
        mPhotoCam.gameObject.SetActive(false);
    }
Ejemplo n.º 2
0
        public static Texture2D GetTex()
        {
            Camera camera = Camera.main;

            camera.targetTexture = new RenderTexture(Screen.width, Screen.height, 32);
            Texture2D image = PhotoStudio.RTImage(camera);

            camera.targetTexture = null;
            return(image);
        }
Ejemplo n.º 3
0
        internal PhotoStudioTool(IWrapperRegistry reg, IProviderRegistry prov)
        {
            this.reg  = reg;
            this.prov = prov;

            if (registry == null)
            {
                registry = Helper.WindowsRegistry;
            }
            ps = null;
        }
Ejemplo n.º 4
0
 public Interfaces.Plugin.IToolResult ShowDialog(ref SimPe.Interfaces.Files.IPackedFileDescriptor pfd, ref SimPe.Interfaces.Files.IPackageFile package)
 {
     if (!IsReallyEnabled(pfd, package))
     {
         return(new SimPe.Plugin.ToolResult(false, false));
     }
     if (ps == null)
     {
         ps = new PhotoStudio();
     }
     return(ps.Execute(ref pfd, ref package, prov));
 }
Ejemplo n.º 5
0
        public IActionResult Put_PhotoStudios(int key, [FromBody] PhotoStudio update)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            if (key != update.Id)
            {
                return(BadRequest());
            }

            var PhotoStudio = _db.PhotoStudios.AsTracking()
                              .Include(x => x.Workers).SingleOrDefault(x => x.Id == key);

            //_db.PhotoStudios.AsTracking()
            //.Include(x => x.Registry).SingleOrDefault(x => x.Id == key);

            _db.PhotoStudios.Persist().InsertOrUpdate(update);

            try
            {
                _db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!_PhotoStudiosExists(key))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(Updated(PhotoStudio));
        }
Ejemplo n.º 6
0
 public static PhotoStudioDto ToDto(this PhotoStudio photoStudio)
 {
     return(new PhotoStudioDto
     {
     });
 }
Ejemplo n.º 7
0
 public IActionResult Post([FromBody] PhotoStudio PhotoStudio)
 {
     _db.PhotoStudios.Add(PhotoStudio);
     _db.SaveChanges();
     return(Created(PhotoStudio));
 }
Ejemplo n.º 8
0
 public PhotoStudioBuilder()
 {
     _photoStudio = WithDefaults();
 }