Beispiel #1
0
    /// <summary>
    /// 重新加载疏散预案相关信息
    /// </summary>
    public void ReLoadEvacuationArea()
    {
        Popuplist.GetComponent <UIPopupList>().Clear();
        foreach (GameObject area in Areas)
        {
            Destroy(area);
        }
        foreach (GameObject AreaText in AreaTexts)
        {
            Destroy(AreaText);
        }
        Areas.Clear();
        AreaTexts.Clear();

        Logger.Instance.WriteLog("加载疏散预案信息");
        EvacuationPlanDao ePlanDao = new EvacuationPlanDao();
        var ePlan = ePlanDao.Select003();

        foreach (var plan in ePlan)
        {
            Popuplist.GetComponent <UIPopupList>().AddItem(plan.name);
        }
        if (ePlan.Count > 0)
        {
            Popuplist.GetComponent <UIPopupList>().value = ePlan[0].name;

            StartCoroutine(LoadEvacuationArea());
        }
    }
Beispiel #2
0
    //从数据库加载疏散预案数据
    IEnumerator LoadData()
    {
        yield return(new WaitForEndOfFrame());

        EvacuationPlanDao   epDao     = new EvacuationPlanDao();
        List <EvacuatePlan> ePlanList = epDao.Select003();

        foreach (var plan in ePlanList)
        {
            AddItemToEvacuatePlanItemGrid(plan);
        }

        if (ePlanList.Count > 0)
        {
            EvacuateAreaOfPlanPanel.SetActive(true);
            EvacuatePlanItemGrid.GetChild(0).GetComponent <EditedEvacuatePlanListItem>().Selected();
        }
        else
        {
            EvacuateAreaOfPlanPanel.SetActive(false);
        }
        yield return(null);
    }