Exemple #1
0
        private void BtnConnectClick(object sender, RoutedEventArgs e)
        {
            _api = new ApiClient { Url = txt_url.Text };
            MetaData.Url = txt_url.Text;
            btn_connect.Content = "loading";
            btn_connect.Background = Brushes.Yellow;
            EnableUi(false);

            var bw = new BackgroundWorker();
            bw.DoWork += ValidateUri;
            bw.RunWorkerCompleted += Completed;

            bw.RunWorkerAsync();
        }
Exemple #2
0
        public void Initiate()
        {
            _api = new ApiClient();
            _api.Url = MetaData.Url;

            lbl_gameId.Content = "GameId: " + GameId;
            lbl_playerId.Content = "PlayerId: " + PlayerId;
            rect_player.Fill = PlayerId == 1 ? Brushes.RoyalBlue : Brushes.Red;

            SetTimer();
            SetGame();
            UpdateUi();

            _squareSize = SquareSize(_game.Vsize, _game.Hsize);
        }