public Word(String letter, String meaning, int wordState, String memo, int boxNumber, String timeString) { this.letter = letter; this.meaning = meaning; this.wordState = wordState; this.memo = memo; this.boxAttribute = new BoxAttribute(boxNumber, timeString); }
public void ProcessWordAfterExam(bool isRightAnswer, int examIndex) { exam.SetIsRetakeTarget(examIndex, !(isRightAnswer)); if (isRightAnswer) { exam.UpdateWordState(examIndex); } BoxAttribute boxAttribute = this.exam.GetBoxRuleOfWord(examIndex); int boxRuleNum = this.GroupInformation.GroupRule[this.currentGroupNum]; this.boxRules[boxRuleNum].ProcessBoxRule(isRightAnswer, boxAttribute); }
public Word(String input) { int boxNumber; String timeString; String[] splitString = input.Split('\t'); this.letter = splitString[0]; this.meaning = splitString[1]; this.wordState = Convert.ToInt32(splitString[2]); this.memo = splitString[3]; boxNumber = Convert.ToInt32(splitString[4]); timeString = splitString[5]; this.boxAttribute = new BoxAttribute(boxNumber, timeString); }
public int processBoxRule(bool isRightAnswer, BoxAttribute boxattribute) { if (isRightAnswer) { boxattribute.BoxNumber = this.rightObjectBox; boxattribute.TimeString = processTime(this.isRightTimeRelatively, boxattribute.TimeString, this.rightTimeString); return(boxattribute.BoxNumber); } else { boxattribute.BoxNumber = this.wrongObjectBox; boxattribute.TimeString = processTime(this.isWrongTimeRelatively, boxattribute.TimeString, this.wrongTimeString); return(boxattribute.BoxNumber); } }
public void ProcessBoxRule(bool isRightAnswer, BoxAttribute boxAttribute) { int resultBoxNumber; if (boxAttribute.BoxNumber != 100 && box[boxAttribute.BoxNumber] != null) { resultBoxNumber = this.box[boxAttribute.BoxNumber].processBoxRule(isRightAnswer, boxAttribute); if (box[resultBoxNumber] == null) { boxAttribute.BoxNumber = 100; boxAttribute.TimeString = "99-12-30-23-59"; } } else { boxAttribute.BoxNumber = 100; } }