コード例 #1
0
    /// <summary>
    /// 获取指定疏散预案对应的区域id列表
    /// </summary>
    /// <returns>The correlation area identifier.</returns>
    /// <param name="evacuatePlan">Evacuate plan.</param>
    List <string> GetCorrelationAreaId(EvacuatePlan evacuatePlan)
    {
        Logger.Instance.WriteLog("获取指定疏散预案对应的区域id列表");
        EvacuationPlanDao         ePlanDao  = new EvacuationPlanDao();
        List <EvacuateAreaOfPlan> eaoPlan   = ePlanDao.Select002(evacuatePlan.id);
        List <string>             areaIdLst = new List <string>();

        foreach (var eaop in eaoPlan)
        {
            areaIdLst.Add(eaop.evacuateAreaId);
        }
        return(areaIdLst);
    }
コード例 #2
0
    IEnumerator LoadData()
    {
        Logger.Instance.WriteLog("加载疏散预案");
        yield return(new WaitForEndOfFrame());

        EvacuationPlanDao         epDao      = new EvacuationPlanDao();
        List <EvacuateAreaOfPlan> eaoPlanLst = epDao.Select002(planId);
        List <string>             areaIdLst  = new List <string>();

        foreach (var item in eaoPlanLst)
        {
            areaIdLst.Add(item.evacuateAreaId);
        }
        Logger.Instance.WriteLog("加载疏散区域");
        List <EvacuateArea> evacuateAreaLst = epDao.Select001();

        InitEvacuateAreaOfPlanItems(evacuateAreaLst, areaIdLst);
        EvacuateAreaOfPlanItemGrid.gameObject.GetComponent <UIWidget>().UpdateAnchors();
        yield return(null);
    }