Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

CarouselCardsScorable.cs 4.2 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
  1. namespace TestBot.Scorables
  2. {
  3. using System.Collections.Generic;
  4. using Microsoft.Bot.Builder.Dialogs.Internals;
  5. using Microsoft.Bot.Connector;
  6. public class CarouselCardsScorable : RichCardScorable
  7. {
  8. public CarouselCardsScorable(IBotToUser botToUser, IBotData botData) : base(botToUser, botData)
  9. {
  10. }
  11. public override string Trigger
  12. {
  13. get
  14. {
  15. return "Carousel";
  16. }
  17. }
  18. protected override IList<Attachment> GetCardAttachments()
  19. {
  20. return new List<Attachment>
  21. {
  22. new HeroCard
  23. {
  24. Title = "BotFramework Hero Card",
  25. Subtitle = "Your bots — wherever your users are talking",
  26. Text = "Build and connect intelligent bots to interact with your users naturally wherever they are, from text/sms to Skype, Slack, Office 365 mail and other popular services.",
  27. Images = new List<CardImage> { new CardImage("https://sec.ch9.ms/ch9/7ff5/e07cfef0-aa3b-40bb-9baa-7c9ef8ff7ff5/buildreactionbotframework_960.jpg") },
  28. Buttons = new List<CardAction> { new CardAction(ActionTypes.OpenUrl, "Get Started", value: "https://docs.microsoft.com/bot-framework") }
  29. }.ToAttachment(),
  30. new ThumbnailCard
  31. {
  32. Title = "BotFramework Thumbnail Card",
  33. Subtitle = "Your bots — wherever your users are talking",
  34. Text = "Build and connect intelligent bots to interact with your users naturally wherever they are, from text/sms to Skype, Slack, Office 365 mail and other popular services.",
  35. Images = new List<CardImage> { new CardImage("https://sec.ch9.ms/ch9/7ff5/e07cfef0-aa3b-40bb-9baa-7c9ef8ff7ff5/buildreactionbotframework_960.jpg") },
  36. Buttons = new List<CardAction> { new CardAction(ActionTypes.OpenUrl, "Get Started", value: "https://docs.microsoft.com/bot-framework") }
  37. }.ToAttachment(),
  38. new AnimationCard
  39. {
  40. Title = "Microsoft Bot Framework",
  41. Subtitle = "Animation Card",
  42. Image = new ThumbnailUrl
  43. {
  44. Url = "https://docs.microsoft.com/en-us/bot-framework/media/how-it-works/architecture-resize.png"
  45. },
  46. Media = new List<MediaUrl>
  47. {
  48. new MediaUrl()
  49. {
  50. Url = "http://i.giphy.com/Ki55RUbOV5njy.gif"
  51. }
  52. }
  53. }.ToAttachment(),
  54. new VideoCard
  55. {
  56. Title = "Big Buck Bunny",
  57. Subtitle = "by the Blender Institute",
  58. Text = "Big Buck Bunny (code-named Peach) is a short computer-animated comedy film by the Blender Institute, part of the Blender Foundation. Like the foundation's previous film Elephants Dream, the film was made using Blender, a free software application for animation made by the same foundation. It was released as an open-source film under Creative Commons License Attribution 3.0.",
  59. Image = new ThumbnailUrl
  60. {
  61. Url = "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Big_buck_bunny_poster_big.jpg/220px-Big_buck_bunny_poster_big.jpg"
  62. },
  63. Media = new List<MediaUrl>
  64. {
  65. new MediaUrl()
  66. {
  67. Url = "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4"
  68. }
  69. },
  70. Buttons = new List<CardAction>
  71. {
  72. new CardAction()
  73. {
  74. Title = "Learn More",
  75. Type = ActionTypes.OpenUrl,
  76. Value = "https://peach.blender.org/"
  77. }
  78. }
  79. }.ToAttachment()
  80. };
  81. }
  82. }
  83. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...