예제 #1
0
 // Use this for initialization
 void Start()
 {
     bind = new DelBind();
     ItemContainer.gameObject.SetActive(true);
     StartCoroutine("LoadSceneMonitor");
     StartCoroutine("LoadMonitorInfo");
 }
예제 #2
0
    public void SetValue(GameObject monitor, DelBind delBind, GameObject phyDevicePanel, GameObject SMSPanel, GameObject RTSPPanel)
    {
        Logger.Instance.WriteLog("初始化场景摄像机列表项目");
        this.delBind         = delBind;
        this.monitor         = monitor;
        this.phyDevicePanel  = phyDevicePanel;
        setMonitorScopePanel = SMSPanel;
        setRTSPPanel         = RTSPPanel;
        BtnSetScope.SetActive(false);
        BtnSetRTSP.SetActive(false);
        CameraTag = monitor.transform.GetChild(0).name;
        Logger.Instance.WriteLog("从数据加载此列表项相关信息");
        DeviceDao dDao = new DeviceDao();

        dDao.Select002(CameraTag);
        if (dDao.Result.Count > 0)
        {
            Logger.Instance.WriteLog("数据加载成功");
            info = dDao.Result[0];
            Description.GetComponent <UIInput>().value       = info.Description;
            Description.GetComponent <BoxCollider>().enabled = true;
            Existing     = true;
            monitorScope = Instantiate(MonitorScopePrefab,
                                       new Vector3(monitor.transform.position.x, 0.2f, monitor.transform.position.z),
                                       Quaternion.Euler(0, 0, 0)) as GameObject;
            DrawSector ds = monitorScope.GetComponent <DrawSector>();
            ds.Scope  = int.Parse(info.MonitorScope);
            ds.Radio  = int.Parse(info.MonitorRadio);
            ds.Offset = int.Parse(info.MonitorOffset);
            monitorScope.SetActive(false);
            monitor.GetComponent <MonitorInfoData>().Data = dDao.Result[0];
        }
        else
        {
            Logger.Instance.WriteLog("数据加载失败");
            Description.GetComponent <UIInput>().value       = CameraTag;
            Description.GetComponent <BoxCollider>().enabled = false;
            Existing = false;
        }



        initDescription = Description.GetComponent <UIInput>().value;

//		lingxing = Instantiate(lingxingPrefab) as GameObject;
//		lingxing.transform.parent = monitor.transform;
//		lingxing.transform.localPosition = Vector3.zero;
        //lingxing.SetActive(false);
    }
예제 #3
0
    public void SetValue(int _index, CAMARE_INFO info, DelBind delBind)
    {
        this.delBind = delBind;
        this.info    = info;
        this.index   = _index;
        List <byte> des = new List <byte>();

        foreach (byte b in info.name)
        {
            if (b == 0)
            {
                break;
            }
            des.Add(b);
        }
        Description.text = System.Text.Encoding.Default.GetString(des.ToArray());
    }