コード例 #1
0
 public static BubbleContainer Flex_Greeting()
 {
     return(new BubbleContainer()
     {
         Body = new BoxComponent()
         {
             Layout = BoxLayout.Vertical,
             Contents = new IFlexComponent[]
             {
                 new TextComponent()
                 {
                     Text = "いらっしゃいませー",
                     Weight = Weight.Bold,
                     Size = "xl"
                 },
                 new TextComponent()
                 {
                     Text = "ルールを確認、メンバー全員を登録してください。当Botは登録不要です。",
                     Wrap = true,
                     Size = "md",
                     Color = ColorCode.FromRgb(102, 102, 102)
                 }
             }
         },
         Footer = new BoxComponent()
         {
             Layout = BoxLayout.Horizontal,
             Spacing = "sm",
             Contents = new IFlexComponent[]
             {
                 new ButtonComponent()
                 {
                     Action = new UriTemplateAction("ルール", "https://rikupin1105.github.io/FreedomSite/Rules"),
                     Style = ButtonStyle.Primary,
                     Height = "sm"
                 },
                 new ButtonComponent()
                 {
                     Action = new UriTemplateAction("FAQ", "https://rikupin1105.github.io/FreedomSite/FAQs"),
                     Style = ButtonStyle.Secondary,
                     Height = "sm",
                     Margin = "md"
                 }
             }
         }
     });
 }
