private void Player_ShipChanged(object sender, ShipChangedArgs e) { try { _progressBars.Bot = e.NewShip; if (e.PreviousShip != null) { _map.RemoveItem(e.PreviousShip); } if (e.NewShip != null) { _map.AddItem(e.NewShip); } } catch (Exception ex) { MessageBox.Show(ex.ToString(), this.Title, MessageBoxButton.OK, MessageBoxImage.Error); } }
private void Player_ShipChanged(object sender, ShipChangedArgs e) { try { if (_player.Ship == null) { pnlPlayerIcon.Content = null; } else { Icon3D icon = new Icon3D("", _player.Ship.GetNewDNA(), _world); icon.ShowName = false; icon.ShowBorder = false; pnlPlayerIcon.Content = icon; } GenerateRefillButtons(); ShowShipCargo(); } catch (Exception ex) { MessageBox.Show(ex.ToString(), TITLE, MessageBoxButton.OK, MessageBoxImage.Error); } }