/// <summary> /// DisagreeContentBuilderクラスの新しいインスタンスを初期化します /// </summary> /// <param name="utteranceType">不同意される発話の種類.</param> /// <param name="talkDay">不同意される発話の発話日</param> /// <param name="talkID">不同意される発話のID</param> #else /// <summary> /// Initializes a new instance of DisagreeContentBuilder. /// </summary> /// <param name="utteranceType">The type of the utterance disagreed with.</param> /// <param name="talkDay">The day of the utterance disagreed with.</param> /// <param name="talkID">The ID of the utterance disagreed with.</param> #endif public DisagreeContentBuilder(UtteranceType utteranceType, int talkDay, int talkID) { Topic = Topic.DISAGREE; if (utteranceType == UtteranceType.TALK) { Utterance = new Talk(talkID, talkDay); } else { Utterance = new Whisper(talkID, talkDay); } }
/* * Use the Skill and Strategy Selection to set the Utterances */ public int SetUtterancesList(participantDetails participant, TaskStep taskstepdata, ListBox listBox, UtteranceType type, int strategy, int activeStepID, int firstActivityStep, SkillSelection skillSelection, List<UtteranceSet> ut) { listBox.Items.Clear(); int counter = 0; int problemCounter = 0; foreach (XmlNode node in nodes) { if (node.SelectSingleNode("strategy") != null && node.SelectSingleNode("skill") != null && node.SelectSingleNode("dynamic") != null) { if (type == UtteranceType.FEEDBACK) { if (int.Parse(node.SelectSingleNode("strategy").InnerText) == strategy) { if (int.Parse(node.SelectSingleNode("strategy").InnerText) == 4) // Requestion { if (int.Parse(node.SelectSingleNode("skill").InnerText) == GetTaskScriptOffset(activeStepID)) { UtteranceSet utterance = new UtteranceSet(); utterance = ProcessUtterance(participant, taskstepdata, node, skillSelection); ut.Add(utterance); AddUtteranceItem(utterance, listBox, utterance.mText); counter++; } } else if (int.Parse(node.SelectSingleNode("skill").InnerText) == skillSelection.mSkill || skillSelection.mSkill == 0 || strategy > 9) //Allow Generic Behaviours { UtteranceSet utterance = new UtteranceSet(); utterance = ProcessUtterance(participant, taskstepdata, node, skillSelection); ut.Add(utterance); AddUtteranceItem(utterance, listBox, utterance.mText); counter++; } } } } else { string[] info = new string[3]; info[0] = "O.K"; info[1] = "O.K"; info[2] = "O.K"; if (node.SelectSingleNode("strategy") == null) info[0] = "NULL"; if (node.SelectSingleNode("skill") == null) info[1] = "NULL"; if (node.SelectSingleNode("dynamic") == null) info[2] = "NULL"; Console.WriteLine("Something Missing == ID = " + problemCounter.ToString() + " TYPE = " + type + info[0] + "," + info[1] + "," + info[2]); } problemCounter++; } if (counter == 0) { UtteranceSet utterance = new UtteranceSet(); utterance.mText = "There is nothing to choose from here?"; utterance.mNonTaggedText = "There is nothing to choose from here?"; ut.Add(utterance); AddUtteranceItem(utterance, listBox, utterance.mText); counter++; } return counter; }