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)); }
// 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)); }
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)); }
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; } }
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)); }
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); }
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); } } } } } }
public void Select_Resolution(resolution res) { CurSelectedSettings.dimensions = res; }
: GetLatLonOfEquirectangularProjectionFromAdjustedCoordinates( x, y, resolution, GetScale(resolution, options?.Range),
GetScale(resolution, options?.Range, true),