コード例 #1
0
        public IHttpActionResult Postresolution(resolution resolution)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.resolutions.Add(resolution);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = resolution.resID }, resolution));
        }
コード例 #2
0
        // GET: resolutions/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            resolution resolution = db.resolutions.Find(id);

            if (resolution == null)
            {
                return(HttpNotFound());
            }
            return(View(resolution));
        }
コード例 #3
0
        public IHttpActionResult Deleteresolution(int id)
        {
            resolution resolution = db.resolutions.Find(id);

            if (resolution == null)
            {
                return(NotFound());
            }

            db.resolutions.Remove(resolution);
            db.SaveChanges();

            return(Ok(resolution));
        }
コード例 #4
0
ファイル: ChangePointType.cs プロジェクト: GiovannyJTT/GCS
    public void onResolutionChanged()
    {
        pointSelected.GetComponent <PathPoint>().Rc.edited = true;

        resolution index = (resolution)resolutionDropDown.value;

        switch (index)
        {
        case resolution.RCAM_MOVIE_FORMAT_4KP25:
            pointSelected.GetComponent <PathPoint>().Rc.resolution = (byte)RCamMovieFormat.RCAM_MOVIE_FORMAT_4KP25;
            break;

        case resolution.RCAM_MOVIE_FORMAT_1080P50:
            pointSelected.GetComponent <PathPoint>().Rc.resolution = (byte)RCamMovieFormat.RCAM_MOVIE_FORMAT_1080P50;
            break;

        case resolution.RCAM_MOVIE_FORMAT_1080P25:
            pointSelected.GetComponent <PathPoint>().Rc.resolution = (byte)RCamMovieFormat.RCAM_MOVIE_FORMAT_1080P25;
            break;

        case resolution.RCAM_MOVIE_FORMAT_720P50:
            pointSelected.GetComponent <PathPoint>().Rc.resolution = (byte)RCamMovieFormat.RCAM_MOVIE_FORMAT_720P50;
            break;

        case resolution.RCAM_MOVIE_FORMAT_WVGAP25:
            pointSelected.GetComponent <PathPoint>().Rc.resolution = (byte)RCamMovieFormat.RCAM_MOVIE_FORMAT_WVGAP25;
            break;

        case resolution.RCAM_MOVIE_FORMAT_2160P25:
            pointSelected.GetComponent <PathPoint>().Rc.resolution = (byte)RCamMovieFormat.RCAM_MOVIE_FORMAT_2160P25;
            break;

        case resolution.RCAM_MOVIE_FORMAT_1440P25:
            pointSelected.GetComponent <PathPoint>().Rc.resolution = (byte)RCamMovieFormat.RCAM_MOVIE_FORMAT_1440P25;
            break;

        case resolution.RCAM_MOVIE_FORMAT_S1920P25:
            pointSelected.GetComponent <PathPoint>().Rc.resolution = (byte)RCamMovieFormat.RCAM_MOVIE_FORMAT_S1920P25;
            break;

        default:
            break;
        }
    }
コード例 #5
0
        public async Task <IHttpActionResult> GetResolution(int id)
        {
            resolution r = await db.resolutions.FindAsync(id);

            if (r == null)
            {
                return(NotFound());
            }

            resolutionDTO resolution = new resolutionDTO
            {
                resID   = r.resID,
                Name    = r.Name,
                Date    = r.Date,
                Topic   = r.Topic,
                Details = r.Details
            };

            return(Ok(resolution));
        }
コード例 #6
0
ファイル: FighterBot.cs プロジェクト: lingkeyang/angry-ai
    public override void Initialize()
    {
        base.Initialize();

        Sensor     = new TargetingSensor(body, 20f, 30f);
        bulletPool = Object.FindObjectOfType <BulletPool>();
        eye        = movingParts.Find("Eye");
        cam        = transform.Find("Cam");

        navigator = GetComponent <NavigatorAgent>();
        resolution res = navigator.brain.brainParameters.cameraResolutions[0];

        // See changes in ML-Agents/Scripts/Agent.cs line 548 ff.
        camTexture = new Texture2D(res.width, res.height, TextureFormat.RGB24, false)
        {
            filterMode = FilterMode.Point
        };
        // See /DepthCam/Shader/DepthAndMotion.cginc
        GetCam().Initialize(ref camTexture);
        navigator.SetCustonTexture(ref camTexture);

        sfx = GetComponentInChildren <SFX>();
        sfx.Initialize(this);
    }
コード例 #7
0
        public void parseArray(JProperty jProperty)
        {
            //Parses an array to separate values in the json and convert to objects


            JArray jArray = (JArray)jProperty.Value;

            foreach (JObject jOBrowsers in jArray.Children <JObject>())
            {
                foreach (JProperty p in jOBrowsers.Properties())
                {
                    {
                        if (p.Value.Type == JTokenType.Integer)
                        {
                            string name = p.Name;
                            // if (p.Name != "caps")

                            string value = (string)p.Value;

                            if (jProperty.Name == "resolutions")
                            {
                                if (name == "width")
                                {
                                    tempResolution       = new resolution();
                                    tempResolution.width = value;
                                }
                                if (name == "height")
                                {
                                    tempResolution.height = value;
                                }
                            }
                        }

                        if (p.Value.Type == JTokenType.String)
                        {
                            string name = p.Name;

                            {
                                string value = (string)p.Value;

                                if (jProperty.Name == "browsers")
                                {
                                    if (name == "name")
                                    {
                                        tempBrowser      = new browser();
                                        tempBrowser.name = value;
                                    }
                                    if (name == "api_name")
                                    {
                                        tempBrowser.apiName = value;
                                    }
                                }
                                if (jProperty.Name == "resolutions")
                                {
                                    if (name == "name")
                                    {
                                        tempResolution.name = value;
                                        capabilities[capabilities.Count - 1].resolutions.Add(tempResolution);
                                    }
                                }
                            }
                        }
                        if (p.Value.Type == JTokenType.Object)
                        {
                            if (p.Name == "caps")
                            {
                                parseObject(p);
                            }
                        }
                        if (p.Value.Type == JTokenType.Array)
                        {
                            if (p.Name == "browsers")
                            {
                                parseArray(p);
                            }
                            if (p.Name == "resolutions")
                            {
                                parseArray(p);
                            }
                        }
                    }
                }
            }
        }
コード例 #8
0
ファイル: DisplaySettings.cs プロジェクト: Apantuck/GameCode
 public void Select_Resolution(resolution res)
 {
     CurSelectedSettings.dimensions = res;
 }
コード例 #9
0
 : GetLatLonOfEquirectangularProjectionFromAdjustedCoordinates(
 x, y,
 resolution,
 GetScale(resolution, options?.Range),
コード例 #10
0
 GetScale(resolution, options?.Range, true),