Exemple #1
0
    IEnumerator LoadLocalJson()
    {
        //Debug.Log("111");
        WWW www = new WWW(Application.dataPath + "/Resources/ConfigProfiles/CriteriaInfo.json");

        yield return(www);

        Debug.Log(www.text);
        ListCritera = JsonConvert.DeserializeObject <CriteriaList>(www.text);

        www = new WWW(Application.dataPath + "/Resources/ConfigProfiles/MachineInfo.json");
        yield return(www);

        Debug.Log(www.text);
        ListMachine = JsonConvert.DeserializeObject <MachineList>(www.text);

        www = new WWW(Application.dataPath + "/Resources/ConfigProfiles/SubCriteriaInfo.json");
        yield return(www);

        Debug.Log(www.text);
        ListSubCriteria = JsonConvert.DeserializeObject <SubCriteriaList>(www.text);

        www = new WWW(Application.dataPath + "/Resources/ConfigProfiles/AspectInfo.json");
        yield return(www);

        Debug.Log(www.text);
        ListAspect = JsonConvert.DeserializeObject <AspectList>(www.text);

        OnInitStatisticsData();
    }
Exemple #2
0
    public void LoadAllData()
    {
        //StartCoroutine(LoadLocalJson());
        TextAsset str1 = Resources.Load <TextAsset>("ConfigProfiles/CriteriaInfo");
        TextAsset str2 = Resources.Load <TextAsset>("ConfigProfiles/MachineInfo");
        TextAsset str3 = Resources.Load <TextAsset>("ConfigProfiles/SubCriteriaInfo");
        TextAsset str4 = Resources.Load <TextAsset>("ConfigProfiles/AspectInfo");

        ListCritera     = JsonConvert.DeserializeObject <CriteriaList>(str1.text);
        ListMachine     = JsonConvert.DeserializeObject <MachineList>(str2.text);
        ListSubCriteria = JsonConvert.DeserializeObject <SubCriteriaList>(str3.text);
        ListAspect      = JsonConvert.DeserializeObject <AspectList>(str4.text);

        OnInitStatisticsData();
    }
        public SelectList GetAspectList(string selectedValue)
        {
            List <AspectList> aspectList = new List <AspectList>();

            AspectList Aspect = new AspectList();

            Aspect.AspectCode  = "Video Rating";
            Aspect.AspectValue = "Video Rating";
            aspectList.Add(Aspect);

            AspectList Aspect1 = new AspectList();

            Aspect1.AspectCode  = "Colour Scheming";
            Aspect1.AspectValue = "Colour Scheming";
            aspectList.Add(Aspect1);

            AspectList Aspect2 = new AspectList();

            Aspect2.AspectCode  = "Categorisation";
            Aspect2.AspectValue = "Categorisation";
            aspectList.Add(Aspect2);

            AspectList Aspect3 = new AspectList();

            Aspect3.AspectCode  = "Categorisation Selection";
            Aspect3.AspectValue = "Categorisation Selection";
            aspectList.Add(Aspect3);
            AspectList Aspect4 = new AspectList();

            Aspect4.AspectCode  = "Location Selection/Addition";
            Aspect4.AspectValue = "Location Selection/Addition";
            aspectList.Add(Aspect4);

            AspectList Aspect5 = new AspectList();

            Aspect5.AspectCode  = "Ease of Understanding";
            Aspect5.AspectValue = "Ease of Understanding";
            aspectList.Add(Aspect5);

            AspectList Aspect6 = new AspectList();

            Aspect6.AspectCode  = "Ease of Use";
            Aspect6.AspectValue = "Ease of Use";
            aspectList.Add(Aspect6);

            AspectList Aspect7 = new AspectList();

            Aspect7.AspectCode  = "Concept Rating";
            Aspect7.AspectValue = "Concept Rating";
            aspectList.Add(Aspect7);

            AspectList Aspect8 = new AspectList();

            Aspect8.AspectCode  = "Tutorials";
            Aspect8.AspectValue = "Tutorials";
            aspectList.Add(Aspect8);


            if (!string.IsNullOrEmpty(selectedValue))
            {
                return(new SelectList(aspectList, "AspectCode", "AspectValue", selectedValue));
            }
            else
            {
                return(new SelectList(aspectList, "AspectCode", "AspectValue"));
            }
        }