private void SetMe(Player player) { var oldPlayer = me; if (oldPlayer != null) { oldPlayer.PropertyChanged -= CurrentPlayer_PropertyChanged; } me = player; if (player != null) { player.PropertyChanged += CurrentPlayer_PropertyChanged; meLabel.Text = string.Format( "{0}, ID: {1}, EslID: {2}", player.Name, player.Id != 0 ? me.Id.ToString() : "Not Set", player.EslPlayerId.HasValue ? player.EslPlayerId.Value.ToString() : "Not Set"); } }
partial void DeletePlayer(Player instance);
partial void InsertPlayer(Player instance);
partial void UpdatePlayer(Player instance);
private bool ChangeCopyItem(Player player, MatchSessions_Player copyItem) { var changedCopyItem = false; if (string.IsNullOrEmpty(copyItem.Player.Name) || copyItem.Player.Name == "unknown") { copyItem.Player.Name = player.Name; changedCopyItem = true; } if (string.IsNullOrEmpty(copyItem.Player.MyTags)) { copyItem.Player.MyTags = player.MyTags; changedCopyItem = true; } return changedCopyItem; }