protected override void Simplify() { Places = new RoomPlace[] { new Button() { Caption = Say, Name = "Хорошо", Go = Go }, }; }
protected override void Simplify() { Places = new RoomPlace[] { new ReplyButtonDialog() { Caption = Menu, Buttons = Items.Select(item => new ReplyButton() { Name = item.Button, Go = item.Go }).ToArray(), Columns = Col.SplitToInts(',', 1) }, }; }
public void Generate(PicAndCaptionResult picGen) { if (picGen.Pic != null) { Pic = picGen.Pic; } Caption = picGen.Caption; if (picGen.AutoGo.IsNotNullOrEmpty()) { AutoGo = picGen.AutoGo; } if (picGen.NameGoes != null && picGen.NameGoes.Any()) { Places = new RoomPlace[] { new ButtonDialog() { Caption = picGen.Caption ?? Caption, Buttons = picGen.NameGoes.Select(ng => new Button() { Name = ng.Name, Go = ng.Go }).ToArray(), Columns = picGen.Columns }, }; } if (Go.IsNotNullOrEmpty()) { Places = new RoomPlace[] { new Button() { Caption = picGen.Caption ?? Caption, Name = "Хорошо", Go = Go }, }; } }