public static CommandResult AsFailed(string message, InlineMenu inlineMenu = null, bool update = false) => new CommandResult { ErrorMessage = message, InlineMenu = inlineMenu, UpdatePreviousMessage = update, };
protected override async Task Default() { var exist = await viewModel.CheckAccountExist(); if (!exist) { var createUrl = await viewModel.GetCreateUrl(); var inlineMenu = new InlineMenu { Text = "Register", Keyboard = new InlineKeyboardMarkup(new[] { new[] { new InlineKeyboardButton { Text = "Create account", CallbackData = CallBack.RootPage.ToString(), Url = createUrl } } }) }; viewModel.SendInlineKeyboard?.Execute(inlineMenu); } else { viewModel.RemoteState.Execute(); } }
protected override Task Default() { var inlineMenu = new InlineMenu { Text = "Document List:", Keyboard = new InlineKeyboardMarkup(new[] { new[] { new InlineKeyboardButton { Text = "1 Doc", CallbackData = CallBack.RootPage.ToString() }, new InlineKeyboardButton { Text = "2 Doc", CallbackData = CallBack.RootPage.ToString() } } }) }; viewModel.SendInlineKeyboard.Execute(inlineMenu); return(base.Default()); }
public static async void NewVoteButtonCallback(Message message, TelegramBotClient bot, object arg) { try { if ((message.Chat.Id != 422672483 && message.Chat.Id != 387628875 && message.From.Username != "gridmer")) { return; } int hash = message.Text.GetHashCode(); var menu = new InlineMenu("", new InlineKeyboardButton[][] { new InlineKeyboardButton[] { CommandsCenter.GetInlineButton(hash + "retry").Button, CommandsCenter.GetInlineButton(hash + "delete").Button } }); await bot.SendTextMessageAsync(message.Chat.Id, VoteSystem.GetVotesNames(message.Text).First(), ParseMode.Markdown, false, false, 0, menu.Keyboard); } catch { await bot.SendTextMessageAsync(message.Chat.Id, "*Опрос закрыт или не создан*"); } }
private static void GoToBeginning(CallbackQueryEventArgs callbackQueryEventArgs) { if (callbackQueryEventArgs.CallbackQuery.Data == "Начало") { InlineMenu inlineMenu = new InlineMenu(); inlineMenu.RunCreatingProcess(callbackQueryEventArgs); } }
private static InlineMenu CreateMenu(ICommandSyntax commandSyntax, string letterId) { var processCommandName = commandSyntax.GetCommandName <ProcessLetterCommandExecutor>(); var builder = InlineMenu.Build(); builder.AddRow().WithCell("Обработано", processCommandName, letterId); return(builder.Create()); }
public static void CreateStartStatement(MessageEventArgs messageEventArgs) { var userId = messageEventArgs.Message.From.Id; var firstName = messageEventArgs.Message.From.FirstName; CreateKeyboardButtons(userId, firstName); var inlineMenu = new InlineMenu(); inlineMenu.RunCreatingProcess(messageEventArgs, true); }
private static InlineMenu CreateMenu(ICommandSyntax commandSyntax) { var organizeCommandName = commandSyntax.GetCommandName <OrganizeCommandExecutor>(); var findCommandName = commandSyntax.GetCommandName <FindCommandExecutor>(); var builder = InlineMenu.Build(); builder.AddRow().WithCell("Организовать", organizeCommandName); builder.AddRow().WithCell("Узнать", findCommandName); return(builder.Create()); }
public static (int x, int y, int z) GetInlineButton(this MenuBlock block, string callName) { for (int k = 0; k < block.Length; k++) { InlineMenu menu = block[k] as InlineMenu; var pos = menu.GetButton(callName); if (pos.x != -1 && pos.y != -1) { return(k, pos.x, pos.y); } } return(-1, -1, -1); }
protected InlineMenu CreateLawsuitsMenu(ICommandSyntax syntax, IEnumerable <string> lawsuits) { var commandName = syntax.GetCommandName(GetType()); var beginCommandName = syntax.GetCommandName <DefaultStartSuperCommandExecutor>(); var builder = InlineMenu.Build(); foreach (var lawsuit in lawsuits.OrderBy(x => x)) { builder.AddRow().WithCell(lawsuit, commandName, CreateCommandArg(lawsuit)); } builder.AddRow().WithCell("Все", commandName, "all"); builder.AddRow().WithCell("В начало", beginCommandName); return(builder.Create()); }
public static (int x, int y) GetButton(this InlineMenu menu, string callName) { for (int i = 0; i < ((InlineKeyboardMarkup)menu.Keyboard).InlineKeyboard.Length; i++) { for (int j = 0; j < menu[i].Length; j++) { if ((menu[i, j] as InlineKeyboardCallbackButton).CallbackData == callName) { return(i, j); } } } return(-1, -1); }
public static CommandResult AsSucceed(string response = null, bool useMarkdown = false, InlineMenu inlineMenu = null, bool update = false, byte[] fileContent = null, string fileName = null, string photoId = null, long?chatId = null) => new CommandResult { Success = true, Response = response ?? "Сделано!", UseMarkdown = useMarkdown, InlineMenu = inlineMenu, UpdatePreviousMessage = update, FileContent = fileContent, FileName = fileName, PhotoId = photoId, ChatId = chatId };
public InlineKeyboardMarkup Build(InlineMenu menu) { if (menu == null) { return(null); } return(new InlineKeyboardMarkup( menu.Grid.Select(row => row.Cells.Select(cell => { var commandLine = commandGenerator.Generate(cell.CommandName, cell.CommandArgs); return InlineKeyboardButton.WithCallbackData(cell.Title, commandLine); }) ))); }
private static void HandleMessageTypeText(string sender, MessageEventArgs messageEventArgs) { var userId = messageEventArgs.Message.From.Id; var message = messageEventArgs.Message.Text; Console.WriteLine($"{sender} отправил текстовое сообщение: {message}", true, Encoding.Unicode); AdminCommandHandler.HandleAdminCommands(messageEventArgs); var keyCommands = new[] { "/admin", "/appoint", "/timetable", "/message" }; if (DataBaseContextAdmin.GetCommandId(userId) != (int)AdminCommandStep.Default) { return; } switch (message.ToLower().Trim()) { case "/start": DataBaseContext.RegisterUser(messageEventArgs); TextMessageProcessor.CreateStartStatement(messageEventArgs); break; case "меню": var inlineMenu = new InlineMenu(); inlineMenu.RunCreatingProcess(messageEventArgs, true); break; case "контакты": TextMessageProcessor.SendContacts(userId); break; case "заказать звонок": break; case "показать на карте": TextMessageProcessor.ShowInTheMap(userId); break; default: if (!keyCommands.Contains(message)) { TextMessageProcessor.SendAiAnswer(userId, message); } break; } }
private InlineMenu CreateMenu(ICommandSyntax commandSyntax, string lawsuit) { var startCommandName = commandSyntax.GetCommandName <DefaultStartSuperCommandExecutor>(); var findCommandName = commandSyntax.GetCommandName <FindCommandExecutor>(); var downloadPosterCommandName = commandSyntax.GetCommandName <DownloadPosterCommandExecutor>(); var lawsuitPosters = GetLawsuitPosterIds(lawsuit).ToArray(); var builder = InlineMenu.Build(); builder.AddRow().WithCell("Найти другого узника совести", findCommandName); if (lawsuitPosters.Any()) { builder.AddRow().WithCell("Скачать плакат для печати", downloadPosterCommandName, lawsuitPosters[0]); } builder.AddRow().WithCell("В начало", startCommandName); return(builder.Create()); }
protected InlineMenu CreateMenu(Command command, ICommandSyntax commandSyntax) { var startCommandName = commandSyntax.GetCommandName <DefaultStartSuperCommandExecutor>(); var organizeCommandName = commandSyntax.GetCommandName <OrganizeCommandExecutor>(); var downloadListCommandName = commandSyntax.GetCommandName <DownloadListCommandExecutor>(); var downloadPosterCommandName = commandSyntax.GetCommandName <DownloadPosterCommandExecutor>(); var lawsuit = command.Args[0]; var lawsuitPosters = GetLawsuitPosterIds(lawsuit).ToArray(); var builder = InlineMenu.Build(); builder.AddRow().WithCell("Найти другую группу", organizeCommandName); builder.AddRow().WithCell("Скачать cписок для печати", downloadListCommandName, lawsuit); if (lawsuitPosters.Any()) { builder.AddRow().WithCell("Скачать плакат для печати", downloadPosterCommandName, lawsuitPosters[0]); } builder.AddRow().WithCell("В начало", startCommandName); return(builder.Create()); }
protected InlineMenu CreateMenu(ICommandSyntax commandSyntax, string personId) { var startCommandName = commandSyntax.GetCommandName <DefaultStartSuperCommandExecutor>(); var findCommandName = commandSyntax.GetCommandName <FindCommandExecutor>(); var downloadCardCommandName = commandSyntax.GetCommandName <DownloadCardCommandExecutor>(); var downloadPosterCommandName = commandSyntax.GetCommandName <DownloadPosterCommandExecutor>(); var personPosters = GetPersonPosters(personId).ToArray(); var builder = InlineMenu.Build(); builder.AddRow().WithCell("Найти другого узника совести", findCommandName); builder.AddRow().WithCell("Скачать карточку для печати", downloadCardCommandName); if (personPosters.Any()) { builder.AddRow().WithCell("Скачать плакат для печати", downloadPosterCommandName, personPosters[0]); } builder.AddRow().WithCell("В начало", startCommandName); return(builder.Create()); }
protected override async Task Default() { var url = await viewModel.GetUrl(); var inlineMenu = new InlineMenu { Text = "Create document:", Keyboard = new InlineKeyboardMarkup(new[] { new[] { new InlineKeyboardButton { Text = "Create", CallbackData = CallBack.RootPage.ToString(), Url = url } } }) }; viewModel.SendInlineKeyboard.Execute(inlineMenu); }
public async Task <object> PostDocumentData([FromBody] DocumentDto documentDto, string guid) { var isGuidValid = await guidService.ValidateString(guid); if (!isGuidValid) { var res = Json(new { error = "Guid is not exist", result = default(string) }) .Value; return(NotFound(res)); } var guidStamp = await guidService.GetGuidStamp(guid); var waves = guidStamp.WavesData; var owner = await userDataRepository.ReadAsync(waves.MyNickname); var partner = await userDataRepository.ReadAsync(waves.PartnerNickname); var ownerData = new DocumentData { Identifier = owner.Identifier, DocumentId = documentDto.DocumentId, }; var partnerData = new DocumentData { Identifier = partner.Identifier, DocumentId = documentDto.DocumentId, }; await documentDataRepository.CreateAsync(ownerData); await documentDataRepository.CreateAsync(partnerData); var urlGuid = await guidService.GenerateString(partner.Identifier, partner.NickName); var inlineMenu = new InlineMenu { Text = "Подпишите транзакцию", Keyboard = new InlineKeyboardMarkup(new[] { new[] { new InlineKeyboardButton { Text = "Подписать", CallbackData = CallBack.RootPage.ToString(), Url = $"{configuration.BlockChainAddress}/sign/?create={urlGuid}" } } }) }; await botService.Client.SendTextMessageAsync(partner.Identifier, inlineMenu.Text, ParseMode.Markdown, replyMarkup : inlineMenu.Keyboard); await BotClient.SendTextMessageAsync(partner.Identifier, $"Документ отправлен {partner.NickName} на подпись"); return(Json(new { error = default(string), result = "success" })); }
public static void HandleCallbackQuery(string sender, CallbackQueryEventArgs callbackQueryEventArgs) { var stepId = DataBaseContext.GetStepId(callbackQueryEventArgs.CallbackQuery.From.Id); ShowUsersActions(sender, callbackQueryEventArgs); switch (stepId) { case (int)InlinePanelStep.Brands: if (callbackQueryEventArgs.CallbackQuery.Data == "Список брендов") { InlineListBrands inlineListBrands = new InlineListBrands(); inlineListBrands.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Инфо") { InlineInfoBrands inlineInfoBrands = new InlineInfoBrands(); inlineInfoBrands.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Catalog1: if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlineCatPrice inlineCatPrice = new InlineCatPrice(); inlineCatPrice.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Далее") { InlineCatalog2 inlineCatalog2 = new InlineCatalog2(); inlineCatalog2.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Catalog2: if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlineCatalog1 inlineCatalog1 = new InlineCatalog1(); inlineCatalog1.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Далее") { InlineCatalog3 inlineCatalog3 = new InlineCatalog3(); inlineCatalog3.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Catalog3: if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlineCatalog2 inlineCatalog2 = new InlineCatalog2(); inlineCatalog2.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Далее") { InlineCatalog4 inlineCatalog4 = new InlineCatalog4(); inlineCatalog4.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Catalog4: if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlineCatalog3 inlineCatalog3 = new InlineCatalog3(); inlineCatalog3.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.CatPrice: if (callbackQueryEventArgs.CallbackQuery.Data == "Каталоги продукции") { InlineCatalog1 inlineCatalog1 = new InlineCatalog1(); inlineCatalog1.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Прайс листы") { InlinePriceList1 inlinePriceList1 = new InlinePriceList1(); inlinePriceList1.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Company: GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Contacts: GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Discount: GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.InfoBrands: if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlineBrands inlineBrands = new InlineBrands(); inlineBrands.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.ListBrands: if (callbackQueryEventArgs.CallbackQuery.Data == "Каталоги и прайсы") { InlineCatPrice inlineCatPrice = new InlineCatPrice(); inlineCatPrice.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlineBrands inlineBrands = new InlineBrands(); inlineBrands.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Major: if (callbackQueryEventArgs.CallbackQuery.Data == "Виды продукции") { InlineTypesProduct inlineTypesProduct = new InlineTypesProduct(); inlineTypesProduct.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Коротко о компании") { InlineShort inlineShort = new InlineShort(); inlineShort.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Причины работать с нами") { InlineReasons inlineReasons = new InlineReasons(); inlineReasons.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Расписание рейсов") { InlineTimetable inlineTimetable = new InlineTimetable(); inlineTimetable.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Menu: if (callbackQueryEventArgs.CallbackQuery.Data == "Главная") { InlineMajor inlineMajor = new InlineMajor(); inlineMajor.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Бренды") { InlineBrands inlineBrands = new InlineBrands(); inlineBrands.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Каталоги и прайсы") { InlineCatPrice inlineCatPrice = new InlineCatPrice(); inlineCatPrice.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Акции") { InlineDiscount inlineDiscount = new InlineDiscount(); inlineDiscount.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "О компании") { InlineCompany inlineCompany = new InlineCompany(); inlineCompany.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Новости") { InlineNews inlineNews = new InlineNews(); inlineNews.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Контакты") { InlineContacts inlineContacts = new InlineContacts(); inlineContacts.RunCreatingProcess(callbackQueryEventArgs); } break; case (int)InlinePanelStep.News: GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.PriceList1: if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlineCatPrice inlineCatPrice = new InlineCatPrice(); inlineCatPrice.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Далее") { InlinePriceList2 inlinePriceList2 = new InlinePriceList2(); inlinePriceList2.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.PriceList2: if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlinePriceList1 inlinePriceList1 = new InlinePriceList1(); inlinePriceList1.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Далее") { InlinePriceList3 inlinePriceList3 = new InlinePriceList3(); inlinePriceList3.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.PriceList3: if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlinePriceList2 inlinePriceList2 = new InlinePriceList2(); inlinePriceList2.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Reason1: if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlineReasons inlineReasons = new InlineReasons(); inlineReasons.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Reason2: if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlineReasons inlineReasons = new InlineReasons(); inlineReasons.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Reason3: if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlineReasons inlineReasons = new InlineReasons(); inlineReasons.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Reason4: if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlineReasons inlineReasons = new InlineReasons(); inlineReasons.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Reason5: if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlineReasons inlineReasons = new InlineReasons(); inlineReasons.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Reason6: if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlineReasons inlineReasons = new InlineReasons(); inlineReasons.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Reason7: if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlineReasons inlineReasons = new InlineReasons(); inlineReasons.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Reason8: if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlineReasons inlineReasons = new InlineReasons(); inlineReasons.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Reasons: if (callbackQueryEventArgs.CallbackQuery.Data == "Низкие цены") { InlineReason1 inlineReason1 = new InlineReason1(); inlineReason1.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Бесплатная доставка") { InlineReason2 inlineReason2 = new InlineReason2(); inlineReason2.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Склад в Краснодаре") { InlineReason3 inlineReason3 = new InlineReason3(); inlineReason3.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Широчайший ассортимент") { InlineReason4 inlineReason4 = new InlineReason4(); inlineReason4.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Мы не срываем сроки") { InlineReason5 inlineReason5 = new InlineReason5(); inlineReason5.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Профессиональные сотрудники") { InlineReason6 inlineReason6 = new InlineReason6(); inlineReason6.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Гарантия качества") { InlineReason7 inlineReason7 = new InlineReason7(); inlineReason7.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Маркетинговая поддержка") { InlineReason8 inlineReason8 = new InlineReason8(); inlineReason8.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlineMajor inlineMajor = new InlineMajor(); inlineMajor.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Short: if (callbackQueryEventArgs.CallbackQuery.Data == "Подробнее о компании") { InlineCompany inlineCompany = new InlineCompany(); inlineCompany.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Каталоги и прайсы") { InlineCatPrice inlineCatPrice = new InlineCatPrice(); inlineCatPrice.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlineMajor inlineMajor = new InlineMajor(); inlineMajor.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.Timetable: if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlineMajor inlineMajor = new InlineMajor(); inlineMajor.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; case (int)InlinePanelStep.TypesProduct: if (callbackQueryEventArgs.CallbackQuery.Data == "Перейти к каталогу") { InlineCatPrice inlineCatPrice = new InlineCatPrice(); inlineCatPrice.RunCreatingProcess(callbackQueryEventArgs); } if (callbackQueryEventArgs.CallbackQuery.Data == "Назад") { InlineMajor inlineMajor = new InlineMajor(); inlineMajor.RunCreatingProcess(callbackQueryEventArgs); } GoToBeginning(callbackQueryEventArgs); break; default: InlineMenu inlineMenu = new InlineMenu(); inlineMenu.RunCreatingProcess(callbackQueryEventArgs); break; } }