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;
 }