Ejemplo n.º 1
0
        //Waiting View
        public WaitingLayout(WaitingResponse WResponse, ContentPageController ViewController)
        {
            var PlayersReady = WResponse.Players;
            var RoundNumber = WResponse.RoundNumber;

            var RoundLabel = new Label
            {
                Text = "Round " + RoundNumber,
                FontSize = 30,
                HorizontalOptions = LayoutOptions.Center,
                HeightRequest = 100
            };

            var labelLarge = new Label
            {
                Text = "Waiting on others",
                FontSize = 25,
                HorizontalOptions = LayoutOptions.Center,
                HeightRequest = 50
            };

            WaitLayout = new StackLayout
            {
                Children =
                {
                    RoundLabel,
                    labelLarge
                },
                Padding = new Thickness(10, Device.OnPlatform(20, 0, 0), 10, 5)
            };
            foreach (var R in PlayersReady)
            {
                // can be Buttons, ListView, Picker
                WaitLayout.Children.Add(new Label
                {
                    Text = R.Name + ": " + R.Status,
                    HorizontalOptions = LayoutOptions.Center,
                    FontSize = 15
                });
            }
            Display(ViewController);
        }
Ejemplo n.º 2
0
 internal static void DisplayWaiting(WaitingResponse WResponse)
 {
     if (WResponse.GameId == GameId)
     {
         var WLayout = new WaitingLayout(WResponse, ViewController);
     }
 }