protected virtual void handleChildChildEntrieEvent(DialogEntry dialogEntry) { if (dialogEntry != null) { var children = dialogEntry.GetChildEntryList(); if (children != null && children.Count > 0) { foreach (var item in children) { registerToEvents(item as DialogEntry); } } } }
/// <summary> /// Initializes a new instance of the <see cref="DialogEntry"/> class. /// </summary> /// <param name="dialogEntry">The dialog entry.</param> public DialogEntry(DialogEntry dialogEntry) { this._id = dialogEntry.ID; this._title = dialogEntry.Title; this._help = dialogEntry.Help; this._type = dialogEntry.Type; this.ParentEntry = dialogEntry.ParentEntry; this.ParentDialog = dialogEntry.ParentDialog; this.Status = dialogEntry.Status; if (Type == DialogEntryType.Group) { childEntries = dialogEntry.GetChildEntryList(); } }
/// <summary> /// Check recursively if the identifier is unique inside the dialog and the parent group if set. /// The id will be extended with '*'. /// </summary> /// <param name="id">The original identifier.</param> /// <param name="parent">The parent group.</param> /// <param name="dialog">The dialog.</param> /// <returns>An more unique identifier.</returns> private static string check4uniqueID(String id, DialogEntry parent, Dialog dialog) { if (dialog != null) { while (!dialog.IsUniqueID(id)) { id += "*"; } } if (parent != null && parent.HasChildren()) { foreach (var item in parent.GetChildEntryList()) { if (item != null && item.ID.Equals(id)) { id += "*"; id = check4uniqueID(id, parent, dialog); return(id); } } } return(id); }