1018 lines
20 KiB
C#
1018 lines
20 KiB
C#
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
namespace YiLiao.SiBuChuZhen
|
|
{
|
|
public class ExcelData
|
|
{
|
|
public List<BaseData> allBaseData = null;
|
|
public List<LanguageData> allLanguageData = null;
|
|
public List<QuestionData> allQuestionData = null;
|
|
public List<StateData> allStateData = null;
|
|
|
|
public IEnumerator Init(string path)
|
|
{
|
|
yield return ExcelDataTools.GetDataList<BaseData>(path,value=>allBaseData = value);
|
|
yield return ExcelDataTools.GetDataList<LanguageData>(path,value=>allLanguageData = value);
|
|
yield return ExcelDataTools.GetDataList<QuestionData>(path,value=>allQuestionData = value);
|
|
yield return ExcelDataTools.GetDataList<StateData>(path,value=>allStateData = value);
|
|
|
|
}
|
|
|
|
public BaseData GetBaseData(int id)
|
|
{
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (allBaseData[i].id == id)
|
|
{
|
|
return allBaseData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public LanguageData GetLanguageData(int id)
|
|
{
|
|
for (int i = 0; i < allLanguageData.Count; i++)
|
|
{
|
|
if (allLanguageData[i].id == id)
|
|
{
|
|
return allLanguageData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public QuestionData GetQuestionData(int id)
|
|
{
|
|
for (int i = 0; i < allQuestionData.Count; i++)
|
|
{
|
|
if (allQuestionData[i].id == id)
|
|
{
|
|
return allQuestionData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public StateData GetStateData(int id)
|
|
{
|
|
for (int i = 0; i < allStateData.Count; i++)
|
|
{
|
|
if (allStateData[i].id == id)
|
|
{
|
|
return allStateData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public BaseData GetBaseDataid(int id)
|
|
{
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (allBaseData[i].id == id)
|
|
{
|
|
return allBaseData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<int> GetListBaseDataid()
|
|
{
|
|
List<int> res = new List<int>();
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (!res.Contains(allBaseData[i].id))
|
|
{
|
|
res.Add(allBaseData[i].id);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public BaseData GetBaseDataname(string name)
|
|
{
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (allBaseData[i].name == name)
|
|
{
|
|
return allBaseData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListBaseDataname()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (!res.Contains(allBaseData[i].name))
|
|
{
|
|
res.Add(allBaseData[i].name);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public BaseData GetBaseDatachildName(string childName)
|
|
{
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (allBaseData[i].childName == childName)
|
|
{
|
|
return allBaseData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListBaseDatachildName()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (!res.Contains(allBaseData[i].childName))
|
|
{
|
|
res.Add(allBaseData[i].childName);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public BaseData GetBaseDataowner(string owner)
|
|
{
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (allBaseData[i].owner == owner)
|
|
{
|
|
return allBaseData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListBaseDataowner()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (!res.Contains(allBaseData[i].owner))
|
|
{
|
|
res.Add(allBaseData[i].owner);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public BaseData GetBaseDataisBtn(string isBtn)
|
|
{
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (allBaseData[i].isBtn == isBtn)
|
|
{
|
|
return allBaseData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListBaseDataisBtn()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (!res.Contains(allBaseData[i].isBtn))
|
|
{
|
|
res.Add(allBaseData[i].isBtn);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public BaseData GetBaseDatamodeType(string modeType)
|
|
{
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (allBaseData[i].modeType == modeType)
|
|
{
|
|
return allBaseData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListBaseDatamodeType()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (!res.Contains(allBaseData[i].modeType))
|
|
{
|
|
res.Add(allBaseData[i].modeType);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public BaseData GetBaseDatatxt(string txt)
|
|
{
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (allBaseData[i].txt == txt)
|
|
{
|
|
return allBaseData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListBaseDatatxt()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (!res.Contains(allBaseData[i].txt))
|
|
{
|
|
res.Add(allBaseData[i].txt);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public BaseData GetBaseDatasound(string sound)
|
|
{
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (allBaseData[i].sound == sound)
|
|
{
|
|
return allBaseData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListBaseDatasound()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (!res.Contains(allBaseData[i].sound))
|
|
{
|
|
res.Add(allBaseData[i].sound);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public BaseData GetBaseDataobj(string obj)
|
|
{
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (allBaseData[i].obj == obj)
|
|
{
|
|
return allBaseData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListBaseDataobj()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (!res.Contains(allBaseData[i].obj))
|
|
{
|
|
res.Add(allBaseData[i].obj);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public BaseData GetBaseDatastate(string state)
|
|
{
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (allBaseData[i].state == state)
|
|
{
|
|
return allBaseData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListBaseDatastate()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (!res.Contains(allBaseData[i].state))
|
|
{
|
|
res.Add(allBaseData[i].state);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public BaseData GetBaseDatavr_hand_materials(string vr_hand_materials)
|
|
{
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (allBaseData[i].vr_hand_materials == vr_hand_materials)
|
|
{
|
|
return allBaseData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListBaseDatavr_hand_materials()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (!res.Contains(allBaseData[i].vr_hand_materials))
|
|
{
|
|
res.Add(allBaseData[i].vr_hand_materials);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public BaseData GetBaseDataanswerObj(string answerObj)
|
|
{
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (allBaseData[i].answerObj == answerObj)
|
|
{
|
|
return allBaseData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListBaseDataanswerObj()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (!res.Contains(allBaseData[i].answerObj))
|
|
{
|
|
res.Add(allBaseData[i].answerObj);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public BaseData GetBaseDatascore(string score)
|
|
{
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (allBaseData[i].score == score)
|
|
{
|
|
return allBaseData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListBaseDatascore()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (!res.Contains(allBaseData[i].score))
|
|
{
|
|
res.Add(allBaseData[i].score);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public BaseData GetBaseDatascore_sx(string score_sx)
|
|
{
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (allBaseData[i].score_sx == score_sx)
|
|
{
|
|
return allBaseData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListBaseDatascore_sx()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (!res.Contains(allBaseData[i].score_sx))
|
|
{
|
|
res.Add(allBaseData[i].score_sx);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public BaseData GetBaseDatasound_kaohe(string sound_kaohe)
|
|
{
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (allBaseData[i].sound_kaohe == sound_kaohe)
|
|
{
|
|
return allBaseData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListBaseDatasound_kaohe()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (!res.Contains(allBaseData[i].sound_kaohe))
|
|
{
|
|
res.Add(allBaseData[i].sound_kaohe);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public BaseData GetBaseDatatxt_kaohe(string txt_kaohe)
|
|
{
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (allBaseData[i].txt_kaohe == txt_kaohe)
|
|
{
|
|
return allBaseData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListBaseDatatxt_kaohe()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (!res.Contains(allBaseData[i].txt_kaohe))
|
|
{
|
|
res.Add(allBaseData[i].txt_kaohe);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public BaseData GetBaseDatatype(string type)
|
|
{
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (allBaseData[i].type == type)
|
|
{
|
|
return allBaseData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListBaseDatatype()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allBaseData.Count; i++)
|
|
{
|
|
if (!res.Contains(allBaseData[i].type))
|
|
{
|
|
res.Add(allBaseData[i].type);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public LanguageData GetLanguageDataid(int id)
|
|
{
|
|
for (int i = 0; i < allLanguageData.Count; i++)
|
|
{
|
|
if (allLanguageData[i].id == id)
|
|
{
|
|
return allLanguageData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<int> GetListLanguageDataid()
|
|
{
|
|
List<int> res = new List<int>();
|
|
for (int i = 0; i < allLanguageData.Count; i++)
|
|
{
|
|
if (!res.Contains(allLanguageData[i].id))
|
|
{
|
|
res.Add(allLanguageData[i].id);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public LanguageData GetLanguageDataChinese(string Chinese)
|
|
{
|
|
for (int i = 0; i < allLanguageData.Count; i++)
|
|
{
|
|
if (allLanguageData[i].Chinese == Chinese)
|
|
{
|
|
return allLanguageData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListLanguageDataChinese()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allLanguageData.Count; i++)
|
|
{
|
|
if (!res.Contains(allLanguageData[i].Chinese))
|
|
{
|
|
res.Add(allLanguageData[i].Chinese);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public LanguageData GetLanguageDataEnglish(string English)
|
|
{
|
|
for (int i = 0; i < allLanguageData.Count; i++)
|
|
{
|
|
if (allLanguageData[i].English == English)
|
|
{
|
|
return allLanguageData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListLanguageDataEnglish()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allLanguageData.Count; i++)
|
|
{
|
|
if (!res.Contains(allLanguageData[i].English))
|
|
{
|
|
res.Add(allLanguageData[i].English);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public LanguageData GetLanguageDataJapanese(string Japanese)
|
|
{
|
|
for (int i = 0; i < allLanguageData.Count; i++)
|
|
{
|
|
if (allLanguageData[i].Japanese == Japanese)
|
|
{
|
|
return allLanguageData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListLanguageDataJapanese()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allLanguageData.Count; i++)
|
|
{
|
|
if (!res.Contains(allLanguageData[i].Japanese))
|
|
{
|
|
res.Add(allLanguageData[i].Japanese);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public LanguageData GetLanguageDataFrench(string French)
|
|
{
|
|
for (int i = 0; i < allLanguageData.Count; i++)
|
|
{
|
|
if (allLanguageData[i].French == French)
|
|
{
|
|
return allLanguageData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListLanguageDataFrench()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allLanguageData.Count; i++)
|
|
{
|
|
if (!res.Contains(allLanguageData[i].French))
|
|
{
|
|
res.Add(allLanguageData[i].French);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public QuestionData GetQuestionDataid(int id)
|
|
{
|
|
for (int i = 0; i < allQuestionData.Count; i++)
|
|
{
|
|
if (allQuestionData[i].id == id)
|
|
{
|
|
return allQuestionData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<int> GetListQuestionDataid()
|
|
{
|
|
List<int> res = new List<int>();
|
|
for (int i = 0; i < allQuestionData.Count; i++)
|
|
{
|
|
if (!res.Contains(allQuestionData[i].id))
|
|
{
|
|
res.Add(allQuestionData[i].id);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public QuestionData GetQuestionDatastate(string state)
|
|
{
|
|
for (int i = 0; i < allQuestionData.Count; i++)
|
|
{
|
|
if (allQuestionData[i].state == state)
|
|
{
|
|
return allQuestionData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListQuestionDatastate()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allQuestionData.Count; i++)
|
|
{
|
|
if (!res.Contains(allQuestionData[i].state))
|
|
{
|
|
res.Add(allQuestionData[i].state);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public QuestionData GetQuestionDataquestion(string question)
|
|
{
|
|
for (int i = 0; i < allQuestionData.Count; i++)
|
|
{
|
|
if (allQuestionData[i].question == question)
|
|
{
|
|
return allQuestionData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListQuestionDataquestion()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allQuestionData.Count; i++)
|
|
{
|
|
if (!res.Contains(allQuestionData[i].question))
|
|
{
|
|
res.Add(allQuestionData[i].question);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public QuestionData GetQuestionDataoption(string option)
|
|
{
|
|
for (int i = 0; i < allQuestionData.Count; i++)
|
|
{
|
|
if (allQuestionData[i].option == option)
|
|
{
|
|
return allQuestionData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListQuestionDataoption()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allQuestionData.Count; i++)
|
|
{
|
|
if (!res.Contains(allQuestionData[i].option))
|
|
{
|
|
res.Add(allQuestionData[i].option);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public QuestionData GetQuestionDataanswer(string answer)
|
|
{
|
|
for (int i = 0; i < allQuestionData.Count; i++)
|
|
{
|
|
if (allQuestionData[i].answer == answer)
|
|
{
|
|
return allQuestionData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListQuestionDataanswer()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allQuestionData.Count; i++)
|
|
{
|
|
if (!res.Contains(allQuestionData[i].answer))
|
|
{
|
|
res.Add(allQuestionData[i].answer);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public QuestionData GetQuestionDataanalysis(string analysis)
|
|
{
|
|
for (int i = 0; i < allQuestionData.Count; i++)
|
|
{
|
|
if (allQuestionData[i].analysis == analysis)
|
|
{
|
|
return allQuestionData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListQuestionDataanalysis()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allQuestionData.Count; i++)
|
|
{
|
|
if (!res.Contains(allQuestionData[i].analysis))
|
|
{
|
|
res.Add(allQuestionData[i].analysis);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public QuestionData GetQuestionDatascore(string score)
|
|
{
|
|
for (int i = 0; i < allQuestionData.Count; i++)
|
|
{
|
|
if (allQuestionData[i].score == score)
|
|
{
|
|
return allQuestionData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListQuestionDatascore()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allQuestionData.Count; i++)
|
|
{
|
|
if (!res.Contains(allQuestionData[i].score))
|
|
{
|
|
res.Add(allQuestionData[i].score);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public QuestionData GetQuestionDatatype(string type)
|
|
{
|
|
for (int i = 0; i < allQuestionData.Count; i++)
|
|
{
|
|
if (allQuestionData[i].type == type)
|
|
{
|
|
return allQuestionData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListQuestionDatatype()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allQuestionData.Count; i++)
|
|
{
|
|
if (!res.Contains(allQuestionData[i].type))
|
|
{
|
|
res.Add(allQuestionData[i].type);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public QuestionData GetQuestionDataremark(string remark)
|
|
{
|
|
for (int i = 0; i < allQuestionData.Count; i++)
|
|
{
|
|
if (allQuestionData[i].remark == remark)
|
|
{
|
|
return allQuestionData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListQuestionDataremark()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allQuestionData.Count; i++)
|
|
{
|
|
if (!res.Contains(allQuestionData[i].remark))
|
|
{
|
|
res.Add(allQuestionData[i].remark);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public StateData GetStateDataid(int id)
|
|
{
|
|
for (int i = 0; i < allStateData.Count; i++)
|
|
{
|
|
if (allStateData[i].id == id)
|
|
{
|
|
return allStateData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<int> GetListStateDataid()
|
|
{
|
|
List<int> res = new List<int>();
|
|
for (int i = 0; i < allStateData.Count; i++)
|
|
{
|
|
if (!res.Contains(allStateData[i].id))
|
|
{
|
|
res.Add(allStateData[i].id);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public StateData GetStateDatastate(string state)
|
|
{
|
|
for (int i = 0; i < allStateData.Count; i++)
|
|
{
|
|
if (allStateData[i].state == state)
|
|
{
|
|
return allStateData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListStateDatastate()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allStateData.Count; i++)
|
|
{
|
|
if (!res.Contains(allStateData[i].state))
|
|
{
|
|
res.Add(allStateData[i].state);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public StateData GetStateDatatrigger(string trigger)
|
|
{
|
|
for (int i = 0; i < allStateData.Count; i++)
|
|
{
|
|
if (allStateData[i].trigger == trigger)
|
|
{
|
|
return allStateData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListStateDatatrigger()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allStateData.Count; i++)
|
|
{
|
|
if (!res.Contains(allStateData[i].trigger))
|
|
{
|
|
res.Add(allStateData[i].trigger);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
public StateData GetStateDataremark(string remark)
|
|
{
|
|
for (int i = 0; i < allStateData.Count; i++)
|
|
{
|
|
if (allStateData[i].remark == remark)
|
|
{
|
|
return allStateData[i];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<string> GetListStateDataremark()
|
|
{
|
|
List<string> res = new List<string>();
|
|
for (int i = 0; i < allStateData.Count; i++)
|
|
{
|
|
if (!res.Contains(allStateData[i].remark))
|
|
{
|
|
res.Add(allStateData[i].remark);
|
|
}
|
|
}
|
|
return res;
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|