Example #1
0
    public override bool Load()
    {
        AnalysisResults targetData = target as AnalysisResults;

        var    client = new DatabaseClient("", "");
        string error  = string.Empty;
        var    db     = client.GetDatabase(targetData.SheetName, ref error);
        var    table  = db.GetTable <AnalysisResultsData>(targetData.WorksheetName) ?? db.CreateTable <AnalysisResultsData>(targetData.WorksheetName);

        List <AnalysisResultsData> myDataList = new List <AnalysisResultsData>();

        var all = table.FindAll();

        foreach (var elem in all)
        {
            AnalysisResultsData data = new AnalysisResultsData();

            data = Cloner.DeepCopy <AnalysisResultsData>(elem.Element);
            myDataList.Add(data);
        }

        targetData.dataArray = myDataList.ToArray();

        EditorUtility.SetDirty(targetData);
        AssetDatabase.SaveAssets();

        return(true);
    }
Example #2
0
    public void ReSet()
    {
        _data          = null;
        typeText.text  = null;
        titleText.text = null;
        rankText.text  = null;

        descriptionText.text = null;

        stroyLineText.text = null;
        rewardText.text    = null;
        closeAllPage();
    }
Example #3
0
    private AnalysisResultsData checkAnalysisResultsData()
    {
        AnalysisResultsData data = new AnalysisResultsData();

        List <string> result = new List <string>();

        string key = null;

        foreach (KeyValuePair <string, int> kvp in summaryDic)
        {
            Debug.Log(string.Format("key = {0}, value = {1}", kvp.Key, kvp.Value));
            switch (kvp.Key)
            {
            case "E":
                pickKey(ref key, "E", "I");
                result.Add(key);
                break;

            case "S":
                pickKey(ref key, "S", "N");
                result.Add(key);
                break;

            case "T":
                pickKey(ref key, "T", "F");
                result.Add(key);
                break;

            case "J":
                pickKey(ref key, "J", "P");
                result.Add(key);
                break;
            }
        }

        string strTemp1 = string.Join("", result.ToArray());

        Debug.Log("result Count = " + result.Count + " result = " + strTemp1);

        List <AnalysisResultsData> lst = _analysisResultsDatas.ToList();

        data = lst.Find(type => type.Type == strTemp1);

        return(data);
    }
Example #4
0
 public void Show(AnalysisResultsData data)
 {
     _data = data;
     SetData();
 }