示例#1
0
文件: Repit.xaml.cs 项目: yinyann/ST
 private void OnRepitActionChoosen(object sender, RepitItem e)
 {
     if (_repitItems.All(_ => _.ImDone))
     {
         var info = new Label {
             Text = "Tous les héros ont fait leur choix.\r\nIls peuvent se placer où ils le souhaitent avant de passer au tour suivant.", HorizontalOptions = LayoutOptions.CenterAndExpand
         };
         _stack.Children.Add(info);
     }
 }
示例#2
0
文件: Repit.xaml.cs 项目: yinyann/ST
        public Repit()
        {
            Title = "Phase de répit";
            InitializeComponent();

            _stack = new StackLayout();
            foreach (string hero in Game.Instance.Heroes)
            {
                var item = new RepitItem(hero);
                item.RepitActionChoosen += OnRepitActionChoosen;
                _repitItems.Add(item);
                _stack.Children.Add(item);
            }

            this.Content = _stack;
        }