コード例 #2
0
        private async Task ReplyFlexWithObjectInitializer(MessageEvent ev)
        {
            var flex = new FlexMessage("Restrant")
            {
                Contents = new BubbleContainer()
                {
                    Hero = new ImageComponent(url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/01_1_cafe.png")
                    {
                        Size        = ComponentSize.Full,
                        AspectRatio = AspectRatio._20_13,
                        AspectMode  = AspectMode.Cover,
                        Action      = new UriTemplateAction(null, "http://linecorp.com/")
                    },
                    Body = new BoxComponent(layout: BoxLayout.Vertical)
                    {
                        Contents = new IFlexComponent[] {
                            new TextComponent("Broun Cafe")
                            {
                                Weight = Weight.Bold,
                                Size   = ComponentSize.Xl
                            },
                            new BoxComponent(layout: BoxLayout.Baseline)
                            {
                                Margin   = Spacing.Md,
                                Contents = new IFlexComponent[]
                                {
                                    new IconComponent("https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png")
                                    {
                                        Size = ComponentSize.Sm
                                    },
                                    new IconComponent("https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png")
                                    {
                                        Size = ComponentSize.Sm
                                    },
                                    new IconComponent("https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png")
                                    {
                                        Size = ComponentSize.Sm
                                    },
                                    new IconComponent("https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png")
                                    {
                                        Size = ComponentSize.Sm
                                    },
                                    new IconComponent("https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gray_star_28.png")
                                    {
                                        Size = ComponentSize.Sm
                                    },
                                    new TextComponent("4.0")
                                    {
                                        Size   = ComponentSize.Sm,
                                        Margin = Spacing.Md,
                                        Flex   = 0,
                                        Color  = "#999999"
                                    }
                                }
                            },
                            new BoxComponent(BoxLayout.Vertical)
                            {
                                Margin   = Spacing.Lg,
                                Spacing  = Spacing.Sm,
                                Contents = new IFlexComponent[]
                                {
                                    new BoxComponent(BoxLayout.Baseline)
                                    {
                                        Spacing  = Spacing.Sm,
                                        Contents = new IFlexComponent[]
                                        {
                                            new TextComponent("Place")
                                            {
                                                Size  = ComponentSize.Sm,
                                                Color = "#aaaaaa",
                                                Flex  = 1
                                            },
                                            new TextComponent("Miraina Tower, 4-1-6 Shinjuku, Tokyo")
                                            {
                                                Size  = ComponentSize.Sm,
                                                Wrap  = true,
                                                Color = "#666666",
                                                Flex  = 5
                                            }
                                        }
                                    }
                                }
                            },
                            new BoxComponent(BoxLayout.Baseline)
                            {
                                Spacing  = Spacing.Sm,
                                Contents = new IFlexComponent[]
                                {
                                    new TextComponent("Time")
                                    {
                                        Size  = ComponentSize.Sm,
                                        Color = "#aaaaaa",
                                        Flex  = 1
                                    },
                                    new TextComponent("10:00 - 23:00")
                                    {
                                        Size  = ComponentSize.Sm,
                                        Wrap  = true,
                                        Color = "#666666",
                                        Flex  = 5
                                    }
                                }
                            }
                        }
                    },
                    Footer = new BoxComponent(BoxLayout.Vertical)
                    {
                        Spacing  = Spacing.Sm,
                        Flex     = 0,
                        Contents = new IFlexComponent[]
                        {
                            new ButtonComponent(new UriTemplateAction("Call", "https://linecorp.com"))
                            {
                                Style  = ButtonStyle.Link,
                                Height = ButtonHeight.Sm
                            },
                            new ButtonComponent(new UriTemplateAction("WEBSITE", "https://linecorp.com"))
                            {
                                Style  = ButtonStyle.Link,
                                Height = ButtonHeight.Sm
                            },
                            new SpacerComponent(ComponentSize.Sm)
                        }
                    },
                    Styles = new BubbleStyles()
                    {
                        Body = new BlockStyle()
                        {
                            BackgroundColor = ColorCode.FromRgb(192, 200, 200),
                            Separator       = true,
                            SeparatorColor  = ColorCode.DarkViolet
                        },
                        Footer = new BlockStyle()
                        {
                            BackgroundColor = ColorCode.Ivory
                        }
                    }
                }
            };

            await MessagingClient.ReplyMessageAsync(ev.ReplyToken, new[] { flex });
        }
コード例 #3
0
 public static BubbleContainer Flex_Check_Continue()
 {
     return(new BubbleContainer()
     {
         Body = new BoxComponent()
         {
             Layout = BoxLayout.Vertical,
             Contents = new IFlexComponent[]
             {
                 new TextComponent()
                 {
                     Text = "継続希望しますか?",
                     Weight = Weight.Bold,
                     Size = "xl"
                 },
                 new BoxComponent()
                 {
                     Layout = BoxLayout.Baseline,
                     Spacing = "sm",
                     Contents = new IFlexComponent[]
                     {
                         new TextComponent()
                         {
                             Text = "期限",
                             Size = "sm",
                             Color = ColorCode.FromRgb(102, 102, 102)
                         },
                         new TextComponent()
                         {
                             Text = "日曜日 22:00 まで",
                             Size = "sm",
                             Wrap = true,
                             Color = ColorCode.FromRgb(102, 102, 102),
                             Align = Align.End
                         }
                     }
                 },
                 new TextComponent()
                 {
                     Text = "実施期間終了の前日、または前々日に意思表示をされていないメンバーさん宛にメンションをつけて、管理メンバーがGTにてご連絡をします。実施期間終了後、継続を希望しないメンバーさんを、管理メンバーが退会大会に出場させます。ブロック非表示削除等は、各自自由に判断してください。",
                     Wrap = true,
                     Size = "sm",
                     Color = ColorCode.FromRgb(102, 102, 102)
                 }
             }
         },
         Footer = new BoxComponent()
         {
             Layout = BoxLayout.Vertical,
             Spacing = "sm",
             Contents = new IFlexComponent[]
             {
                 new ButtonComponent()
                 {
                     Action = new UriTemplateAction("希望する", "https://liff.line.me/1655282180-Le1b0wWq"),
                     Style = ButtonStyle.Primary,
                     Height = "sm"
                 },
                 new ButtonComponent()
                 {
                     Action = new UriTemplateAction("ルールを見る", "https://rikupin1105.github.io/FreedomSite/Rules"),
                     Style = ButtonStyle.Secondary,
                     Height = "sm"
                 }
             }
         }
     });
 }
コード例 #4
0
 private static BubbleContainer CreateRestrantWithObjectInitializer()
 {
     return(new BubbleContainer()
     {
         Hero = new ImageComponent()
         {
             Url = "https://scdn.line-apps.com/n/channel_devcenter/img/fx/01_1_cafe.png",
             Size = ComponentSize.Full,
             AspectRatio = AspectRatio._20_13,
             AspectMode = AspectMode.Cover,
             Action = new UriTemplateAction(null, "http://linecorp.com/")
         },
         Body = new BoxComponent()
         {
             Layout = BoxLayout.Vertical,
             Contents = new IFlexComponent[]
             {
                 new TextComponent()
                 {
                     Text = "Broun Cafe",
                     Weight = Weight.Bold,
                     Size = ComponentSize.Xl
                 },
                 new BoxComponent()
                 {
                     Layout = BoxLayout.Baseline,
                     Margin = Spacing.Md,
                     Contents = new IFlexComponent[]
                     {
                         new IconComponent()
                         {
                             Url = "https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png",
                             Size = ComponentSize.Sm
                         },
                         new IconComponent()
                         {
                             Url = "https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png",
                             Size = ComponentSize.Sm
                         },
                         new IconComponent()
                         {
                             Url = "https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png",
                             Size = ComponentSize.Sm
                         },
                         new IconComponent()
                         {
                             Url = "https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png",
                             Size = ComponentSize.Sm
                         },
                         new IconComponent()
                         {
                             Url = "https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gray_star_28.png",
                             Size = ComponentSize.Sm
                         },
                         new TextComponent()
                         {
                             Text = "4.0",
                             Size = ComponentSize.Sm,
                             Margin = Spacing.Md,
                             Flex = 0,
                             Color = "#999999"
                         }
                     }
                 },
                 new BoxComponent()
                 {
                     Layout = BoxLayout.Vertical,
                     Margin = Spacing.Lg,
                     Spacing = Spacing.Sm,
                     Contents = new IFlexComponent[]
                     {
                         new BoxComponent()
                         {
                             Layout = BoxLayout.Baseline,
                             Spacing = Spacing.Sm,
                             Contents = new IFlexComponent[]
                             {
                                 new TextComponent()
                                 {
                                     Text = "Place",
                                     Size = ComponentSize.Sm,
                                     Color = "#aaaaaa",
                                     Flex = 1
                                 },
                                 new TextComponent()
                                 {
                                     Text = "Miraina Tower, 4-1-6 Shinjuku, Tokyo",
                                     Size = ComponentSize.Sm,
                                     Wrap = true,
                                     Color = "#666666",
                                     Flex = 5
                                 }
                             }
                         }
                     }
                 },
                 new BoxComponent(BoxLayout.Baseline)
                 {
                     Spacing = Spacing.Sm,
                     Contents = new IFlexComponent[]
                     {
                         new TextComponent()
                         {
                             Text = "Time",
                             Size = ComponentSize.Sm,
                             Color = "#aaaaaa",
                             Flex = 1
                         },
                         new TextComponent()
                         {
                             Text = "10:00 - 23:00",
                             Size = ComponentSize.Sm,
                             Wrap = true,
                             Color = "#666666",
                             Flex = 5
                         }
                     }
                 }
             }
         },
         Footer = new BoxComponent()
         {
             Layout = BoxLayout.Vertical,
             Spacing = Spacing.Sm,
             Flex = 0,
             Contents = new IFlexComponent[]
             {
                 new ButtonComponent()
                 {
                     Action = new UriTemplateAction("Call", "https://linecorp.com"),
                     Style = ButtonStyle.Link,
                     Height = ButtonHeight.Sm
                 },
                 new ButtonComponent()
                 {
                     Action = new UriTemplateAction("WEBSITE", "https://linecorp.com"),
                     Style = ButtonStyle.Link,
                     Height = ButtonHeight.Sm
                 },
                 new SpacerComponent()
                 {
                     Size = ComponentSize.Sm
                 }
             }
         },
         Styles = new BubbleStyles()
         {
             Body = new BlockStyle()
             {
                 BackgroundColor = ColorCode.FromRgb(192, 200, 200),
                 Separator = true,
                 SeparatorColor = ColorCode.DarkViolet
             },
             Footer = new BlockStyle()
             {
                 BackgroundColor = ColorCode.Ivory
             }
         }
     });
 }