Example #1
0
 public RegistrationDialog(Rd.Dialog dialog, Dialog owner) :
     base(dialog, owner)
 {
     // set operation anyway
     Operation = BotManager.Core.Repository.CreteRegistrationOp();
     Path      = RootPath;
 }
Example #2
0
        /// <summary>
        /// Good old recursion again initialize dialogs tree
        /// </summary>
        private List <Dialog> InitializeSubDialogs(Rd.Dialog dialog, Dialog owner)
        {
            List <Dialog> result = new List <Dialog>();

            foreach (var dia in dialog.Dialogs)
            {
                Dialog d = new Dialog(dia, owner);
                result.Add(d);
            }

            return(result);
        }
Example #3
0
        public Dialog(Rd.Dialog dialog, Dialog owner) : this(dialog.Id)
        {
            if (dialog.Data.IsBloated(26))
            {
                throw new Exception($"Data lenght cant exceed size of 26 chars!\r\nDialog/Button Id = '{dialog.Id}'");
            }

            DisplayedName   = dialog.Name;
            Content         = dialog.Message?.FirstOrDefault();
            Data            = dialog.Data;
            DisplayPriority = dialog.DisplayPriority;
            Dialogs         = InitializeSubDialogs(dialog, this);

            Owner     = owner;
            Operation = BotManager.Core.Operations.GetOperation(dialog.Operation, BotManager.Core.IsEditor);
        }
Example #4
0
 public RootDialog(Rd.Dialog dialog) : base(dialog, null)
 {
     Path = RootPath;
 }
Example #5
0
 public SerialDialog(Rd.Dialog dialog, Dialog owner) : base(dialog, owner)
 {
 }