void _window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { _window = null; _lobbySession.DisplayToggled -= _lobbySession_DisplayToggled; }
public override void ShowControl(bool shouldActivate) { if (_window == null) { GameRoomWindowModelView modelView = new GameRoomWindowModelView(); modelView.Init(_manager, this); _window = new GameRoomWindow(); _window.DataContext = modelView; _window.Owner = _lobbySession.Window; _window.Closing += _window_Closing; LoadBets(); LoadMatch(); } _window.WindowTreeManager.Parent = _lobbySession.Window.WindowTreeManager; _window.ShowNormal(shouldActivate); }