// returns are special - we need to make sure the keyword gets in there private static string GetXmlGotoFromData(string data) { if (data == null || data.Length == 0) { return(""); } Shadow targetShadow = Common.GetGotoTargetFromData(data); if (targetShadow == null) { return(data); } else { ReturnShadow returnShadow = targetShadow as ReturnShadow; if (returnShadow != null) { return(Strings.ReturnKeyword); } else { return(targetShadow.GetGotoName()); } } }
public static BindingList <CommandTransitionRow> GetRowsFromTable(Table table) { BindingList <CommandTransitionRow> list = new BindingList <CommandTransitionRow>(); for (int row = 0; row < table.GetNumRows(); row++) { CommandTransitionRow ct = new CommandTransitionRow(); ct.Action = table.GetData(row, (int)TableColumns.CommandTransitions.Action); ct.Condition = table.GetData(row, (int)TableColumns.CommandTransitions.Condition); ct.Confirm = table.GetData(row, (int)TableColumns.CommandTransitions.Confirm); ct.DTMF = table.GetData(row, (int)TableColumns.CommandTransitions.DTMF); // stash the real goto data in a hidden column ct.GotoData_TreatAsDateStamp = table.GetData(row, (int)TableColumns.CommandTransitions.Goto); Shadow targetShadow = Common.GetGotoTargetFromData(ct.GotoData_TreatAsDateStamp); if (targetShadow == null) { ct.Goto = ct.GotoData_TreatAsDateStamp; } else { ct.Goto = targetShadow.GetGotoName(); } ct.Option = table.GetData(row, (int)TableColumns.CommandTransitions.Option); ct.Vocab = table.GetData(row, (int)TableColumns.CommandTransitions.Vocab); ct.ActionDateStamp = table.GetData(row, (int)TableColumns.CommandTransitions.ActionDateStamp); ct.ConditionDateStamp = table.GetData(row, (int)TableColumns.CommandTransitions.ConditionDateStamp); ct.ConfirmDateStamp = table.GetData(row, (int)TableColumns.CommandTransitions.ConfirmDateStamp); ct.DTMFDateStamp = table.GetData(row, (int)TableColumns.CommandTransitions.DTMFDateStamp); ct.GotoDateStamp = table.GetData(row, (int)TableColumns.CommandTransitions.GotoDateStamp); ct.OptionDateStamp = table.GetData(row, (int)TableColumns.CommandTransitions.OptionDateStamp); ct.VocabDateStamp = table.GetData(row, (int)TableColumns.CommandTransitions.VocabDateStamp); list.Add(ct); } return(list); }
// returns are special - we need to make sure the keyword gets in there private static string GetXmlGotoFromShadow(Shadow targetShadow) { if (targetShadow == null) { return(Strings.DisconnectedConnectorTarget); } ReturnShadow returnShadow = targetShadow as ReturnShadow; if (returnShadow != null) { return(Strings.ReturnKeyword); } else { return(targetShadow.GetGotoName()); } }
public override string GetGotoName() { string uid = GetSubDialogUID(); if (uid == null || uid.Length == 0) { return(Strings.DisconnectedConnectorTarget); } else { Shadow shadow = PathMaker.LookupShadowByUID(GetSubDialogUID()); if (shadow != null) { return(shadow.GetGotoName()); } else { return(Strings.DisconnectedConnectorTarget); } } }
private static void AddSubDialogElement(XmlDocument xmlDoc, SubDialogShadow shadow) { XmlElement stateElement = CreateElement(xmlDoc.DocumentElement, xmlStrings.SubDialog); stateElement.SetAttribute(xmlStrings.StateId, shadow.GetStateId()); XmlElement startingStateElement = CreateElement(stateElement, xmlStrings.StartingState); Shadow targetShadow = shadow.GetFirstStateTarget(); if (targetShadow == null) { startingStateElement.InnerText = Strings.DisconnectedConnectorTarget; } else { startingStateElement.InnerText = targetShadow.GetGotoName(); } AddReturnList(shadow, stateElement); AddDeveloperNotes(shadow.GetDeveloperNotes(), stateElement); }
private static string CachedGetGotoName(Shadow shadow) { string name; if (gotoNameCache.TryGetValue(shadow, out name)) return name; name = shadow.GetGotoName(); gotoNameCache.Add(shadow, name); return name; }
// returns are special - we need to make sure the keyword gets in there private static string GetXmlGotoFromShadow(Shadow targetShadow) { if (targetShadow == null) return Strings.DisconnectedConnectorTarget; ReturnShadow returnShadow = targetShadow as ReturnShadow; if (returnShadow != null) return Strings.ReturnKeyword; else return targetShadow.GetGotoName(); }