Interaction logic for PreGameLobby.xaml
상속: System.Windows.Controls.UserControl, IDisposable
예제 #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;
        }
예제 #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;
 }