private void LoadAlarmDvs() { SelectDvs sd = new SelectDvs(); DataSet ds = sd.QueryAlarm(Session["userid"].ToString(), Session["cityid"].ToString()); alarmDvsJS = DeviceOutput.GetDvsJSON(ds); }
public static void AttachRenderer(ProjectorBrain brain, DeviceOutput output) { switch (output) { case DeviceOutput.Mono: brain.gameObject.AddComponent <ProjectorRendererMono>(); break; case DeviceOutput.Stereo: brain.gameObject.AddComponent <ProjectorRendererStereo>(); break; } }
public static ProjectorRenderer Attach(ProjectorBrain brain, DeviceOutput output) { ProjectorRenderer renderer = brain.GetComponent <ProjectorRenderer>(); if (renderer != null) { GameObject.Destroy(renderer); } switch (output) { case DeviceOutput.Mono: renderer = brain.gameObject.AddComponent <ProjectorRendererMono>(); break; case DeviceOutput.Stereo: renderer = brain.gameObject.AddComponent <ProjectorRendererStereo>(); break; } return(renderer); }
protected void Page_Load(object sender, EventArgs e) { string key = Request.QueryString["key"]; string type = Request.QueryString["type"]; string result = "[]"; if (type == "1") //查询编码器 { SelectDvs sd = new SelectDvs(); DataSet ds = sd.Query(Session["userid"].ToString(), Session["cityid"].ToString(), key); result = DeviceOutput.GetDvsJSON(ds); } else if (type == "2") //查询摄像头 { SelectCameras sc = new SelectCameras(); DataSet ds = sc.Query(Session["userid"].ToString(), Session["cityid"].ToString(), key); result = DeviceOutput.GetCameraJSON(ds); } else if (type == "3") // { SelectDvs sd = new SelectDvs(); DataSet ds = sd.QueryNormal(Session["userid"].ToString(), Session["cityid"].ToString()); result = DeviceOutput.GetDvsJSON(ds); } else if (type == "4") { SelectCameras sc = new SelectCameras(); DataSet ds = sc.QueryNormal(Session["userid"].ToString(), Session["cityid"].ToString()); result = DeviceOutput.GetCameraJSON(ds); } Response.ContentType = "application/json"; Response.ContentEncoding = System.Text.Encoding.UTF8; Response.Write("{\"a\":" + result + "}"); Response.End(); }