Exemplo n.º 1
0
        public static ConnectorCard GetCard(Controllers.HomeController.CardTypes cardType)
        {
            ConnectorCard result = null;

            switch (cardType)
            {
            case Controllers.HomeController.CardTypes.ConnectorReferenceExample:
                result = GetConnectorsReferenceCard();
                break;

            case Controllers.HomeController.CardTypes.TwitterHeroImage:
                result = GetTwitterHeroCard();
                break;
            }
            return(result);
        }
Exemplo n.º 2
0
        public static ConnectorCard GetTwitterHeroCard()
        {
            var card = new ConnectorCard()
            {
                ThemeColor = "E81123",
                Summary    = "New Tweet",
                Sections   = new Section[]
                {
                    new Section()
                    {
                        ActivityTitle    = "**SpaceX**",
                        ActivitySubtitle = "@SpaceX - 3/30/2017",
                        ActivityImage    = "https://pbs.twimg.com/profile_images/671865418701606912/HECw8AzK_400x400.jpg",
                        ActivityText     = "More photos from today’s Falcon 9 launch and first stage landing → [http://flickr.com/spacex](http://flickr.com/spacex)",
                        HeroImage        = new Image()
                        {
                            ImageUrl = "https://pbs.twimg.com/media/C8NK1XGUIAA-CJK.jpg"
                        }
                    }
                }
            };

            return(card);
        }
Exemplo n.º 3
0
        private static ConnectorCard GetConnectorsReferenceCard()
        {
            var card = new ConnectorCard()
            {
                Summary  = "Miguel Garcia commented on Trello",
                Title    = "Project Tango",
                Sections = new Section[]
                {
                    new Section()
                    {
                        ActivityTitle    = "Miguel Garcia commented",
                        ActivitySubtitle = "On Project Tango",
                        ActivityText     = "\"Here are the designs\"",
                        ActivityImage    = "http://connectorsdemo.azurewebsites.net/images/MSC12_Oscar_002.jpg"
                    },
                    new Section()
                    {
                        Title = "Details",
                        Facts = new Fact[]
                        {
                            new Fact()
                            {
                                Name  = "Labels",
                                Value = "Designs, redlines"
                            },
                            new Fact()
                            {
                                Name  = "Due date",
                                Value = "Dec 7, 2016"
                            },
                            new Fact()
                            {
                                Name  = "Attachments",
                                Value = "[final.jpg](http://connectorsdemo.azurewebsites.net/images/WIN14_Jan_04.jpg)"
                            }
                        }
                    },
                    new Section()
                    {
                        Title  = "Images",
                        Images = new Image[]
                        {
                            new Image()
                            {
                                ImageUrl = "http://connectorsdemo.azurewebsites.net/images/MicrosoftSurface_024_Cafe_OH-06315_VS_R1c.jpg"
                            },
                            new Image()
                            {
                                ImageUrl = "http://connectorsdemo.azurewebsites.net/images/WIN12_Scene_01.jpg"
                            },
                            new Image()
                            {
                                ImageUrl = "http://connectorsdemo.azurewebsites.net/images/WIN12_Anthony_02.jpg"
                            }
                        }
                    }
                },
                PotentialAction = new ViewAction[]
                {
                    new ViewAction()
                    {
                        Name   = "View in Trello",
                        Type   = "ViewAction",
                        Target = new string [] { "https://trello.com/c/1101/" }
                    }
                }
            };

            return(card);
        }