public void SetShirtNumber(Guid playerId, ShirtNumber newShirtNumber) { try { var player = this.FindById(playerId); player.ShirtNumber = newShirtNumber; } catch (ShirtNumberAlreadyInUseException ex) { throw ex; } catch (IndexOutOfRangeException ex) { throw ex; } catch (NullReferenceException) { throw new NullReferenceException( "Search failed! Datasource does not contain any " + $"data related to the player id '{playerId}'"); } }
private void UcitajPodatke() { if (Captain) { lblCaptain.Visible = true; } if (Favorite) { picBoxFavorite.Visible = true; } lblNumber.Text = ShirtNumber.ToString(); lblPlayerName.Text = PlayerName; lblPosition.Text = position.ToString(); if (PicturPath == "default") { picBoxPlayer.Image = Resources.footballer_silhouette_1; } else { picBoxPlayer.Image = Image.FromFile(PicturPath); } }
public override int GetHashCode() => country.GetHashCode() ^ ShirtNumber.GetHashCode() ^ Name.GetHashCode();
public override int GetHashCode() { return(ShirtNumber.GetHashCode()); }