Пример #1
0
        private async void LoginButtonClick(object sender, RoutedEventArgs e)
        {
            if (!UserNameBox.Text.Any())
            {
                MessageBox.Show("Enter your user name");
                return;
            }

            game = await ClientGame.CreateAsync(userName, ServerComboBox.SelectedItem.ToString(), this);

            if (game == null)
            {
                MessageBox.Show("Server is offline");
                return;
            }

            LoginGrid.Visibility = Visibility.Hidden;

            ShowChat(true);
        }
Пример #2
0
        static void Main()
        {
            using (var game = new ClientGame())

                game.Run();
        }