public override async Task <AbstractDialogue> OnMessage(MessageEventArgs args)
        {
            var msgText = args.Message.Text;

            switch (msgText)
            {
            case "My schedule":
            {
                var dialogue = new MyScheduleDialogue2(_sendMessege);
                return(await dialogue.OnMessage(args));
            }

            case "Create a new reservation":
            {
                var dialogue = new CreateRecordDialogue(_sendMessege);
                return(await dialogue.OnMessage(args));
            }

            case "Update or Remove an existing reservation":
            {
                var dialogue = new DeleteUpdateRecordDialogue(_sendMessege);
                return(await dialogue.OnMessage(args));
            }

            default:
            {
                await _sendMessege(_menueMessage, getMainMenuKeyboard());

                return(this);
            }
            }
        }
Ejemplo n.º 2
0
        public async override Task <AbstractDialogue> OnMessage(MessageEventArgs args)
        {
            var msgText = args.Message.Text;

            switch (msgText)
            {
            case "My schedule":
            {
                var dialogue = new MyScheduleDialogue2(_sendMessege);
                return(await dialogue.OnMessage(args));
            }
            break;

            case "Create a new reservation":
            {
                var dialogue = new CreateRecordDialogue(_sendMessege);
                return(await dialogue.OnMessage(args));
            }
            break;

            default:
            {
                ReplyKeyboardMarkup markup = new[]
                {
                    "Create a new reservation",
                    //"Update or Remove an existing reservation",
                    "My schedule"
                };
                await _sendMessege(_menueMessage, markup);

                return(this);
            }
            break;
            }
        }