示例#1
0
 // 构造函数
 public HLHSentenceAndPoem(int proverbID, string proverbEN, string proverbCH, HLHSAPType type)
 {
     this.sapID   = proverbID;
     this.sapEN   = proverbEN;
     this.sapCH   = proverbCH;
     this.sapType = type;
 }
        private static HLHSentenceAndPoem GenerateHLHProverb(string sapData)
        {
            Debug.Log(sapData);

            string[] dataArray = sapData.Split(new char[] { ',' }, System.StringSplitOptions.RemoveEmptyEntries);

            int        proverbID = int.Parse(dataArray[0]);
            string     proverbEN = dataArray[1].Replace('+', ',').Replace('#', '\n').Replace('^', '\"');
            string     proverbCH = dataArray[2].Replace('+', ',').Replace('#', '\n').Replace('^', '\"');
            HLHSAPType type      = (HLHSAPType)int.Parse(dataArray[3]);

            return(new HLHSentenceAndPoem(proverbID, proverbEN, proverbCH, type));
        }