public static void GoogleSetCard(this ITurnContext context, string title,
                                         string subtitle, Image image, ImageDisplayOptions imageDisplayOptions,
                                         string formattedText)
        {
            if (image == null && formattedText == null)
            {
                throw new Exception("A Basic Card should have either an Image or Formatted Text set");
            }

            var card = new GoogleBasicCard()
            {
                Content = new GoogleBasicCardContent()
                {
                    Title         = "This is the card title",
                    Subtitle      = "This is the card subtitle",
                    FormattedText = "This is some text to go into the card." +
                                    "**This text should be bold** and " +
                                    "*this text should be italic*.",
                    Display = ImageDisplayOptions.DEFAULT,
                    Image   = new Image()
                    {
                        AccessibilityText = "This is the accessibility text",
                        Url = "https://dev.botframework.com/Client/Images/ChatBot-BotFramework.png"
                    },
                },
            };

            context.TurnState.Add("GoogleCard", card);
        }
        public static void GoogleSetCard(this ITurnContext context, string title,
                                         string subtitle, Image image, ImageDisplayOptions imageDisplayOptions,
                                         string formattedText)
        {
            if (image == null && formattedText == null)
            {
                throw new Exception("A Basic Card should have either an Image or Formatted Text set");
            }

            // Fixed
            var card = new GoogleBasicCard()
            {
                Content = new GoogleBasicCardContent()
                {
                    Title         = title,
                    Subtitle      = subtitle,
                    FormattedText = formattedText,
                    Display       = ImageDisplayOptions.DEFAULT,
                    Image         = image
                },
            };

            // Just leaving this as commented to give developers a glimpse of implementation.
            //var card = new GoogleBasicCard()
            //{
            //    Content = new GoogleBasicCardContent()
            //    {
            //        Title = "This is the card title",
            //        Subtitle = "This is the card subtitle",
            //        FormattedText = "This is some text to go into the card." +
            //                        "**This text should be bold** and " +
            //                        "*this text should be italic*.",
            //        Display = ImageDisplayOptions.DEFAULT,
            //        Image = new Image()
            //        {
            //            AccessibilityText = "This is the accessibility text",
            //            Url = "https://dev.botframework.com/Client/Images/ChatBot-BotFramework.png"
            //        },
            //    },
            //};

            context.TurnState.Add("GoogleCard", card);
        }
        protected override IResultProvider GetRevertDialog()
        {
            IActionNotification revertDialog = this.RevertConfirmator.LordOfNotifications.CreateActionNotification(
                this.revertDialogHeader,
                "Revert value");

            revertDialog.LayoutType = ImageTextOrder.HorizontalTextImage;

            TextDisplayOptions headerTextDisplayStyle = revertDialog.HeaderTextDisplayStyle;

            headerTextDisplayStyle.Margins = new Thickness(5, 0, 0, 10);
            headerTextDisplayStyle.Size    = 14;

            revertDialog.ButtonImage = this.GetUndoImage();
            ImageDisplayOptions imageDisplayOptions = revertDialog.ButtonImageDisplayOptions;

            imageDisplayOptions.Margins = new Thickness(20, 0, 0, 0);
            imageDisplayOptions.Height  = imageDisplayOptions.Width = 48;

            revertDialog.ButtonTextDisplayStyle.Size    = 18;
            revertDialog.ButtonTextDisplayStyle.Margins = new Thickness(15, 0, 0, 0);
            return(revertDialog);
        }
 public BasicCardResponse SetImageDisplayOptions(ImageDisplayOptions options)
 {
     BasicCard.ImageDisplayOptions = options;
     return(this);
 }