public void ChatProductCardElement(RadChat radchat) { ChatProductCardDataItem productCard = new ChatProductCardDataItem(Image2.ToImage(), "Arrive & Drive", "Rating 7/10", "With our Arrive & Drive Packages, the only thing you will have to think about is driving. We make it simple for you to get more of what you love. We streamline the " + "entire process and have everything ready for you when you arrive at the track so you can get straight to racing.", "Packages from $340", null, null); Author author = new Author(adminImg2.ToImage(), "Ben"); ChatCardMessage message = new ChatCardMessage(productCard, author, DateTime.Now); radchat.AddMessage(message); }
// Chat Cards / Carousel public void Add_CarouselMessage(RadChat radchat) { Telerik.WinControls.UI.ChatImageCardDataItem imageCard = new ChatImageCardDataItem(Image1.ToImage(), "Benjamin Vilanders", "Senior Architect", "As a Senior Architect his experience in the industry allows him to take on increased responsibility. Like other architects, he design buildings " + "and makes sure they are structurally sound. Due to his track record of quality performance, Benjamin also serves as a manager, a mentor, an advisor and coordinator.", null, null); ChatProductCardDataItem productCard = new ChatProductCardDataItem(Image2.ToImage(), "Arrive & Drive", "Rating 7/10", "With our Arrive & Drive Packages, the only thing you will have to think about is driving. We make it simple for you to get more of what you love. We streamline the " + "entire process and have everything ready for you when you arrive at the track so you can get straight to racing.", "Packages from $340", null, null); ChatWeatherCardDataItem weatherCard = new ChatWeatherCardDataItem("Florence", Image3.ToImage(), "33°C", "Humidity: 76%", "Dew: 31°C", "Pressure: 1031 mb", "Wind Speed: 15 km/h NW"); List <FlightInfo> flights = new List <FlightInfo>(); flights.Add(new FlightInfo("Los Angelis", "LAX", DateTime.Now.AddDays(7), "New York", "JFK", DateTime.Now.AddDays(7).AddHours(5.5))); flights.Add(new FlightInfo("New York", "JFK", DateTime.Now.AddDays(14).AddHours(3), "Los Angelis", "LAX", DateTime.Now.AddDays(14).AddHours(9.1))); ChatFlightCardDataItem flightCard = new ChatFlightCardDataItem("Andrew Fuller", flights, Image4.ToImage(), "$341", null); List <BaseChatCardDataItem> cards = new List <BaseChatCardDataItem>(); cards.Add(imageCard); cards.Add(productCard); cards.Add(weatherCard); cards.Add(flightCard); Author author = new Author(Image3.ToImage(), "Ben"); ChatCarouselMessage carouselMessage = new ChatCarouselMessage(cards, author, DateTime.Now); radchat.AddMessage(carouselMessage); }