Interaction logic for PreGameLobby.xaml
Inheritance: System.Windows.Controls.UserControl, IDisposable
Ejemplo n.º 1
0
        public void Setup(bool isLocalGame, Window owner)
        {
            //this.Owner = owner;
            //this.Topmost = false;
            if(this.Visibility != Visibility.Visible)
                this.Show();
            this.Focus();
            this.Content = null;
            this.lobby = null;

            if (Program.GameEngine == null || Program.GameEngine.Definition == null)
            {
                TopMostMessageBox.Show(
                    "Something went wrong. Please tell someone!",
                    "Error",
                    MessageBoxButton.OK,
                    MessageBoxImage.Question);
                return;
                this.Close();
            }

            lobby = new PreGameLobby();
            lobby.OnClose += PreGameLobbyOnOnClose;
            this.Content = lobby;
        }
Ejemplo n.º 2
0
 public void Setup(bool isLocalGame, Window owner)
 {
     this.Owner = owner;
     if(this.Visibility != Visibility.Visible)
         this.Show();
     this.Content = null;
     this.lobby = null;
     lobby = new PreGameLobby(isLocalGame);
     lobby.OnClose += PreGameLobbyOnOnClose;
     this.Content = lobby;
 }